protobuf-platform 1.2.1 → 1.2.3

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/cms/cms_pb.js CHANGED
@@ -42,6 +42,7 @@ goog.exportSymbol('proto.cms.GetBurgerMenuWidgetRequest', null, global);
42
42
  goog.exportSymbol('proto.cms.GetFileRequest', null, global);
43
43
  goog.exportSymbol('proto.cms.GetMainPageWidgetRequest', null, global);
44
44
  goog.exportSymbol('proto.cms.GetPageRequest', null, global);
45
+ goog.exportSymbol('proto.cms.GetPromoRequest', null, global);
45
46
  goog.exportSymbol('proto.cms.GetSignUpFormWidgetRequest', null, global);
46
47
  goog.exportSymbol('proto.cms.MainPageWidgetItem', null, global);
47
48
  goog.exportSymbol('proto.cms.MainPageWidgetResponse', null, global);
@@ -53,6 +54,13 @@ goog.exportSymbol('proto.cms.PagesItemsResponse', null, global);
53
54
  goog.exportSymbol('proto.cms.PaginationRequest', null, global);
54
55
  goog.exportSymbol('proto.cms.PingRequest', null, global);
55
56
  goog.exportSymbol('proto.cms.PongResponse', null, global);
57
+ goog.exportSymbol('proto.cms.PromoItem', null, global);
58
+ goog.exportSymbol('proto.cms.PromoItemRequest', null, global);
59
+ goog.exportSymbol('proto.cms.PromoRequest', null, global);
60
+ goog.exportSymbol('proto.cms.PromoRequest.RequestCase', null, global);
61
+ goog.exportSymbol('proto.cms.PromoResponse', null, global);
62
+ goog.exportSymbol('proto.cms.PromoStatusResponse', null, global);
63
+ goog.exportSymbol('proto.cms.PromosItemsResponse', null, global);
56
64
  goog.exportSymbol('proto.cms.SignUpFormWidgetItem', null, global);
57
65
  goog.exportSymbol('proto.cms.UserBannerGroupResponse', null, global);
58
66
  goog.exportSymbol('proto.cms.UserBannerItem', null, global);
@@ -770,6 +778,153 @@ if (goog.DEBUG && !COMPILED) {
770
778
  */
771
779
  proto.cms.PageStatusResponse.displayName = 'proto.cms.PageStatusResponse';
772
780
  }
781
+ /**
782
+ * Generated by JsPbCodeGenerator.
783
+ * @param {Array=} opt_data Optional initial data array, typically from a
784
+ * server response, or constructed directly in Javascript. The array is used
785
+ * in place and becomes part of the constructed object. It is not cloned.
786
+ * If no data is provided, the constructed object will be empty, but still
787
+ * valid.
788
+ * @extends {jspb.Message}
789
+ * @constructor
790
+ */
791
+ proto.cms.PromoRequest = function(opt_data) {
792
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.cms.PromoRequest.oneofGroups_);
793
+ };
794
+ goog.inherits(proto.cms.PromoRequest, jspb.Message);
795
+ if (goog.DEBUG && !COMPILED) {
796
+ /**
797
+ * @public
798
+ * @override
799
+ */
800
+ proto.cms.PromoRequest.displayName = 'proto.cms.PromoRequest';
801
+ }
802
+ /**
803
+ * Generated by JsPbCodeGenerator.
804
+ * @param {Array=} opt_data Optional initial data array, typically from a
805
+ * server response, or constructed directly in Javascript. The array is used
806
+ * in place and becomes part of the constructed object. It is not cloned.
807
+ * If no data is provided, the constructed object will be empty, but still
808
+ * valid.
809
+ * @extends {jspb.Message}
810
+ * @constructor
811
+ */
812
+ proto.cms.PromoItemRequest = function(opt_data) {
813
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
814
+ };
815
+ goog.inherits(proto.cms.PromoItemRequest, jspb.Message);
816
+ if (goog.DEBUG && !COMPILED) {
817
+ /**
818
+ * @public
819
+ * @override
820
+ */
821
+ proto.cms.PromoItemRequest.displayName = 'proto.cms.PromoItemRequest';
822
+ }
823
+ /**
824
+ * Generated by JsPbCodeGenerator.
825
+ * @param {Array=} opt_data Optional initial data array, typically from a
826
+ * server response, or constructed directly in Javascript. The array is used
827
+ * in place and becomes part of the constructed object. It is not cloned.
828
+ * If no data is provided, the constructed object will be empty, but still
829
+ * valid.
830
+ * @extends {jspb.Message}
831
+ * @constructor
832
+ */
833
+ proto.cms.PromoItem = function(opt_data) {
834
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
835
+ };
836
+ goog.inherits(proto.cms.PromoItem, jspb.Message);
837
+ if (goog.DEBUG && !COMPILED) {
838
+ /**
839
+ * @public
840
+ * @override
841
+ */
842
+ proto.cms.PromoItem.displayName = 'proto.cms.PromoItem';
843
+ }
844
+ /**
845
+ * Generated by JsPbCodeGenerator.
846
+ * @param {Array=} opt_data Optional initial data array, typically from a
847
+ * server response, or constructed directly in Javascript. The array is used
848
+ * in place and becomes part of the constructed object. It is not cloned.
849
+ * If no data is provided, the constructed object will be empty, but still
850
+ * valid.
851
+ * @extends {jspb.Message}
852
+ * @constructor
853
+ */
854
+ proto.cms.PromoResponse = function(opt_data) {
855
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
856
+ };
857
+ goog.inherits(proto.cms.PromoResponse, jspb.Message);
858
+ if (goog.DEBUG && !COMPILED) {
859
+ /**
860
+ * @public
861
+ * @override
862
+ */
863
+ proto.cms.PromoResponse.displayName = 'proto.cms.PromoResponse';
864
+ }
865
+ /**
866
+ * Generated by JsPbCodeGenerator.
867
+ * @param {Array=} opt_data Optional initial data array, typically from a
868
+ * server response, or constructed directly in Javascript. The array is used
869
+ * in place and becomes part of the constructed object. It is not cloned.
870
+ * If no data is provided, the constructed object will be empty, but still
871
+ * valid.
872
+ * @extends {jspb.Message}
873
+ * @constructor
874
+ */
875
+ proto.cms.GetPromoRequest = function(opt_data) {
876
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
877
+ };
878
+ goog.inherits(proto.cms.GetPromoRequest, jspb.Message);
879
+ if (goog.DEBUG && !COMPILED) {
880
+ /**
881
+ * @public
882
+ * @override
883
+ */
884
+ proto.cms.GetPromoRequest.displayName = 'proto.cms.GetPromoRequest';
885
+ }
886
+ /**
887
+ * Generated by JsPbCodeGenerator.
888
+ * @param {Array=} opt_data Optional initial data array, typically from a
889
+ * server response, or constructed directly in Javascript. The array is used
890
+ * in place and becomes part of the constructed object. It is not cloned.
891
+ * If no data is provided, the constructed object will be empty, but still
892
+ * valid.
893
+ * @extends {jspb.Message}
894
+ * @constructor
895
+ */
896
+ proto.cms.PromoStatusResponse = function(opt_data) {
897
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
898
+ };
899
+ goog.inherits(proto.cms.PromoStatusResponse, jspb.Message);
900
+ if (goog.DEBUG && !COMPILED) {
901
+ /**
902
+ * @public
903
+ * @override
904
+ */
905
+ proto.cms.PromoStatusResponse.displayName = 'proto.cms.PromoStatusResponse';
906
+ }
907
+ /**
908
+ * Generated by JsPbCodeGenerator.
909
+ * @param {Array=} opt_data Optional initial data array, typically from a
910
+ * server response, or constructed directly in Javascript. The array is used
911
+ * in place and becomes part of the constructed object. It is not cloned.
912
+ * If no data is provided, the constructed object will be empty, but still
913
+ * valid.
914
+ * @extends {jspb.Message}
915
+ * @constructor
916
+ */
917
+ proto.cms.PromosItemsResponse = function(opt_data) {
918
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.cms.PromosItemsResponse.repeatedFields_, null);
919
+ };
920
+ goog.inherits(proto.cms.PromosItemsResponse, jspb.Message);
921
+ if (goog.DEBUG && !COMPILED) {
922
+ /**
923
+ * @public
924
+ * @override
925
+ */
926
+ proto.cms.PromosItemsResponse.displayName = 'proto.cms.PromosItemsResponse';
927
+ }
773
928
 
774
929
 
775
930
 
@@ -8952,4 +9107,2063 @@ proto.cms.PageStatusResponse.prototype.setStatus = function(value) {
8952
9107
  };
8953
9108
 
8954
9109
 
9110
+
9111
+ /**
9112
+ * Oneof group definitions for this message. Each group defines the field
9113
+ * numbers belonging to that group. When of these fields' value is set, all
9114
+ * other fields in the group are cleared. During deserialization, if multiple
9115
+ * fields are encountered for a group, only the last value seen will be kept.
9116
+ * @private {!Array<!Array<number>>}
9117
+ * @const
9118
+ */
9119
+ proto.cms.PromoRequest.oneofGroups_ = [[1,2,3]];
9120
+
9121
+ /**
9122
+ * @enum {number}
9123
+ */
9124
+ proto.cms.PromoRequest.RequestCase = {
9125
+ REQUEST_NOT_SET: 0,
9126
+ BANNER_DATA: 1,
9127
+ IMAGE_BIG: 2,
9128
+ IMAGE_SMALL: 3
9129
+ };
9130
+
9131
+ /**
9132
+ * @return {proto.cms.PromoRequest.RequestCase}
9133
+ */
9134
+ proto.cms.PromoRequest.prototype.getRequestCase = function() {
9135
+ return /** @type {proto.cms.PromoRequest.RequestCase} */(jspb.Message.computeOneofCase(this, proto.cms.PromoRequest.oneofGroups_[0]));
9136
+ };
9137
+
9138
+
9139
+
9140
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9141
+ /**
9142
+ * Creates an object representation of this proto.
9143
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9144
+ * Optional fields that are not set will be set to undefined.
9145
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9146
+ * For the list of reserved names please see:
9147
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9148
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9149
+ * JSPB instance for transitional soy proto support:
9150
+ * http://goto/soy-param-migration
9151
+ * @return {!Object}
9152
+ */
9153
+ proto.cms.PromoRequest.prototype.toObject = function(opt_includeInstance) {
9154
+ return proto.cms.PromoRequest.toObject(opt_includeInstance, this);
9155
+ };
9156
+
9157
+
9158
+ /**
9159
+ * Static version of the {@see toObject} method.
9160
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9161
+ * the JSPB instance for transitional soy proto support:
9162
+ * http://goto/soy-param-migration
9163
+ * @param {!proto.cms.PromoRequest} msg The msg instance to transform.
9164
+ * @return {!Object}
9165
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9166
+ */
9167
+ proto.cms.PromoRequest.toObject = function(includeInstance, msg) {
9168
+ var f, obj = {
9169
+ bannerData: (f = msg.getBannerData()) && proto.cms.PromoItemRequest.toObject(includeInstance, f),
9170
+ imageBig: (f = msg.getImageBig()) && proto.cms.File.toObject(includeInstance, f),
9171
+ imageSmall: (f = msg.getImageSmall()) && proto.cms.File.toObject(includeInstance, f)
9172
+ };
9173
+
9174
+ if (includeInstance) {
9175
+ obj.$jspbMessageInstance = msg;
9176
+ }
9177
+ return obj;
9178
+ };
9179
+ }
9180
+
9181
+
9182
+ /**
9183
+ * Deserializes binary data (in protobuf wire format).
9184
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9185
+ * @return {!proto.cms.PromoRequest}
9186
+ */
9187
+ proto.cms.PromoRequest.deserializeBinary = function(bytes) {
9188
+ var reader = new jspb.BinaryReader(bytes);
9189
+ var msg = new proto.cms.PromoRequest;
9190
+ return proto.cms.PromoRequest.deserializeBinaryFromReader(msg, reader);
9191
+ };
9192
+
9193
+
9194
+ /**
9195
+ * Deserializes binary data (in protobuf wire format) from the
9196
+ * given reader into the given message object.
9197
+ * @param {!proto.cms.PromoRequest} msg The message object to deserialize into.
9198
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9199
+ * @return {!proto.cms.PromoRequest}
9200
+ */
9201
+ proto.cms.PromoRequest.deserializeBinaryFromReader = function(msg, reader) {
9202
+ while (reader.nextField()) {
9203
+ if (reader.isEndGroup()) {
9204
+ break;
9205
+ }
9206
+ var field = reader.getFieldNumber();
9207
+ switch (field) {
9208
+ case 1:
9209
+ var value = new proto.cms.PromoItemRequest;
9210
+ reader.readMessage(value,proto.cms.PromoItemRequest.deserializeBinaryFromReader);
9211
+ msg.setBannerData(value);
9212
+ break;
9213
+ case 2:
9214
+ var value = new proto.cms.File;
9215
+ reader.readMessage(value,proto.cms.File.deserializeBinaryFromReader);
9216
+ msg.setImageBig(value);
9217
+ break;
9218
+ case 3:
9219
+ var value = new proto.cms.File;
9220
+ reader.readMessage(value,proto.cms.File.deserializeBinaryFromReader);
9221
+ msg.setImageSmall(value);
9222
+ break;
9223
+ default:
9224
+ reader.skipField();
9225
+ break;
9226
+ }
9227
+ }
9228
+ return msg;
9229
+ };
9230
+
9231
+
9232
+ /**
9233
+ * Serializes the message to binary data (in protobuf wire format).
9234
+ * @return {!Uint8Array}
9235
+ */
9236
+ proto.cms.PromoRequest.prototype.serializeBinary = function() {
9237
+ var writer = new jspb.BinaryWriter();
9238
+ proto.cms.PromoRequest.serializeBinaryToWriter(this, writer);
9239
+ return writer.getResultBuffer();
9240
+ };
9241
+
9242
+
9243
+ /**
9244
+ * Serializes the given message to binary data (in protobuf wire
9245
+ * format), writing to the given BinaryWriter.
9246
+ * @param {!proto.cms.PromoRequest} message
9247
+ * @param {!jspb.BinaryWriter} writer
9248
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9249
+ */
9250
+ proto.cms.PromoRequest.serializeBinaryToWriter = function(message, writer) {
9251
+ var f = undefined;
9252
+ f = message.getBannerData();
9253
+ if (f != null) {
9254
+ writer.writeMessage(
9255
+ 1,
9256
+ f,
9257
+ proto.cms.PromoItemRequest.serializeBinaryToWriter
9258
+ );
9259
+ }
9260
+ f = message.getImageBig();
9261
+ if (f != null) {
9262
+ writer.writeMessage(
9263
+ 2,
9264
+ f,
9265
+ proto.cms.File.serializeBinaryToWriter
9266
+ );
9267
+ }
9268
+ f = message.getImageSmall();
9269
+ if (f != null) {
9270
+ writer.writeMessage(
9271
+ 3,
9272
+ f,
9273
+ proto.cms.File.serializeBinaryToWriter
9274
+ );
9275
+ }
9276
+ };
9277
+
9278
+
9279
+ /**
9280
+ * optional PromoItemRequest banner_data = 1;
9281
+ * @return {?proto.cms.PromoItemRequest}
9282
+ */
9283
+ proto.cms.PromoRequest.prototype.getBannerData = function() {
9284
+ return /** @type{?proto.cms.PromoItemRequest} */ (
9285
+ jspb.Message.getWrapperField(this, proto.cms.PromoItemRequest, 1));
9286
+ };
9287
+
9288
+
9289
+ /**
9290
+ * @param {?proto.cms.PromoItemRequest|undefined} value
9291
+ * @return {!proto.cms.PromoRequest} returns this
9292
+ */
9293
+ proto.cms.PromoRequest.prototype.setBannerData = function(value) {
9294
+ return jspb.Message.setOneofWrapperField(this, 1, proto.cms.PromoRequest.oneofGroups_[0], value);
9295
+ };
9296
+
9297
+
9298
+ /**
9299
+ * Clears the message field making it undefined.
9300
+ * @return {!proto.cms.PromoRequest} returns this
9301
+ */
9302
+ proto.cms.PromoRequest.prototype.clearBannerData = function() {
9303
+ return this.setBannerData(undefined);
9304
+ };
9305
+
9306
+
9307
+ /**
9308
+ * Returns whether this field is set.
9309
+ * @return {boolean}
9310
+ */
9311
+ proto.cms.PromoRequest.prototype.hasBannerData = function() {
9312
+ return jspb.Message.getField(this, 1) != null;
9313
+ };
9314
+
9315
+
9316
+ /**
9317
+ * optional File image_big = 2;
9318
+ * @return {?proto.cms.File}
9319
+ */
9320
+ proto.cms.PromoRequest.prototype.getImageBig = function() {
9321
+ return /** @type{?proto.cms.File} */ (
9322
+ jspb.Message.getWrapperField(this, proto.cms.File, 2));
9323
+ };
9324
+
9325
+
9326
+ /**
9327
+ * @param {?proto.cms.File|undefined} value
9328
+ * @return {!proto.cms.PromoRequest} returns this
9329
+ */
9330
+ proto.cms.PromoRequest.prototype.setImageBig = function(value) {
9331
+ return jspb.Message.setOneofWrapperField(this, 2, proto.cms.PromoRequest.oneofGroups_[0], value);
9332
+ };
9333
+
9334
+
9335
+ /**
9336
+ * Clears the message field making it undefined.
9337
+ * @return {!proto.cms.PromoRequest} returns this
9338
+ */
9339
+ proto.cms.PromoRequest.prototype.clearImageBig = function() {
9340
+ return this.setImageBig(undefined);
9341
+ };
9342
+
9343
+
9344
+ /**
9345
+ * Returns whether this field is set.
9346
+ * @return {boolean}
9347
+ */
9348
+ proto.cms.PromoRequest.prototype.hasImageBig = function() {
9349
+ return jspb.Message.getField(this, 2) != null;
9350
+ };
9351
+
9352
+
9353
+ /**
9354
+ * optional File image_small = 3;
9355
+ * @return {?proto.cms.File}
9356
+ */
9357
+ proto.cms.PromoRequest.prototype.getImageSmall = function() {
9358
+ return /** @type{?proto.cms.File} */ (
9359
+ jspb.Message.getWrapperField(this, proto.cms.File, 3));
9360
+ };
9361
+
9362
+
9363
+ /**
9364
+ * @param {?proto.cms.File|undefined} value
9365
+ * @return {!proto.cms.PromoRequest} returns this
9366
+ */
9367
+ proto.cms.PromoRequest.prototype.setImageSmall = function(value) {
9368
+ return jspb.Message.setOneofWrapperField(this, 3, proto.cms.PromoRequest.oneofGroups_[0], value);
9369
+ };
9370
+
9371
+
9372
+ /**
9373
+ * Clears the message field making it undefined.
9374
+ * @return {!proto.cms.PromoRequest} returns this
9375
+ */
9376
+ proto.cms.PromoRequest.prototype.clearImageSmall = function() {
9377
+ return this.setImageSmall(undefined);
9378
+ };
9379
+
9380
+
9381
+ /**
9382
+ * Returns whether this field is set.
9383
+ * @return {boolean}
9384
+ */
9385
+ proto.cms.PromoRequest.prototype.hasImageSmall = function() {
9386
+ return jspb.Message.getField(this, 3) != null;
9387
+ };
9388
+
9389
+
9390
+
9391
+
9392
+
9393
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9394
+ /**
9395
+ * Creates an object representation of this proto.
9396
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9397
+ * Optional fields that are not set will be set to undefined.
9398
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9399
+ * For the list of reserved names please see:
9400
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9401
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9402
+ * JSPB instance for transitional soy proto support:
9403
+ * http://goto/soy-param-migration
9404
+ * @return {!Object}
9405
+ */
9406
+ proto.cms.PromoItemRequest.prototype.toObject = function(opt_includeInstance) {
9407
+ return proto.cms.PromoItemRequest.toObject(opt_includeInstance, this);
9408
+ };
9409
+
9410
+
9411
+ /**
9412
+ * Static version of the {@see toObject} method.
9413
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9414
+ * the JSPB instance for transitional soy proto support:
9415
+ * http://goto/soy-param-migration
9416
+ * @param {!proto.cms.PromoItemRequest} msg The msg instance to transform.
9417
+ * @return {!Object}
9418
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9419
+ */
9420
+ proto.cms.PromoItemRequest.toObject = function(includeInstance, msg) {
9421
+ var f, obj = {
9422
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
9423
+ slug: jspb.Message.getFieldWithDefault(msg, 2, ""),
9424
+ title: jspb.Message.getFieldWithDefault(msg, 3, ""),
9425
+ geo: jspb.Message.getFieldWithDefault(msg, 4, ""),
9426
+ anchor: jspb.Message.getFieldWithDefault(msg, 5, ""),
9427
+ isActive: jspb.Message.getFieldWithDefault(msg, 6, 0),
9428
+ startedAt: jspb.Message.getFieldWithDefault(msg, 7, ""),
9429
+ finishedAt: jspb.Message.getFieldWithDefault(msg, 8, "")
9430
+ };
9431
+
9432
+ if (includeInstance) {
9433
+ obj.$jspbMessageInstance = msg;
9434
+ }
9435
+ return obj;
9436
+ };
9437
+ }
9438
+
9439
+
9440
+ /**
9441
+ * Deserializes binary data (in protobuf wire format).
9442
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9443
+ * @return {!proto.cms.PromoItemRequest}
9444
+ */
9445
+ proto.cms.PromoItemRequest.deserializeBinary = function(bytes) {
9446
+ var reader = new jspb.BinaryReader(bytes);
9447
+ var msg = new proto.cms.PromoItemRequest;
9448
+ return proto.cms.PromoItemRequest.deserializeBinaryFromReader(msg, reader);
9449
+ };
9450
+
9451
+
9452
+ /**
9453
+ * Deserializes binary data (in protobuf wire format) from the
9454
+ * given reader into the given message object.
9455
+ * @param {!proto.cms.PromoItemRequest} msg The message object to deserialize into.
9456
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9457
+ * @return {!proto.cms.PromoItemRequest}
9458
+ */
9459
+ proto.cms.PromoItemRequest.deserializeBinaryFromReader = function(msg, reader) {
9460
+ while (reader.nextField()) {
9461
+ if (reader.isEndGroup()) {
9462
+ break;
9463
+ }
9464
+ var field = reader.getFieldNumber();
9465
+ switch (field) {
9466
+ case 1:
9467
+ var value = /** @type {number} */ (reader.readInt32());
9468
+ msg.setId(value);
9469
+ break;
9470
+ case 2:
9471
+ var value = /** @type {string} */ (reader.readString());
9472
+ msg.setSlug(value);
9473
+ break;
9474
+ case 3:
9475
+ var value = /** @type {string} */ (reader.readString());
9476
+ msg.setTitle(value);
9477
+ break;
9478
+ case 4:
9479
+ var value = /** @type {string} */ (reader.readString());
9480
+ msg.setGeo(value);
9481
+ break;
9482
+ case 5:
9483
+ var value = /** @type {string} */ (reader.readString());
9484
+ msg.setAnchor(value);
9485
+ break;
9486
+ case 6:
9487
+ var value = /** @type {number} */ (reader.readInt32());
9488
+ msg.setIsActive(value);
9489
+ break;
9490
+ case 7:
9491
+ var value = /** @type {string} */ (reader.readString());
9492
+ msg.setStartedAt(value);
9493
+ break;
9494
+ case 8:
9495
+ var value = /** @type {string} */ (reader.readString());
9496
+ msg.setFinishedAt(value);
9497
+ break;
9498
+ default:
9499
+ reader.skipField();
9500
+ break;
9501
+ }
9502
+ }
9503
+ return msg;
9504
+ };
9505
+
9506
+
9507
+ /**
9508
+ * Serializes the message to binary data (in protobuf wire format).
9509
+ * @return {!Uint8Array}
9510
+ */
9511
+ proto.cms.PromoItemRequest.prototype.serializeBinary = function() {
9512
+ var writer = new jspb.BinaryWriter();
9513
+ proto.cms.PromoItemRequest.serializeBinaryToWriter(this, writer);
9514
+ return writer.getResultBuffer();
9515
+ };
9516
+
9517
+
9518
+ /**
9519
+ * Serializes the given message to binary data (in protobuf wire
9520
+ * format), writing to the given BinaryWriter.
9521
+ * @param {!proto.cms.PromoItemRequest} message
9522
+ * @param {!jspb.BinaryWriter} writer
9523
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9524
+ */
9525
+ proto.cms.PromoItemRequest.serializeBinaryToWriter = function(message, writer) {
9526
+ var f = undefined;
9527
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
9528
+ if (f != null) {
9529
+ writer.writeInt32(
9530
+ 1,
9531
+ f
9532
+ );
9533
+ }
9534
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
9535
+ if (f != null) {
9536
+ writer.writeString(
9537
+ 2,
9538
+ f
9539
+ );
9540
+ }
9541
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
9542
+ if (f != null) {
9543
+ writer.writeString(
9544
+ 3,
9545
+ f
9546
+ );
9547
+ }
9548
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
9549
+ if (f != null) {
9550
+ writer.writeString(
9551
+ 4,
9552
+ f
9553
+ );
9554
+ }
9555
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
9556
+ if (f != null) {
9557
+ writer.writeString(
9558
+ 5,
9559
+ f
9560
+ );
9561
+ }
9562
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
9563
+ if (f != null) {
9564
+ writer.writeInt32(
9565
+ 6,
9566
+ f
9567
+ );
9568
+ }
9569
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
9570
+ if (f != null) {
9571
+ writer.writeString(
9572
+ 7,
9573
+ f
9574
+ );
9575
+ }
9576
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
9577
+ if (f != null) {
9578
+ writer.writeString(
9579
+ 8,
9580
+ f
9581
+ );
9582
+ }
9583
+ };
9584
+
9585
+
9586
+ /**
9587
+ * optional int32 id = 1;
9588
+ * @return {number}
9589
+ */
9590
+ proto.cms.PromoItemRequest.prototype.getId = function() {
9591
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
9592
+ };
9593
+
9594
+
9595
+ /**
9596
+ * @param {number} value
9597
+ * @return {!proto.cms.PromoItemRequest} returns this
9598
+ */
9599
+ proto.cms.PromoItemRequest.prototype.setId = function(value) {
9600
+ return jspb.Message.setField(this, 1, value);
9601
+ };
9602
+
9603
+
9604
+ /**
9605
+ * Clears the field making it undefined.
9606
+ * @return {!proto.cms.PromoItemRequest} returns this
9607
+ */
9608
+ proto.cms.PromoItemRequest.prototype.clearId = function() {
9609
+ return jspb.Message.setField(this, 1, undefined);
9610
+ };
9611
+
9612
+
9613
+ /**
9614
+ * Returns whether this field is set.
9615
+ * @return {boolean}
9616
+ */
9617
+ proto.cms.PromoItemRequest.prototype.hasId = function() {
9618
+ return jspb.Message.getField(this, 1) != null;
9619
+ };
9620
+
9621
+
9622
+ /**
9623
+ * optional string slug = 2;
9624
+ * @return {string}
9625
+ */
9626
+ proto.cms.PromoItemRequest.prototype.getSlug = function() {
9627
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
9628
+ };
9629
+
9630
+
9631
+ /**
9632
+ * @param {string} value
9633
+ * @return {!proto.cms.PromoItemRequest} returns this
9634
+ */
9635
+ proto.cms.PromoItemRequest.prototype.setSlug = function(value) {
9636
+ return jspb.Message.setField(this, 2, value);
9637
+ };
9638
+
9639
+
9640
+ /**
9641
+ * Clears the field making it undefined.
9642
+ * @return {!proto.cms.PromoItemRequest} returns this
9643
+ */
9644
+ proto.cms.PromoItemRequest.prototype.clearSlug = function() {
9645
+ return jspb.Message.setField(this, 2, undefined);
9646
+ };
9647
+
9648
+
9649
+ /**
9650
+ * Returns whether this field is set.
9651
+ * @return {boolean}
9652
+ */
9653
+ proto.cms.PromoItemRequest.prototype.hasSlug = function() {
9654
+ return jspb.Message.getField(this, 2) != null;
9655
+ };
9656
+
9657
+
9658
+ /**
9659
+ * optional string title = 3;
9660
+ * @return {string}
9661
+ */
9662
+ proto.cms.PromoItemRequest.prototype.getTitle = function() {
9663
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
9664
+ };
9665
+
9666
+
9667
+ /**
9668
+ * @param {string} value
9669
+ * @return {!proto.cms.PromoItemRequest} returns this
9670
+ */
9671
+ proto.cms.PromoItemRequest.prototype.setTitle = function(value) {
9672
+ return jspb.Message.setField(this, 3, value);
9673
+ };
9674
+
9675
+
9676
+ /**
9677
+ * Clears the field making it undefined.
9678
+ * @return {!proto.cms.PromoItemRequest} returns this
9679
+ */
9680
+ proto.cms.PromoItemRequest.prototype.clearTitle = function() {
9681
+ return jspb.Message.setField(this, 3, undefined);
9682
+ };
9683
+
9684
+
9685
+ /**
9686
+ * Returns whether this field is set.
9687
+ * @return {boolean}
9688
+ */
9689
+ proto.cms.PromoItemRequest.prototype.hasTitle = function() {
9690
+ return jspb.Message.getField(this, 3) != null;
9691
+ };
9692
+
9693
+
9694
+ /**
9695
+ * optional string geo = 4;
9696
+ * @return {string}
9697
+ */
9698
+ proto.cms.PromoItemRequest.prototype.getGeo = function() {
9699
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
9700
+ };
9701
+
9702
+
9703
+ /**
9704
+ * @param {string} value
9705
+ * @return {!proto.cms.PromoItemRequest} returns this
9706
+ */
9707
+ proto.cms.PromoItemRequest.prototype.setGeo = function(value) {
9708
+ return jspb.Message.setField(this, 4, value);
9709
+ };
9710
+
9711
+
9712
+ /**
9713
+ * Clears the field making it undefined.
9714
+ * @return {!proto.cms.PromoItemRequest} returns this
9715
+ */
9716
+ proto.cms.PromoItemRequest.prototype.clearGeo = function() {
9717
+ return jspb.Message.setField(this, 4, undefined);
9718
+ };
9719
+
9720
+
9721
+ /**
9722
+ * Returns whether this field is set.
9723
+ * @return {boolean}
9724
+ */
9725
+ proto.cms.PromoItemRequest.prototype.hasGeo = function() {
9726
+ return jspb.Message.getField(this, 4) != null;
9727
+ };
9728
+
9729
+
9730
+ /**
9731
+ * optional string anchor = 5;
9732
+ * @return {string}
9733
+ */
9734
+ proto.cms.PromoItemRequest.prototype.getAnchor = function() {
9735
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
9736
+ };
9737
+
9738
+
9739
+ /**
9740
+ * @param {string} value
9741
+ * @return {!proto.cms.PromoItemRequest} returns this
9742
+ */
9743
+ proto.cms.PromoItemRequest.prototype.setAnchor = function(value) {
9744
+ return jspb.Message.setField(this, 5, value);
9745
+ };
9746
+
9747
+
9748
+ /**
9749
+ * Clears the field making it undefined.
9750
+ * @return {!proto.cms.PromoItemRequest} returns this
9751
+ */
9752
+ proto.cms.PromoItemRequest.prototype.clearAnchor = function() {
9753
+ return jspb.Message.setField(this, 5, undefined);
9754
+ };
9755
+
9756
+
9757
+ /**
9758
+ * Returns whether this field is set.
9759
+ * @return {boolean}
9760
+ */
9761
+ proto.cms.PromoItemRequest.prototype.hasAnchor = function() {
9762
+ return jspb.Message.getField(this, 5) != null;
9763
+ };
9764
+
9765
+
9766
+ /**
9767
+ * optional int32 is_active = 6;
9768
+ * @return {number}
9769
+ */
9770
+ proto.cms.PromoItemRequest.prototype.getIsActive = function() {
9771
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
9772
+ };
9773
+
9774
+
9775
+ /**
9776
+ * @param {number} value
9777
+ * @return {!proto.cms.PromoItemRequest} returns this
9778
+ */
9779
+ proto.cms.PromoItemRequest.prototype.setIsActive = function(value) {
9780
+ return jspb.Message.setField(this, 6, value);
9781
+ };
9782
+
9783
+
9784
+ /**
9785
+ * Clears the field making it undefined.
9786
+ * @return {!proto.cms.PromoItemRequest} returns this
9787
+ */
9788
+ proto.cms.PromoItemRequest.prototype.clearIsActive = function() {
9789
+ return jspb.Message.setField(this, 6, undefined);
9790
+ };
9791
+
9792
+
9793
+ /**
9794
+ * Returns whether this field is set.
9795
+ * @return {boolean}
9796
+ */
9797
+ proto.cms.PromoItemRequest.prototype.hasIsActive = function() {
9798
+ return jspb.Message.getField(this, 6) != null;
9799
+ };
9800
+
9801
+
9802
+ /**
9803
+ * optional string started_at = 7;
9804
+ * @return {string}
9805
+ */
9806
+ proto.cms.PromoItemRequest.prototype.getStartedAt = function() {
9807
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
9808
+ };
9809
+
9810
+
9811
+ /**
9812
+ * @param {string} value
9813
+ * @return {!proto.cms.PromoItemRequest} returns this
9814
+ */
9815
+ proto.cms.PromoItemRequest.prototype.setStartedAt = function(value) {
9816
+ return jspb.Message.setField(this, 7, value);
9817
+ };
9818
+
9819
+
9820
+ /**
9821
+ * Clears the field making it undefined.
9822
+ * @return {!proto.cms.PromoItemRequest} returns this
9823
+ */
9824
+ proto.cms.PromoItemRequest.prototype.clearStartedAt = function() {
9825
+ return jspb.Message.setField(this, 7, undefined);
9826
+ };
9827
+
9828
+
9829
+ /**
9830
+ * Returns whether this field is set.
9831
+ * @return {boolean}
9832
+ */
9833
+ proto.cms.PromoItemRequest.prototype.hasStartedAt = function() {
9834
+ return jspb.Message.getField(this, 7) != null;
9835
+ };
9836
+
9837
+
9838
+ /**
9839
+ * optional string finished_at = 8;
9840
+ * @return {string}
9841
+ */
9842
+ proto.cms.PromoItemRequest.prototype.getFinishedAt = function() {
9843
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
9844
+ };
9845
+
9846
+
9847
+ /**
9848
+ * @param {string} value
9849
+ * @return {!proto.cms.PromoItemRequest} returns this
9850
+ */
9851
+ proto.cms.PromoItemRequest.prototype.setFinishedAt = function(value) {
9852
+ return jspb.Message.setField(this, 8, value);
9853
+ };
9854
+
9855
+
9856
+ /**
9857
+ * Clears the field making it undefined.
9858
+ * @return {!proto.cms.PromoItemRequest} returns this
9859
+ */
9860
+ proto.cms.PromoItemRequest.prototype.clearFinishedAt = function() {
9861
+ return jspb.Message.setField(this, 8, undefined);
9862
+ };
9863
+
9864
+
9865
+ /**
9866
+ * Returns whether this field is set.
9867
+ * @return {boolean}
9868
+ */
9869
+ proto.cms.PromoItemRequest.prototype.hasFinishedAt = function() {
9870
+ return jspb.Message.getField(this, 8) != null;
9871
+ };
9872
+
9873
+
9874
+
9875
+
9876
+
9877
+ if (jspb.Message.GENERATE_TO_OBJECT) {
9878
+ /**
9879
+ * Creates an object representation of this proto.
9880
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
9881
+ * Optional fields that are not set will be set to undefined.
9882
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
9883
+ * For the list of reserved names please see:
9884
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
9885
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
9886
+ * JSPB instance for transitional soy proto support:
9887
+ * http://goto/soy-param-migration
9888
+ * @return {!Object}
9889
+ */
9890
+ proto.cms.PromoItem.prototype.toObject = function(opt_includeInstance) {
9891
+ return proto.cms.PromoItem.toObject(opt_includeInstance, this);
9892
+ };
9893
+
9894
+
9895
+ /**
9896
+ * Static version of the {@see toObject} method.
9897
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
9898
+ * the JSPB instance for transitional soy proto support:
9899
+ * http://goto/soy-param-migration
9900
+ * @param {!proto.cms.PromoItem} msg The msg instance to transform.
9901
+ * @return {!Object}
9902
+ * @suppress {unusedLocalVariables} f is only used for nested messages
9903
+ */
9904
+ proto.cms.PromoItem.toObject = function(includeInstance, msg) {
9905
+ var f, obj = {
9906
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
9907
+ slug: jspb.Message.getFieldWithDefault(msg, 2, ""),
9908
+ title: jspb.Message.getFieldWithDefault(msg, 3, ""),
9909
+ geo: jspb.Message.getFieldWithDefault(msg, 4, ""),
9910
+ anchor: jspb.Message.getFieldWithDefault(msg, 5, ""),
9911
+ isActive: jspb.Message.getFieldWithDefault(msg, 6, 0),
9912
+ startedAt: jspb.Message.getFieldWithDefault(msg, 7, ""),
9913
+ finishedAt: jspb.Message.getFieldWithDefault(msg, 8, ""),
9914
+ imageBig: jspb.Message.getFieldWithDefault(msg, 9, ""),
9915
+ imageSmall: jspb.Message.getFieldWithDefault(msg, 10, "")
9916
+ };
9917
+
9918
+ if (includeInstance) {
9919
+ obj.$jspbMessageInstance = msg;
9920
+ }
9921
+ return obj;
9922
+ };
9923
+ }
9924
+
9925
+
9926
+ /**
9927
+ * Deserializes binary data (in protobuf wire format).
9928
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
9929
+ * @return {!proto.cms.PromoItem}
9930
+ */
9931
+ proto.cms.PromoItem.deserializeBinary = function(bytes) {
9932
+ var reader = new jspb.BinaryReader(bytes);
9933
+ var msg = new proto.cms.PromoItem;
9934
+ return proto.cms.PromoItem.deserializeBinaryFromReader(msg, reader);
9935
+ };
9936
+
9937
+
9938
+ /**
9939
+ * Deserializes binary data (in protobuf wire format) from the
9940
+ * given reader into the given message object.
9941
+ * @param {!proto.cms.PromoItem} msg The message object to deserialize into.
9942
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
9943
+ * @return {!proto.cms.PromoItem}
9944
+ */
9945
+ proto.cms.PromoItem.deserializeBinaryFromReader = function(msg, reader) {
9946
+ while (reader.nextField()) {
9947
+ if (reader.isEndGroup()) {
9948
+ break;
9949
+ }
9950
+ var field = reader.getFieldNumber();
9951
+ switch (field) {
9952
+ case 1:
9953
+ var value = /** @type {number} */ (reader.readInt32());
9954
+ msg.setId(value);
9955
+ break;
9956
+ case 2:
9957
+ var value = /** @type {string} */ (reader.readString());
9958
+ msg.setSlug(value);
9959
+ break;
9960
+ case 3:
9961
+ var value = /** @type {string} */ (reader.readString());
9962
+ msg.setTitle(value);
9963
+ break;
9964
+ case 4:
9965
+ var value = /** @type {string} */ (reader.readString());
9966
+ msg.setGeo(value);
9967
+ break;
9968
+ case 5:
9969
+ var value = /** @type {string} */ (reader.readString());
9970
+ msg.setAnchor(value);
9971
+ break;
9972
+ case 6:
9973
+ var value = /** @type {number} */ (reader.readInt32());
9974
+ msg.setIsActive(value);
9975
+ break;
9976
+ case 7:
9977
+ var value = /** @type {string} */ (reader.readString());
9978
+ msg.setStartedAt(value);
9979
+ break;
9980
+ case 8:
9981
+ var value = /** @type {string} */ (reader.readString());
9982
+ msg.setFinishedAt(value);
9983
+ break;
9984
+ case 9:
9985
+ var value = /** @type {string} */ (reader.readString());
9986
+ msg.setImageBig(value);
9987
+ break;
9988
+ case 10:
9989
+ var value = /** @type {string} */ (reader.readString());
9990
+ msg.setImageSmall(value);
9991
+ break;
9992
+ default:
9993
+ reader.skipField();
9994
+ break;
9995
+ }
9996
+ }
9997
+ return msg;
9998
+ };
9999
+
10000
+
10001
+ /**
10002
+ * Serializes the message to binary data (in protobuf wire format).
10003
+ * @return {!Uint8Array}
10004
+ */
10005
+ proto.cms.PromoItem.prototype.serializeBinary = function() {
10006
+ var writer = new jspb.BinaryWriter();
10007
+ proto.cms.PromoItem.serializeBinaryToWriter(this, writer);
10008
+ return writer.getResultBuffer();
10009
+ };
10010
+
10011
+
10012
+ /**
10013
+ * Serializes the given message to binary data (in protobuf wire
10014
+ * format), writing to the given BinaryWriter.
10015
+ * @param {!proto.cms.PromoItem} message
10016
+ * @param {!jspb.BinaryWriter} writer
10017
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10018
+ */
10019
+ proto.cms.PromoItem.serializeBinaryToWriter = function(message, writer) {
10020
+ var f = undefined;
10021
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
10022
+ if (f != null) {
10023
+ writer.writeInt32(
10024
+ 1,
10025
+ f
10026
+ );
10027
+ }
10028
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
10029
+ if (f != null) {
10030
+ writer.writeString(
10031
+ 2,
10032
+ f
10033
+ );
10034
+ }
10035
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
10036
+ if (f != null) {
10037
+ writer.writeString(
10038
+ 3,
10039
+ f
10040
+ );
10041
+ }
10042
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
10043
+ if (f != null) {
10044
+ writer.writeString(
10045
+ 4,
10046
+ f
10047
+ );
10048
+ }
10049
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
10050
+ if (f != null) {
10051
+ writer.writeString(
10052
+ 5,
10053
+ f
10054
+ );
10055
+ }
10056
+ f = /** @type {number} */ (jspb.Message.getField(message, 6));
10057
+ if (f != null) {
10058
+ writer.writeInt32(
10059
+ 6,
10060
+ f
10061
+ );
10062
+ }
10063
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
10064
+ if (f != null) {
10065
+ writer.writeString(
10066
+ 7,
10067
+ f
10068
+ );
10069
+ }
10070
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
10071
+ if (f != null) {
10072
+ writer.writeString(
10073
+ 8,
10074
+ f
10075
+ );
10076
+ }
10077
+ f = /** @type {string} */ (jspb.Message.getField(message, 9));
10078
+ if (f != null) {
10079
+ writer.writeString(
10080
+ 9,
10081
+ f
10082
+ );
10083
+ }
10084
+ f = /** @type {string} */ (jspb.Message.getField(message, 10));
10085
+ if (f != null) {
10086
+ writer.writeString(
10087
+ 10,
10088
+ f
10089
+ );
10090
+ }
10091
+ };
10092
+
10093
+
10094
+ /**
10095
+ * optional int32 id = 1;
10096
+ * @return {number}
10097
+ */
10098
+ proto.cms.PromoItem.prototype.getId = function() {
10099
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10100
+ };
10101
+
10102
+
10103
+ /**
10104
+ * @param {number} value
10105
+ * @return {!proto.cms.PromoItem} returns this
10106
+ */
10107
+ proto.cms.PromoItem.prototype.setId = function(value) {
10108
+ return jspb.Message.setField(this, 1, value);
10109
+ };
10110
+
10111
+
10112
+ /**
10113
+ * Clears the field making it undefined.
10114
+ * @return {!proto.cms.PromoItem} returns this
10115
+ */
10116
+ proto.cms.PromoItem.prototype.clearId = function() {
10117
+ return jspb.Message.setField(this, 1, undefined);
10118
+ };
10119
+
10120
+
10121
+ /**
10122
+ * Returns whether this field is set.
10123
+ * @return {boolean}
10124
+ */
10125
+ proto.cms.PromoItem.prototype.hasId = function() {
10126
+ return jspb.Message.getField(this, 1) != null;
10127
+ };
10128
+
10129
+
10130
+ /**
10131
+ * optional string slug = 2;
10132
+ * @return {string}
10133
+ */
10134
+ proto.cms.PromoItem.prototype.getSlug = function() {
10135
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
10136
+ };
10137
+
10138
+
10139
+ /**
10140
+ * @param {string} value
10141
+ * @return {!proto.cms.PromoItem} returns this
10142
+ */
10143
+ proto.cms.PromoItem.prototype.setSlug = function(value) {
10144
+ return jspb.Message.setField(this, 2, value);
10145
+ };
10146
+
10147
+
10148
+ /**
10149
+ * Clears the field making it undefined.
10150
+ * @return {!proto.cms.PromoItem} returns this
10151
+ */
10152
+ proto.cms.PromoItem.prototype.clearSlug = function() {
10153
+ return jspb.Message.setField(this, 2, undefined);
10154
+ };
10155
+
10156
+
10157
+ /**
10158
+ * Returns whether this field is set.
10159
+ * @return {boolean}
10160
+ */
10161
+ proto.cms.PromoItem.prototype.hasSlug = function() {
10162
+ return jspb.Message.getField(this, 2) != null;
10163
+ };
10164
+
10165
+
10166
+ /**
10167
+ * optional string title = 3;
10168
+ * @return {string}
10169
+ */
10170
+ proto.cms.PromoItem.prototype.getTitle = function() {
10171
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
10172
+ };
10173
+
10174
+
10175
+ /**
10176
+ * @param {string} value
10177
+ * @return {!proto.cms.PromoItem} returns this
10178
+ */
10179
+ proto.cms.PromoItem.prototype.setTitle = function(value) {
10180
+ return jspb.Message.setField(this, 3, value);
10181
+ };
10182
+
10183
+
10184
+ /**
10185
+ * Clears the field making it undefined.
10186
+ * @return {!proto.cms.PromoItem} returns this
10187
+ */
10188
+ proto.cms.PromoItem.prototype.clearTitle = function() {
10189
+ return jspb.Message.setField(this, 3, undefined);
10190
+ };
10191
+
10192
+
10193
+ /**
10194
+ * Returns whether this field is set.
10195
+ * @return {boolean}
10196
+ */
10197
+ proto.cms.PromoItem.prototype.hasTitle = function() {
10198
+ return jspb.Message.getField(this, 3) != null;
10199
+ };
10200
+
10201
+
10202
+ /**
10203
+ * optional string geo = 4;
10204
+ * @return {string}
10205
+ */
10206
+ proto.cms.PromoItem.prototype.getGeo = function() {
10207
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
10208
+ };
10209
+
10210
+
10211
+ /**
10212
+ * @param {string} value
10213
+ * @return {!proto.cms.PromoItem} returns this
10214
+ */
10215
+ proto.cms.PromoItem.prototype.setGeo = function(value) {
10216
+ return jspb.Message.setField(this, 4, value);
10217
+ };
10218
+
10219
+
10220
+ /**
10221
+ * Clears the field making it undefined.
10222
+ * @return {!proto.cms.PromoItem} returns this
10223
+ */
10224
+ proto.cms.PromoItem.prototype.clearGeo = function() {
10225
+ return jspb.Message.setField(this, 4, undefined);
10226
+ };
10227
+
10228
+
10229
+ /**
10230
+ * Returns whether this field is set.
10231
+ * @return {boolean}
10232
+ */
10233
+ proto.cms.PromoItem.prototype.hasGeo = function() {
10234
+ return jspb.Message.getField(this, 4) != null;
10235
+ };
10236
+
10237
+
10238
+ /**
10239
+ * optional string anchor = 5;
10240
+ * @return {string}
10241
+ */
10242
+ proto.cms.PromoItem.prototype.getAnchor = function() {
10243
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
10244
+ };
10245
+
10246
+
10247
+ /**
10248
+ * @param {string} value
10249
+ * @return {!proto.cms.PromoItem} returns this
10250
+ */
10251
+ proto.cms.PromoItem.prototype.setAnchor = function(value) {
10252
+ return jspb.Message.setField(this, 5, value);
10253
+ };
10254
+
10255
+
10256
+ /**
10257
+ * Clears the field making it undefined.
10258
+ * @return {!proto.cms.PromoItem} returns this
10259
+ */
10260
+ proto.cms.PromoItem.prototype.clearAnchor = function() {
10261
+ return jspb.Message.setField(this, 5, undefined);
10262
+ };
10263
+
10264
+
10265
+ /**
10266
+ * Returns whether this field is set.
10267
+ * @return {boolean}
10268
+ */
10269
+ proto.cms.PromoItem.prototype.hasAnchor = function() {
10270
+ return jspb.Message.getField(this, 5) != null;
10271
+ };
10272
+
10273
+
10274
+ /**
10275
+ * optional int32 is_active = 6;
10276
+ * @return {number}
10277
+ */
10278
+ proto.cms.PromoItem.prototype.getIsActive = function() {
10279
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
10280
+ };
10281
+
10282
+
10283
+ /**
10284
+ * @param {number} value
10285
+ * @return {!proto.cms.PromoItem} returns this
10286
+ */
10287
+ proto.cms.PromoItem.prototype.setIsActive = function(value) {
10288
+ return jspb.Message.setField(this, 6, value);
10289
+ };
10290
+
10291
+
10292
+ /**
10293
+ * Clears the field making it undefined.
10294
+ * @return {!proto.cms.PromoItem} returns this
10295
+ */
10296
+ proto.cms.PromoItem.prototype.clearIsActive = function() {
10297
+ return jspb.Message.setField(this, 6, undefined);
10298
+ };
10299
+
10300
+
10301
+ /**
10302
+ * Returns whether this field is set.
10303
+ * @return {boolean}
10304
+ */
10305
+ proto.cms.PromoItem.prototype.hasIsActive = function() {
10306
+ return jspb.Message.getField(this, 6) != null;
10307
+ };
10308
+
10309
+
10310
+ /**
10311
+ * optional string started_at = 7;
10312
+ * @return {string}
10313
+ */
10314
+ proto.cms.PromoItem.prototype.getStartedAt = function() {
10315
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
10316
+ };
10317
+
10318
+
10319
+ /**
10320
+ * @param {string} value
10321
+ * @return {!proto.cms.PromoItem} returns this
10322
+ */
10323
+ proto.cms.PromoItem.prototype.setStartedAt = function(value) {
10324
+ return jspb.Message.setField(this, 7, value);
10325
+ };
10326
+
10327
+
10328
+ /**
10329
+ * Clears the field making it undefined.
10330
+ * @return {!proto.cms.PromoItem} returns this
10331
+ */
10332
+ proto.cms.PromoItem.prototype.clearStartedAt = function() {
10333
+ return jspb.Message.setField(this, 7, undefined);
10334
+ };
10335
+
10336
+
10337
+ /**
10338
+ * Returns whether this field is set.
10339
+ * @return {boolean}
10340
+ */
10341
+ proto.cms.PromoItem.prototype.hasStartedAt = function() {
10342
+ return jspb.Message.getField(this, 7) != null;
10343
+ };
10344
+
10345
+
10346
+ /**
10347
+ * optional string finished_at = 8;
10348
+ * @return {string}
10349
+ */
10350
+ proto.cms.PromoItem.prototype.getFinishedAt = function() {
10351
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
10352
+ };
10353
+
10354
+
10355
+ /**
10356
+ * @param {string} value
10357
+ * @return {!proto.cms.PromoItem} returns this
10358
+ */
10359
+ proto.cms.PromoItem.prototype.setFinishedAt = function(value) {
10360
+ return jspb.Message.setField(this, 8, value);
10361
+ };
10362
+
10363
+
10364
+ /**
10365
+ * Clears the field making it undefined.
10366
+ * @return {!proto.cms.PromoItem} returns this
10367
+ */
10368
+ proto.cms.PromoItem.prototype.clearFinishedAt = function() {
10369
+ return jspb.Message.setField(this, 8, undefined);
10370
+ };
10371
+
10372
+
10373
+ /**
10374
+ * Returns whether this field is set.
10375
+ * @return {boolean}
10376
+ */
10377
+ proto.cms.PromoItem.prototype.hasFinishedAt = function() {
10378
+ return jspb.Message.getField(this, 8) != null;
10379
+ };
10380
+
10381
+
10382
+ /**
10383
+ * optional string image_big = 9;
10384
+ * @return {string}
10385
+ */
10386
+ proto.cms.PromoItem.prototype.getImageBig = function() {
10387
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
10388
+ };
10389
+
10390
+
10391
+ /**
10392
+ * @param {string} value
10393
+ * @return {!proto.cms.PromoItem} returns this
10394
+ */
10395
+ proto.cms.PromoItem.prototype.setImageBig = function(value) {
10396
+ return jspb.Message.setField(this, 9, value);
10397
+ };
10398
+
10399
+
10400
+ /**
10401
+ * Clears the field making it undefined.
10402
+ * @return {!proto.cms.PromoItem} returns this
10403
+ */
10404
+ proto.cms.PromoItem.prototype.clearImageBig = function() {
10405
+ return jspb.Message.setField(this, 9, undefined);
10406
+ };
10407
+
10408
+
10409
+ /**
10410
+ * Returns whether this field is set.
10411
+ * @return {boolean}
10412
+ */
10413
+ proto.cms.PromoItem.prototype.hasImageBig = function() {
10414
+ return jspb.Message.getField(this, 9) != null;
10415
+ };
10416
+
10417
+
10418
+ /**
10419
+ * optional string image_small = 10;
10420
+ * @return {string}
10421
+ */
10422
+ proto.cms.PromoItem.prototype.getImageSmall = function() {
10423
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
10424
+ };
10425
+
10426
+
10427
+ /**
10428
+ * @param {string} value
10429
+ * @return {!proto.cms.PromoItem} returns this
10430
+ */
10431
+ proto.cms.PromoItem.prototype.setImageSmall = function(value) {
10432
+ return jspb.Message.setField(this, 10, value);
10433
+ };
10434
+
10435
+
10436
+ /**
10437
+ * Clears the field making it undefined.
10438
+ * @return {!proto.cms.PromoItem} returns this
10439
+ */
10440
+ proto.cms.PromoItem.prototype.clearImageSmall = function() {
10441
+ return jspb.Message.setField(this, 10, undefined);
10442
+ };
10443
+
10444
+
10445
+ /**
10446
+ * Returns whether this field is set.
10447
+ * @return {boolean}
10448
+ */
10449
+ proto.cms.PromoItem.prototype.hasImageSmall = function() {
10450
+ return jspb.Message.getField(this, 10) != null;
10451
+ };
10452
+
10453
+
10454
+
10455
+
10456
+
10457
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10458
+ /**
10459
+ * Creates an object representation of this proto.
10460
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10461
+ * Optional fields that are not set will be set to undefined.
10462
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10463
+ * For the list of reserved names please see:
10464
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10465
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10466
+ * JSPB instance for transitional soy proto support:
10467
+ * http://goto/soy-param-migration
10468
+ * @return {!Object}
10469
+ */
10470
+ proto.cms.PromoResponse.prototype.toObject = function(opt_includeInstance) {
10471
+ return proto.cms.PromoResponse.toObject(opt_includeInstance, this);
10472
+ };
10473
+
10474
+
10475
+ /**
10476
+ * Static version of the {@see toObject} method.
10477
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10478
+ * the JSPB instance for transitional soy proto support:
10479
+ * http://goto/soy-param-migration
10480
+ * @param {!proto.cms.PromoResponse} msg The msg instance to transform.
10481
+ * @return {!Object}
10482
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10483
+ */
10484
+ proto.cms.PromoResponse.toObject = function(includeInstance, msg) {
10485
+ var f, obj = {
10486
+ data: (f = msg.getData()) && proto.cms.PromoItem.toObject(includeInstance, f)
10487
+ };
10488
+
10489
+ if (includeInstance) {
10490
+ obj.$jspbMessageInstance = msg;
10491
+ }
10492
+ return obj;
10493
+ };
10494
+ }
10495
+
10496
+
10497
+ /**
10498
+ * Deserializes binary data (in protobuf wire format).
10499
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10500
+ * @return {!proto.cms.PromoResponse}
10501
+ */
10502
+ proto.cms.PromoResponse.deserializeBinary = function(bytes) {
10503
+ var reader = new jspb.BinaryReader(bytes);
10504
+ var msg = new proto.cms.PromoResponse;
10505
+ return proto.cms.PromoResponse.deserializeBinaryFromReader(msg, reader);
10506
+ };
10507
+
10508
+
10509
+ /**
10510
+ * Deserializes binary data (in protobuf wire format) from the
10511
+ * given reader into the given message object.
10512
+ * @param {!proto.cms.PromoResponse} msg The message object to deserialize into.
10513
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10514
+ * @return {!proto.cms.PromoResponse}
10515
+ */
10516
+ proto.cms.PromoResponse.deserializeBinaryFromReader = function(msg, reader) {
10517
+ while (reader.nextField()) {
10518
+ if (reader.isEndGroup()) {
10519
+ break;
10520
+ }
10521
+ var field = reader.getFieldNumber();
10522
+ switch (field) {
10523
+ case 1:
10524
+ var value = new proto.cms.PromoItem;
10525
+ reader.readMessage(value,proto.cms.PromoItem.deserializeBinaryFromReader);
10526
+ msg.setData(value);
10527
+ break;
10528
+ default:
10529
+ reader.skipField();
10530
+ break;
10531
+ }
10532
+ }
10533
+ return msg;
10534
+ };
10535
+
10536
+
10537
+ /**
10538
+ * Serializes the message to binary data (in protobuf wire format).
10539
+ * @return {!Uint8Array}
10540
+ */
10541
+ proto.cms.PromoResponse.prototype.serializeBinary = function() {
10542
+ var writer = new jspb.BinaryWriter();
10543
+ proto.cms.PromoResponse.serializeBinaryToWriter(this, writer);
10544
+ return writer.getResultBuffer();
10545
+ };
10546
+
10547
+
10548
+ /**
10549
+ * Serializes the given message to binary data (in protobuf wire
10550
+ * format), writing to the given BinaryWriter.
10551
+ * @param {!proto.cms.PromoResponse} message
10552
+ * @param {!jspb.BinaryWriter} writer
10553
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10554
+ */
10555
+ proto.cms.PromoResponse.serializeBinaryToWriter = function(message, writer) {
10556
+ var f = undefined;
10557
+ f = message.getData();
10558
+ if (f != null) {
10559
+ writer.writeMessage(
10560
+ 1,
10561
+ f,
10562
+ proto.cms.PromoItem.serializeBinaryToWriter
10563
+ );
10564
+ }
10565
+ };
10566
+
10567
+
10568
+ /**
10569
+ * optional PromoItem data = 1;
10570
+ * @return {?proto.cms.PromoItem}
10571
+ */
10572
+ proto.cms.PromoResponse.prototype.getData = function() {
10573
+ return /** @type{?proto.cms.PromoItem} */ (
10574
+ jspb.Message.getWrapperField(this, proto.cms.PromoItem, 1));
10575
+ };
10576
+
10577
+
10578
+ /**
10579
+ * @param {?proto.cms.PromoItem|undefined} value
10580
+ * @return {!proto.cms.PromoResponse} returns this
10581
+ */
10582
+ proto.cms.PromoResponse.prototype.setData = function(value) {
10583
+ return jspb.Message.setWrapperField(this, 1, value);
10584
+ };
10585
+
10586
+
10587
+ /**
10588
+ * Clears the message field making it undefined.
10589
+ * @return {!proto.cms.PromoResponse} returns this
10590
+ */
10591
+ proto.cms.PromoResponse.prototype.clearData = function() {
10592
+ return this.setData(undefined);
10593
+ };
10594
+
10595
+
10596
+ /**
10597
+ * Returns whether this field is set.
10598
+ * @return {boolean}
10599
+ */
10600
+ proto.cms.PromoResponse.prototype.hasData = function() {
10601
+ return jspb.Message.getField(this, 1) != null;
10602
+ };
10603
+
10604
+
10605
+
10606
+
10607
+
10608
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10609
+ /**
10610
+ * Creates an object representation of this proto.
10611
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10612
+ * Optional fields that are not set will be set to undefined.
10613
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10614
+ * For the list of reserved names please see:
10615
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10616
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10617
+ * JSPB instance for transitional soy proto support:
10618
+ * http://goto/soy-param-migration
10619
+ * @return {!Object}
10620
+ */
10621
+ proto.cms.GetPromoRequest.prototype.toObject = function(opt_includeInstance) {
10622
+ return proto.cms.GetPromoRequest.toObject(opt_includeInstance, this);
10623
+ };
10624
+
10625
+
10626
+ /**
10627
+ * Static version of the {@see toObject} method.
10628
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10629
+ * the JSPB instance for transitional soy proto support:
10630
+ * http://goto/soy-param-migration
10631
+ * @param {!proto.cms.GetPromoRequest} msg The msg instance to transform.
10632
+ * @return {!Object}
10633
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10634
+ */
10635
+ proto.cms.GetPromoRequest.toObject = function(includeInstance, msg) {
10636
+ var f, obj = {
10637
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
10638
+ adminSide: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
10639
+ };
10640
+
10641
+ if (includeInstance) {
10642
+ obj.$jspbMessageInstance = msg;
10643
+ }
10644
+ return obj;
10645
+ };
10646
+ }
10647
+
10648
+
10649
+ /**
10650
+ * Deserializes binary data (in protobuf wire format).
10651
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10652
+ * @return {!proto.cms.GetPromoRequest}
10653
+ */
10654
+ proto.cms.GetPromoRequest.deserializeBinary = function(bytes) {
10655
+ var reader = new jspb.BinaryReader(bytes);
10656
+ var msg = new proto.cms.GetPromoRequest;
10657
+ return proto.cms.GetPromoRequest.deserializeBinaryFromReader(msg, reader);
10658
+ };
10659
+
10660
+
10661
+ /**
10662
+ * Deserializes binary data (in protobuf wire format) from the
10663
+ * given reader into the given message object.
10664
+ * @param {!proto.cms.GetPromoRequest} msg The message object to deserialize into.
10665
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10666
+ * @return {!proto.cms.GetPromoRequest}
10667
+ */
10668
+ proto.cms.GetPromoRequest.deserializeBinaryFromReader = function(msg, reader) {
10669
+ while (reader.nextField()) {
10670
+ if (reader.isEndGroup()) {
10671
+ break;
10672
+ }
10673
+ var field = reader.getFieldNumber();
10674
+ switch (field) {
10675
+ case 1:
10676
+ var value = /** @type {number} */ (reader.readInt32());
10677
+ msg.setId(value);
10678
+ break;
10679
+ case 4:
10680
+ var value = /** @type {boolean} */ (reader.readBool());
10681
+ msg.setAdminSide(value);
10682
+ break;
10683
+ default:
10684
+ reader.skipField();
10685
+ break;
10686
+ }
10687
+ }
10688
+ return msg;
10689
+ };
10690
+
10691
+
10692
+ /**
10693
+ * Serializes the message to binary data (in protobuf wire format).
10694
+ * @return {!Uint8Array}
10695
+ */
10696
+ proto.cms.GetPromoRequest.prototype.serializeBinary = function() {
10697
+ var writer = new jspb.BinaryWriter();
10698
+ proto.cms.GetPromoRequest.serializeBinaryToWriter(this, writer);
10699
+ return writer.getResultBuffer();
10700
+ };
10701
+
10702
+
10703
+ /**
10704
+ * Serializes the given message to binary data (in protobuf wire
10705
+ * format), writing to the given BinaryWriter.
10706
+ * @param {!proto.cms.GetPromoRequest} message
10707
+ * @param {!jspb.BinaryWriter} writer
10708
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10709
+ */
10710
+ proto.cms.GetPromoRequest.serializeBinaryToWriter = function(message, writer) {
10711
+ var f = undefined;
10712
+ f = message.getId();
10713
+ if (f !== 0) {
10714
+ writer.writeInt32(
10715
+ 1,
10716
+ f
10717
+ );
10718
+ }
10719
+ f = /** @type {boolean} */ (jspb.Message.getField(message, 4));
10720
+ if (f != null) {
10721
+ writer.writeBool(
10722
+ 4,
10723
+ f
10724
+ );
10725
+ }
10726
+ };
10727
+
10728
+
10729
+ /**
10730
+ * optional int32 id = 1;
10731
+ * @return {number}
10732
+ */
10733
+ proto.cms.GetPromoRequest.prototype.getId = function() {
10734
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
10735
+ };
10736
+
10737
+
10738
+ /**
10739
+ * @param {number} value
10740
+ * @return {!proto.cms.GetPromoRequest} returns this
10741
+ */
10742
+ proto.cms.GetPromoRequest.prototype.setId = function(value) {
10743
+ return jspb.Message.setProto3IntField(this, 1, value);
10744
+ };
10745
+
10746
+
10747
+ /**
10748
+ * optional bool admin_side = 4;
10749
+ * @return {boolean}
10750
+ */
10751
+ proto.cms.GetPromoRequest.prototype.getAdminSide = function() {
10752
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
10753
+ };
10754
+
10755
+
10756
+ /**
10757
+ * @param {boolean} value
10758
+ * @return {!proto.cms.GetPromoRequest} returns this
10759
+ */
10760
+ proto.cms.GetPromoRequest.prototype.setAdminSide = function(value) {
10761
+ return jspb.Message.setField(this, 4, value);
10762
+ };
10763
+
10764
+
10765
+ /**
10766
+ * Clears the field making it undefined.
10767
+ * @return {!proto.cms.GetPromoRequest} returns this
10768
+ */
10769
+ proto.cms.GetPromoRequest.prototype.clearAdminSide = function() {
10770
+ return jspb.Message.setField(this, 4, undefined);
10771
+ };
10772
+
10773
+
10774
+ /**
10775
+ * Returns whether this field is set.
10776
+ * @return {boolean}
10777
+ */
10778
+ proto.cms.GetPromoRequest.prototype.hasAdminSide = function() {
10779
+ return jspb.Message.getField(this, 4) != null;
10780
+ };
10781
+
10782
+
10783
+
10784
+
10785
+
10786
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10787
+ /**
10788
+ * Creates an object representation of this proto.
10789
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10790
+ * Optional fields that are not set will be set to undefined.
10791
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10792
+ * For the list of reserved names please see:
10793
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10794
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10795
+ * JSPB instance for transitional soy proto support:
10796
+ * http://goto/soy-param-migration
10797
+ * @return {!Object}
10798
+ */
10799
+ proto.cms.PromoStatusResponse.prototype.toObject = function(opt_includeInstance) {
10800
+ return proto.cms.PromoStatusResponse.toObject(opt_includeInstance, this);
10801
+ };
10802
+
10803
+
10804
+ /**
10805
+ * Static version of the {@see toObject} method.
10806
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10807
+ * the JSPB instance for transitional soy proto support:
10808
+ * http://goto/soy-param-migration
10809
+ * @param {!proto.cms.PromoStatusResponse} msg The msg instance to transform.
10810
+ * @return {!Object}
10811
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10812
+ */
10813
+ proto.cms.PromoStatusResponse.toObject = function(includeInstance, msg) {
10814
+ var f, obj = {
10815
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
10816
+ };
10817
+
10818
+ if (includeInstance) {
10819
+ obj.$jspbMessageInstance = msg;
10820
+ }
10821
+ return obj;
10822
+ };
10823
+ }
10824
+
10825
+
10826
+ /**
10827
+ * Deserializes binary data (in protobuf wire format).
10828
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10829
+ * @return {!proto.cms.PromoStatusResponse}
10830
+ */
10831
+ proto.cms.PromoStatusResponse.deserializeBinary = function(bytes) {
10832
+ var reader = new jspb.BinaryReader(bytes);
10833
+ var msg = new proto.cms.PromoStatusResponse;
10834
+ return proto.cms.PromoStatusResponse.deserializeBinaryFromReader(msg, reader);
10835
+ };
10836
+
10837
+
10838
+ /**
10839
+ * Deserializes binary data (in protobuf wire format) from the
10840
+ * given reader into the given message object.
10841
+ * @param {!proto.cms.PromoStatusResponse} msg The message object to deserialize into.
10842
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10843
+ * @return {!proto.cms.PromoStatusResponse}
10844
+ */
10845
+ proto.cms.PromoStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
10846
+ while (reader.nextField()) {
10847
+ if (reader.isEndGroup()) {
10848
+ break;
10849
+ }
10850
+ var field = reader.getFieldNumber();
10851
+ switch (field) {
10852
+ case 1:
10853
+ var value = /** @type {string} */ (reader.readString());
10854
+ msg.setStatus(value);
10855
+ break;
10856
+ default:
10857
+ reader.skipField();
10858
+ break;
10859
+ }
10860
+ }
10861
+ return msg;
10862
+ };
10863
+
10864
+
10865
+ /**
10866
+ * Serializes the message to binary data (in protobuf wire format).
10867
+ * @return {!Uint8Array}
10868
+ */
10869
+ proto.cms.PromoStatusResponse.prototype.serializeBinary = function() {
10870
+ var writer = new jspb.BinaryWriter();
10871
+ proto.cms.PromoStatusResponse.serializeBinaryToWriter(this, writer);
10872
+ return writer.getResultBuffer();
10873
+ };
10874
+
10875
+
10876
+ /**
10877
+ * Serializes the given message to binary data (in protobuf wire
10878
+ * format), writing to the given BinaryWriter.
10879
+ * @param {!proto.cms.PromoStatusResponse} message
10880
+ * @param {!jspb.BinaryWriter} writer
10881
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10882
+ */
10883
+ proto.cms.PromoStatusResponse.serializeBinaryToWriter = function(message, writer) {
10884
+ var f = undefined;
10885
+ f = message.getStatus();
10886
+ if (f.length > 0) {
10887
+ writer.writeString(
10888
+ 1,
10889
+ f
10890
+ );
10891
+ }
10892
+ };
10893
+
10894
+
10895
+ /**
10896
+ * optional string status = 1;
10897
+ * @return {string}
10898
+ */
10899
+ proto.cms.PromoStatusResponse.prototype.getStatus = function() {
10900
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
10901
+ };
10902
+
10903
+
10904
+ /**
10905
+ * @param {string} value
10906
+ * @return {!proto.cms.PromoStatusResponse} returns this
10907
+ */
10908
+ proto.cms.PromoStatusResponse.prototype.setStatus = function(value) {
10909
+ return jspb.Message.setProto3StringField(this, 1, value);
10910
+ };
10911
+
10912
+
10913
+
10914
+ /**
10915
+ * List of repeated fields within this message type.
10916
+ * @private {!Array<number>}
10917
+ * @const
10918
+ */
10919
+ proto.cms.PromosItemsResponse.repeatedFields_ = [1];
10920
+
10921
+
10922
+
10923
+ if (jspb.Message.GENERATE_TO_OBJECT) {
10924
+ /**
10925
+ * Creates an object representation of this proto.
10926
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
10927
+ * Optional fields that are not set will be set to undefined.
10928
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
10929
+ * For the list of reserved names please see:
10930
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
10931
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
10932
+ * JSPB instance for transitional soy proto support:
10933
+ * http://goto/soy-param-migration
10934
+ * @return {!Object}
10935
+ */
10936
+ proto.cms.PromosItemsResponse.prototype.toObject = function(opt_includeInstance) {
10937
+ return proto.cms.PromosItemsResponse.toObject(opt_includeInstance, this);
10938
+ };
10939
+
10940
+
10941
+ /**
10942
+ * Static version of the {@see toObject} method.
10943
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
10944
+ * the JSPB instance for transitional soy proto support:
10945
+ * http://goto/soy-param-migration
10946
+ * @param {!proto.cms.PromosItemsResponse} msg The msg instance to transform.
10947
+ * @return {!Object}
10948
+ * @suppress {unusedLocalVariables} f is only used for nested messages
10949
+ */
10950
+ proto.cms.PromosItemsResponse.toObject = function(includeInstance, msg) {
10951
+ var f, obj = {
10952
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
10953
+ proto.cms.PromoItem.toObject, includeInstance),
10954
+ totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
10955
+ totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
10956
+ };
10957
+
10958
+ if (includeInstance) {
10959
+ obj.$jspbMessageInstance = msg;
10960
+ }
10961
+ return obj;
10962
+ };
10963
+ }
10964
+
10965
+
10966
+ /**
10967
+ * Deserializes binary data (in protobuf wire format).
10968
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
10969
+ * @return {!proto.cms.PromosItemsResponse}
10970
+ */
10971
+ proto.cms.PromosItemsResponse.deserializeBinary = function(bytes) {
10972
+ var reader = new jspb.BinaryReader(bytes);
10973
+ var msg = new proto.cms.PromosItemsResponse;
10974
+ return proto.cms.PromosItemsResponse.deserializeBinaryFromReader(msg, reader);
10975
+ };
10976
+
10977
+
10978
+ /**
10979
+ * Deserializes binary data (in protobuf wire format) from the
10980
+ * given reader into the given message object.
10981
+ * @param {!proto.cms.PromosItemsResponse} msg The message object to deserialize into.
10982
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
10983
+ * @return {!proto.cms.PromosItemsResponse}
10984
+ */
10985
+ proto.cms.PromosItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
10986
+ while (reader.nextField()) {
10987
+ if (reader.isEndGroup()) {
10988
+ break;
10989
+ }
10990
+ var field = reader.getFieldNumber();
10991
+ switch (field) {
10992
+ case 1:
10993
+ var value = new proto.cms.PromoItem;
10994
+ reader.readMessage(value,proto.cms.PromoItem.deserializeBinaryFromReader);
10995
+ msg.addItems(value);
10996
+ break;
10997
+ case 2:
10998
+ var value = /** @type {number} */ (reader.readInt32());
10999
+ msg.setTotalPages(value);
11000
+ break;
11001
+ case 3:
11002
+ var value = /** @type {number} */ (reader.readInt32());
11003
+ msg.setTotalItems(value);
11004
+ break;
11005
+ default:
11006
+ reader.skipField();
11007
+ break;
11008
+ }
11009
+ }
11010
+ return msg;
11011
+ };
11012
+
11013
+
11014
+ /**
11015
+ * Serializes the message to binary data (in protobuf wire format).
11016
+ * @return {!Uint8Array}
11017
+ */
11018
+ proto.cms.PromosItemsResponse.prototype.serializeBinary = function() {
11019
+ var writer = new jspb.BinaryWriter();
11020
+ proto.cms.PromosItemsResponse.serializeBinaryToWriter(this, writer);
11021
+ return writer.getResultBuffer();
11022
+ };
11023
+
11024
+
11025
+ /**
11026
+ * Serializes the given message to binary data (in protobuf wire
11027
+ * format), writing to the given BinaryWriter.
11028
+ * @param {!proto.cms.PromosItemsResponse} message
11029
+ * @param {!jspb.BinaryWriter} writer
11030
+ * @suppress {unusedLocalVariables} f is only used for nested messages
11031
+ */
11032
+ proto.cms.PromosItemsResponse.serializeBinaryToWriter = function(message, writer) {
11033
+ var f = undefined;
11034
+ f = message.getItemsList();
11035
+ if (f.length > 0) {
11036
+ writer.writeRepeatedMessage(
11037
+ 1,
11038
+ f,
11039
+ proto.cms.PromoItem.serializeBinaryToWriter
11040
+ );
11041
+ }
11042
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
11043
+ if (f != null) {
11044
+ writer.writeInt32(
11045
+ 2,
11046
+ f
11047
+ );
11048
+ }
11049
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
11050
+ if (f != null) {
11051
+ writer.writeInt32(
11052
+ 3,
11053
+ f
11054
+ );
11055
+ }
11056
+ };
11057
+
11058
+
11059
+ /**
11060
+ * repeated PromoItem items = 1;
11061
+ * @return {!Array<!proto.cms.PromoItem>}
11062
+ */
11063
+ proto.cms.PromosItemsResponse.prototype.getItemsList = function() {
11064
+ return /** @type{!Array<!proto.cms.PromoItem>} */ (
11065
+ jspb.Message.getRepeatedWrapperField(this, proto.cms.PromoItem, 1));
11066
+ };
11067
+
11068
+
11069
+ /**
11070
+ * @param {!Array<!proto.cms.PromoItem>} value
11071
+ * @return {!proto.cms.PromosItemsResponse} returns this
11072
+ */
11073
+ proto.cms.PromosItemsResponse.prototype.setItemsList = function(value) {
11074
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
11075
+ };
11076
+
11077
+
11078
+ /**
11079
+ * @param {!proto.cms.PromoItem=} opt_value
11080
+ * @param {number=} opt_index
11081
+ * @return {!proto.cms.PromoItem}
11082
+ */
11083
+ proto.cms.PromosItemsResponse.prototype.addItems = function(opt_value, opt_index) {
11084
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.cms.PromoItem, opt_index);
11085
+ };
11086
+
11087
+
11088
+ /**
11089
+ * Clears the list making it empty but non-null.
11090
+ * @return {!proto.cms.PromosItemsResponse} returns this
11091
+ */
11092
+ proto.cms.PromosItemsResponse.prototype.clearItemsList = function() {
11093
+ return this.setItemsList([]);
11094
+ };
11095
+
11096
+
11097
+ /**
11098
+ * optional int32 total_pages = 2;
11099
+ * @return {number}
11100
+ */
11101
+ proto.cms.PromosItemsResponse.prototype.getTotalPages = function() {
11102
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
11103
+ };
11104
+
11105
+
11106
+ /**
11107
+ * @param {number} value
11108
+ * @return {!proto.cms.PromosItemsResponse} returns this
11109
+ */
11110
+ proto.cms.PromosItemsResponse.prototype.setTotalPages = function(value) {
11111
+ return jspb.Message.setField(this, 2, value);
11112
+ };
11113
+
11114
+
11115
+ /**
11116
+ * Clears the field making it undefined.
11117
+ * @return {!proto.cms.PromosItemsResponse} returns this
11118
+ */
11119
+ proto.cms.PromosItemsResponse.prototype.clearTotalPages = function() {
11120
+ return jspb.Message.setField(this, 2, undefined);
11121
+ };
11122
+
11123
+
11124
+ /**
11125
+ * Returns whether this field is set.
11126
+ * @return {boolean}
11127
+ */
11128
+ proto.cms.PromosItemsResponse.prototype.hasTotalPages = function() {
11129
+ return jspb.Message.getField(this, 2) != null;
11130
+ };
11131
+
11132
+
11133
+ /**
11134
+ * optional int32 total_items = 3;
11135
+ * @return {number}
11136
+ */
11137
+ proto.cms.PromosItemsResponse.prototype.getTotalItems = function() {
11138
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
11139
+ };
11140
+
11141
+
11142
+ /**
11143
+ * @param {number} value
11144
+ * @return {!proto.cms.PromosItemsResponse} returns this
11145
+ */
11146
+ proto.cms.PromosItemsResponse.prototype.setTotalItems = function(value) {
11147
+ return jspb.Message.setField(this, 3, value);
11148
+ };
11149
+
11150
+
11151
+ /**
11152
+ * Clears the field making it undefined.
11153
+ * @return {!proto.cms.PromosItemsResponse} returns this
11154
+ */
11155
+ proto.cms.PromosItemsResponse.prototype.clearTotalItems = function() {
11156
+ return jspb.Message.setField(this, 3, undefined);
11157
+ };
11158
+
11159
+
11160
+ /**
11161
+ * Returns whether this field is set.
11162
+ * @return {boolean}
11163
+ */
11164
+ proto.cms.PromosItemsResponse.prototype.hasTotalItems = function() {
11165
+ return jspb.Message.getField(this, 3) != null;
11166
+ };
11167
+
11168
+
8955
11169
  goog.object.extend(exports, proto.cms);