protobuf-platform 1.2.33 → 1.2.35

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.proto CHANGED
@@ -34,13 +34,15 @@ service CMS {
34
34
  rpc readListPages(PaginationRequest) returns (PagesItemsResponse);
35
35
  rpc setPageTranslation(PageTranslationRequest) returns (PageStatusResponse);
36
36
  rpc getPageTranslation(GetPageTranslationRequest) returns (PageTranslationResponse);
37
- //Pages
37
+ //Promo
38
38
  rpc createSinglePromo(stream PromoRequest) returns (PromoResponse);
39
39
  rpc readSinglePromo(GetPromoRequest) returns (PromoResponse);
40
40
  rpc updateSinglePromo(stream PromoRequest) returns (PromoResponse);
41
41
  rpc deleteSinglePromo(GetPromoRequest) returns (PromoStatusResponse);
42
42
  rpc readListPromos(PaginationRequest) returns (PromosItemsResponse);
43
43
  rpc listPromosForUser(PaginationRequest) returns (PromosItemsResponse);
44
+ rpc setPromoTranslation(PromoTranslationRequest) returns (PromoStatusResponse);
45
+ rpc getPromoTranslation(GetPromoTranslationRequest) returns (PromoTranslationResponse);
44
46
  }
45
47
 
46
48
  message PingRequest { string ping = 1; }
@@ -274,4 +276,20 @@ message PromosItemsResponse {
274
276
  repeated PromoItem items = 1;
275
277
  optional int32 total_pages = 2;
276
278
  optional int32 total_items = 3;
279
+ }
280
+ message PromoTranslationRequest {
281
+ int32 promo_id = 1;
282
+ string geo = 2;
283
+ string locale = 3;
284
+ optional string title = 4;
285
+ optional string content = 5;
286
+ }
287
+ message GetPromoTranslationRequest {
288
+ int32 promo_id = 1;
289
+ string geo = 2;
290
+ string locale = 3;
291
+ }
292
+ message PromoTranslationResponse {
293
+ optional string title = 1;
294
+ optional string content = 2;
277
295
  }
@@ -202,6 +202,17 @@ function deserialize_cms_GetPromoRequest(buffer_arg) {
202
202
  return cms_pb.GetPromoRequest.deserializeBinary(new Uint8Array(buffer_arg));
203
203
  }
204
204
 
205
+ function serialize_cms_GetPromoTranslationRequest(arg) {
206
+ if (!(arg instanceof cms_pb.GetPromoTranslationRequest)) {
207
+ throw new Error('Expected argument of type cms.GetPromoTranslationRequest');
208
+ }
209
+ return Buffer.from(arg.serializeBinary());
210
+ }
211
+
212
+ function deserialize_cms_GetPromoTranslationRequest(buffer_arg) {
213
+ return cms_pb.GetPromoTranslationRequest.deserializeBinary(new Uint8Array(buffer_arg));
214
+ }
215
+
205
216
  function serialize_cms_GetSignUpFormWidgetRequest(arg) {
206
217
  if (!(arg instanceof cms_pb.GetSignUpFormWidgetRequest)) {
207
218
  throw new Error('Expected argument of type cms.GetSignUpFormWidgetRequest');
@@ -367,6 +378,28 @@ function deserialize_cms_PromoStatusResponse(buffer_arg) {
367
378
  return cms_pb.PromoStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
368
379
  }
369
380
 
381
+ function serialize_cms_PromoTranslationRequest(arg) {
382
+ if (!(arg instanceof cms_pb.PromoTranslationRequest)) {
383
+ throw new Error('Expected argument of type cms.PromoTranslationRequest');
384
+ }
385
+ return Buffer.from(arg.serializeBinary());
386
+ }
387
+
388
+ function deserialize_cms_PromoTranslationRequest(buffer_arg) {
389
+ return cms_pb.PromoTranslationRequest.deserializeBinary(new Uint8Array(buffer_arg));
390
+ }
391
+
392
+ function serialize_cms_PromoTranslationResponse(arg) {
393
+ if (!(arg instanceof cms_pb.PromoTranslationResponse)) {
394
+ throw new Error('Expected argument of type cms.PromoTranslationResponse');
395
+ }
396
+ return Buffer.from(arg.serializeBinary());
397
+ }
398
+
399
+ function deserialize_cms_PromoTranslationResponse(buffer_arg) {
400
+ return cms_pb.PromoTranslationResponse.deserializeBinary(new Uint8Array(buffer_arg));
401
+ }
402
+
370
403
  function serialize_cms_PromosItemsResponse(arg) {
371
404
  if (!(arg instanceof cms_pb.PromosItemsResponse)) {
372
405
  throw new Error('Expected argument of type cms.PromosItemsResponse');
@@ -703,7 +736,7 @@ createSinglePage: {
703
736
  responseSerialize: serialize_cms_PageTranslationResponse,
704
737
  responseDeserialize: deserialize_cms_PageTranslationResponse,
705
738
  },
706
- // Pages
739
+ // Promo
707
740
  createSinglePromo: {
708
741
  path: '/cms.CMS/createSinglePromo',
709
742
  requestStream: true,
@@ -770,6 +803,28 @@ createSinglePromo: {
770
803
  responseSerialize: serialize_cms_PromosItemsResponse,
771
804
  responseDeserialize: deserialize_cms_PromosItemsResponse,
772
805
  },
806
+ setPromoTranslation: {
807
+ path: '/cms.CMS/setPromoTranslation',
808
+ requestStream: false,
809
+ responseStream: false,
810
+ requestType: cms_pb.PromoTranslationRequest,
811
+ responseType: cms_pb.PromoStatusResponse,
812
+ requestSerialize: serialize_cms_PromoTranslationRequest,
813
+ requestDeserialize: deserialize_cms_PromoTranslationRequest,
814
+ responseSerialize: serialize_cms_PromoStatusResponse,
815
+ responseDeserialize: deserialize_cms_PromoStatusResponse,
816
+ },
817
+ getPromoTranslation: {
818
+ path: '/cms.CMS/getPromoTranslation',
819
+ requestStream: false,
820
+ responseStream: false,
821
+ requestType: cms_pb.GetPromoTranslationRequest,
822
+ responseType: cms_pb.PromoTranslationResponse,
823
+ requestSerialize: serialize_cms_GetPromoTranslationRequest,
824
+ requestDeserialize: deserialize_cms_GetPromoTranslationRequest,
825
+ responseSerialize: serialize_cms_PromoTranslationResponse,
826
+ responseDeserialize: deserialize_cms_PromoTranslationResponse,
827
+ },
773
828
  };
774
829
 
775
830
  exports.CMSClient = grpc.makeGenericClientConstructor(CMSService, 'CMS');
package/cms/cms_pb.js CHANGED
@@ -44,6 +44,7 @@ goog.exportSymbol('proto.cms.GetMainPageWidgetRequest', null, global);
44
44
  goog.exportSymbol('proto.cms.GetPageRequest', null, global);
45
45
  goog.exportSymbol('proto.cms.GetPageTranslationRequest', null, global);
46
46
  goog.exportSymbol('proto.cms.GetPromoRequest', null, global);
47
+ goog.exportSymbol('proto.cms.GetPromoTranslationRequest', null, global);
47
48
  goog.exportSymbol('proto.cms.GetSignUpFormWidgetRequest', null, global);
48
49
  goog.exportSymbol('proto.cms.MainPageWidgetItem', null, global);
49
50
  goog.exportSymbol('proto.cms.MainPageWidgetResponse', null, global);
@@ -63,6 +64,8 @@ goog.exportSymbol('proto.cms.PromoRequest', null, global);
63
64
  goog.exportSymbol('proto.cms.PromoRequest.RequestCase', null, global);
64
65
  goog.exportSymbol('proto.cms.PromoResponse', null, global);
65
66
  goog.exportSymbol('proto.cms.PromoStatusResponse', null, global);
67
+ goog.exportSymbol('proto.cms.PromoTranslationRequest', null, global);
68
+ goog.exportSymbol('proto.cms.PromoTranslationResponse', null, global);
66
69
  goog.exportSymbol('proto.cms.PromosItemsResponse', null, global);
67
70
  goog.exportSymbol('proto.cms.SignUpFormWidgetItem', null, global);
68
71
  goog.exportSymbol('proto.cms.UserBannerGroupResponse', null, global);
@@ -991,6 +994,69 @@ if (goog.DEBUG && !COMPILED) {
991
994
  */
992
995
  proto.cms.PromosItemsResponse.displayName = 'proto.cms.PromosItemsResponse';
993
996
  }
997
+ /**
998
+ * Generated by JsPbCodeGenerator.
999
+ * @param {Array=} opt_data Optional initial data array, typically from a
1000
+ * server response, or constructed directly in Javascript. The array is used
1001
+ * in place and becomes part of the constructed object. It is not cloned.
1002
+ * If no data is provided, the constructed object will be empty, but still
1003
+ * valid.
1004
+ * @extends {jspb.Message}
1005
+ * @constructor
1006
+ */
1007
+ proto.cms.PromoTranslationRequest = function(opt_data) {
1008
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1009
+ };
1010
+ goog.inherits(proto.cms.PromoTranslationRequest, jspb.Message);
1011
+ if (goog.DEBUG && !COMPILED) {
1012
+ /**
1013
+ * @public
1014
+ * @override
1015
+ */
1016
+ proto.cms.PromoTranslationRequest.displayName = 'proto.cms.PromoTranslationRequest';
1017
+ }
1018
+ /**
1019
+ * Generated by JsPbCodeGenerator.
1020
+ * @param {Array=} opt_data Optional initial data array, typically from a
1021
+ * server response, or constructed directly in Javascript. The array is used
1022
+ * in place and becomes part of the constructed object. It is not cloned.
1023
+ * If no data is provided, the constructed object will be empty, but still
1024
+ * valid.
1025
+ * @extends {jspb.Message}
1026
+ * @constructor
1027
+ */
1028
+ proto.cms.GetPromoTranslationRequest = function(opt_data) {
1029
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1030
+ };
1031
+ goog.inherits(proto.cms.GetPromoTranslationRequest, jspb.Message);
1032
+ if (goog.DEBUG && !COMPILED) {
1033
+ /**
1034
+ * @public
1035
+ * @override
1036
+ */
1037
+ proto.cms.GetPromoTranslationRequest.displayName = 'proto.cms.GetPromoTranslationRequest';
1038
+ }
1039
+ /**
1040
+ * Generated by JsPbCodeGenerator.
1041
+ * @param {Array=} opt_data Optional initial data array, typically from a
1042
+ * server response, or constructed directly in Javascript. The array is used
1043
+ * in place and becomes part of the constructed object. It is not cloned.
1044
+ * If no data is provided, the constructed object will be empty, but still
1045
+ * valid.
1046
+ * @extends {jspb.Message}
1047
+ * @constructor
1048
+ */
1049
+ proto.cms.PromoTranslationResponse = function(opt_data) {
1050
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1051
+ };
1052
+ goog.inherits(proto.cms.PromoTranslationResponse, jspb.Message);
1053
+ if (goog.DEBUG && !COMPILED) {
1054
+ /**
1055
+ * @public
1056
+ * @override
1057
+ */
1058
+ proto.cms.PromoTranslationResponse.displayName = 'proto.cms.PromoTranslationResponse';
1059
+ }
994
1060
 
995
1061
 
996
1062
 
@@ -12048,4 +12114,676 @@ proto.cms.PromosItemsResponse.prototype.hasTotalItems = function() {
12048
12114
  };
12049
12115
 
12050
12116
 
12117
+
12118
+
12119
+
12120
+ if (jspb.Message.GENERATE_TO_OBJECT) {
12121
+ /**
12122
+ * Creates an object representation of this proto.
12123
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
12124
+ * Optional fields that are not set will be set to undefined.
12125
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
12126
+ * For the list of reserved names please see:
12127
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
12128
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
12129
+ * JSPB instance for transitional soy proto support:
12130
+ * http://goto/soy-param-migration
12131
+ * @return {!Object}
12132
+ */
12133
+ proto.cms.PromoTranslationRequest.prototype.toObject = function(opt_includeInstance) {
12134
+ return proto.cms.PromoTranslationRequest.toObject(opt_includeInstance, this);
12135
+ };
12136
+
12137
+
12138
+ /**
12139
+ * Static version of the {@see toObject} method.
12140
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
12141
+ * the JSPB instance for transitional soy proto support:
12142
+ * http://goto/soy-param-migration
12143
+ * @param {!proto.cms.PromoTranslationRequest} msg The msg instance to transform.
12144
+ * @return {!Object}
12145
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12146
+ */
12147
+ proto.cms.PromoTranslationRequest.toObject = function(includeInstance, msg) {
12148
+ var f, obj = {
12149
+ promoId: jspb.Message.getFieldWithDefault(msg, 1, 0),
12150
+ geo: jspb.Message.getFieldWithDefault(msg, 2, ""),
12151
+ locale: jspb.Message.getFieldWithDefault(msg, 3, ""),
12152
+ title: jspb.Message.getFieldWithDefault(msg, 4, ""),
12153
+ content: jspb.Message.getFieldWithDefault(msg, 5, "")
12154
+ };
12155
+
12156
+ if (includeInstance) {
12157
+ obj.$jspbMessageInstance = msg;
12158
+ }
12159
+ return obj;
12160
+ };
12161
+ }
12162
+
12163
+
12164
+ /**
12165
+ * Deserializes binary data (in protobuf wire format).
12166
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
12167
+ * @return {!proto.cms.PromoTranslationRequest}
12168
+ */
12169
+ proto.cms.PromoTranslationRequest.deserializeBinary = function(bytes) {
12170
+ var reader = new jspb.BinaryReader(bytes);
12171
+ var msg = new proto.cms.PromoTranslationRequest;
12172
+ return proto.cms.PromoTranslationRequest.deserializeBinaryFromReader(msg, reader);
12173
+ };
12174
+
12175
+
12176
+ /**
12177
+ * Deserializes binary data (in protobuf wire format) from the
12178
+ * given reader into the given message object.
12179
+ * @param {!proto.cms.PromoTranslationRequest} msg The message object to deserialize into.
12180
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
12181
+ * @return {!proto.cms.PromoTranslationRequest}
12182
+ */
12183
+ proto.cms.PromoTranslationRequest.deserializeBinaryFromReader = function(msg, reader) {
12184
+ while (reader.nextField()) {
12185
+ if (reader.isEndGroup()) {
12186
+ break;
12187
+ }
12188
+ var field = reader.getFieldNumber();
12189
+ switch (field) {
12190
+ case 1:
12191
+ var value = /** @type {number} */ (reader.readInt32());
12192
+ msg.setPromoId(value);
12193
+ break;
12194
+ case 2:
12195
+ var value = /** @type {string} */ (reader.readString());
12196
+ msg.setGeo(value);
12197
+ break;
12198
+ case 3:
12199
+ var value = /** @type {string} */ (reader.readString());
12200
+ msg.setLocale(value);
12201
+ break;
12202
+ case 4:
12203
+ var value = /** @type {string} */ (reader.readString());
12204
+ msg.setTitle(value);
12205
+ break;
12206
+ case 5:
12207
+ var value = /** @type {string} */ (reader.readString());
12208
+ msg.setContent(value);
12209
+ break;
12210
+ default:
12211
+ reader.skipField();
12212
+ break;
12213
+ }
12214
+ }
12215
+ return msg;
12216
+ };
12217
+
12218
+
12219
+ /**
12220
+ * Serializes the message to binary data (in protobuf wire format).
12221
+ * @return {!Uint8Array}
12222
+ */
12223
+ proto.cms.PromoTranslationRequest.prototype.serializeBinary = function() {
12224
+ var writer = new jspb.BinaryWriter();
12225
+ proto.cms.PromoTranslationRequest.serializeBinaryToWriter(this, writer);
12226
+ return writer.getResultBuffer();
12227
+ };
12228
+
12229
+
12230
+ /**
12231
+ * Serializes the given message to binary data (in protobuf wire
12232
+ * format), writing to the given BinaryWriter.
12233
+ * @param {!proto.cms.PromoTranslationRequest} message
12234
+ * @param {!jspb.BinaryWriter} writer
12235
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12236
+ */
12237
+ proto.cms.PromoTranslationRequest.serializeBinaryToWriter = function(message, writer) {
12238
+ var f = undefined;
12239
+ f = message.getPromoId();
12240
+ if (f !== 0) {
12241
+ writer.writeInt32(
12242
+ 1,
12243
+ f
12244
+ );
12245
+ }
12246
+ f = message.getGeo();
12247
+ if (f.length > 0) {
12248
+ writer.writeString(
12249
+ 2,
12250
+ f
12251
+ );
12252
+ }
12253
+ f = message.getLocale();
12254
+ if (f.length > 0) {
12255
+ writer.writeString(
12256
+ 3,
12257
+ f
12258
+ );
12259
+ }
12260
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
12261
+ if (f != null) {
12262
+ writer.writeString(
12263
+ 4,
12264
+ f
12265
+ );
12266
+ }
12267
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
12268
+ if (f != null) {
12269
+ writer.writeString(
12270
+ 5,
12271
+ f
12272
+ );
12273
+ }
12274
+ };
12275
+
12276
+
12277
+ /**
12278
+ * optional int32 promo_id = 1;
12279
+ * @return {number}
12280
+ */
12281
+ proto.cms.PromoTranslationRequest.prototype.getPromoId = function() {
12282
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
12283
+ };
12284
+
12285
+
12286
+ /**
12287
+ * @param {number} value
12288
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12289
+ */
12290
+ proto.cms.PromoTranslationRequest.prototype.setPromoId = function(value) {
12291
+ return jspb.Message.setProto3IntField(this, 1, value);
12292
+ };
12293
+
12294
+
12295
+ /**
12296
+ * optional string geo = 2;
12297
+ * @return {string}
12298
+ */
12299
+ proto.cms.PromoTranslationRequest.prototype.getGeo = function() {
12300
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12301
+ };
12302
+
12303
+
12304
+ /**
12305
+ * @param {string} value
12306
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12307
+ */
12308
+ proto.cms.PromoTranslationRequest.prototype.setGeo = function(value) {
12309
+ return jspb.Message.setProto3StringField(this, 2, value);
12310
+ };
12311
+
12312
+
12313
+ /**
12314
+ * optional string locale = 3;
12315
+ * @return {string}
12316
+ */
12317
+ proto.cms.PromoTranslationRequest.prototype.getLocale = function() {
12318
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
12319
+ };
12320
+
12321
+
12322
+ /**
12323
+ * @param {string} value
12324
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12325
+ */
12326
+ proto.cms.PromoTranslationRequest.prototype.setLocale = function(value) {
12327
+ return jspb.Message.setProto3StringField(this, 3, value);
12328
+ };
12329
+
12330
+
12331
+ /**
12332
+ * optional string title = 4;
12333
+ * @return {string}
12334
+ */
12335
+ proto.cms.PromoTranslationRequest.prototype.getTitle = function() {
12336
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
12337
+ };
12338
+
12339
+
12340
+ /**
12341
+ * @param {string} value
12342
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12343
+ */
12344
+ proto.cms.PromoTranslationRequest.prototype.setTitle = function(value) {
12345
+ return jspb.Message.setField(this, 4, value);
12346
+ };
12347
+
12348
+
12349
+ /**
12350
+ * Clears the field making it undefined.
12351
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12352
+ */
12353
+ proto.cms.PromoTranslationRequest.prototype.clearTitle = function() {
12354
+ return jspb.Message.setField(this, 4, undefined);
12355
+ };
12356
+
12357
+
12358
+ /**
12359
+ * Returns whether this field is set.
12360
+ * @return {boolean}
12361
+ */
12362
+ proto.cms.PromoTranslationRequest.prototype.hasTitle = function() {
12363
+ return jspb.Message.getField(this, 4) != null;
12364
+ };
12365
+
12366
+
12367
+ /**
12368
+ * optional string content = 5;
12369
+ * @return {string}
12370
+ */
12371
+ proto.cms.PromoTranslationRequest.prototype.getContent = function() {
12372
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
12373
+ };
12374
+
12375
+
12376
+ /**
12377
+ * @param {string} value
12378
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12379
+ */
12380
+ proto.cms.PromoTranslationRequest.prototype.setContent = function(value) {
12381
+ return jspb.Message.setField(this, 5, value);
12382
+ };
12383
+
12384
+
12385
+ /**
12386
+ * Clears the field making it undefined.
12387
+ * @return {!proto.cms.PromoTranslationRequest} returns this
12388
+ */
12389
+ proto.cms.PromoTranslationRequest.prototype.clearContent = function() {
12390
+ return jspb.Message.setField(this, 5, undefined);
12391
+ };
12392
+
12393
+
12394
+ /**
12395
+ * Returns whether this field is set.
12396
+ * @return {boolean}
12397
+ */
12398
+ proto.cms.PromoTranslationRequest.prototype.hasContent = function() {
12399
+ return jspb.Message.getField(this, 5) != null;
12400
+ };
12401
+
12402
+
12403
+
12404
+
12405
+
12406
+ if (jspb.Message.GENERATE_TO_OBJECT) {
12407
+ /**
12408
+ * Creates an object representation of this proto.
12409
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
12410
+ * Optional fields that are not set will be set to undefined.
12411
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
12412
+ * For the list of reserved names please see:
12413
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
12414
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
12415
+ * JSPB instance for transitional soy proto support:
12416
+ * http://goto/soy-param-migration
12417
+ * @return {!Object}
12418
+ */
12419
+ proto.cms.GetPromoTranslationRequest.prototype.toObject = function(opt_includeInstance) {
12420
+ return proto.cms.GetPromoTranslationRequest.toObject(opt_includeInstance, this);
12421
+ };
12422
+
12423
+
12424
+ /**
12425
+ * Static version of the {@see toObject} method.
12426
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
12427
+ * the JSPB instance for transitional soy proto support:
12428
+ * http://goto/soy-param-migration
12429
+ * @param {!proto.cms.GetPromoTranslationRequest} msg The msg instance to transform.
12430
+ * @return {!Object}
12431
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12432
+ */
12433
+ proto.cms.GetPromoTranslationRequest.toObject = function(includeInstance, msg) {
12434
+ var f, obj = {
12435
+ promoId: jspb.Message.getFieldWithDefault(msg, 1, 0),
12436
+ geo: jspb.Message.getFieldWithDefault(msg, 2, ""),
12437
+ locale: jspb.Message.getFieldWithDefault(msg, 3, "")
12438
+ };
12439
+
12440
+ if (includeInstance) {
12441
+ obj.$jspbMessageInstance = msg;
12442
+ }
12443
+ return obj;
12444
+ };
12445
+ }
12446
+
12447
+
12448
+ /**
12449
+ * Deserializes binary data (in protobuf wire format).
12450
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
12451
+ * @return {!proto.cms.GetPromoTranslationRequest}
12452
+ */
12453
+ proto.cms.GetPromoTranslationRequest.deserializeBinary = function(bytes) {
12454
+ var reader = new jspb.BinaryReader(bytes);
12455
+ var msg = new proto.cms.GetPromoTranslationRequest;
12456
+ return proto.cms.GetPromoTranslationRequest.deserializeBinaryFromReader(msg, reader);
12457
+ };
12458
+
12459
+
12460
+ /**
12461
+ * Deserializes binary data (in protobuf wire format) from the
12462
+ * given reader into the given message object.
12463
+ * @param {!proto.cms.GetPromoTranslationRequest} msg The message object to deserialize into.
12464
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
12465
+ * @return {!proto.cms.GetPromoTranslationRequest}
12466
+ */
12467
+ proto.cms.GetPromoTranslationRequest.deserializeBinaryFromReader = function(msg, reader) {
12468
+ while (reader.nextField()) {
12469
+ if (reader.isEndGroup()) {
12470
+ break;
12471
+ }
12472
+ var field = reader.getFieldNumber();
12473
+ switch (field) {
12474
+ case 1:
12475
+ var value = /** @type {number} */ (reader.readInt32());
12476
+ msg.setPromoId(value);
12477
+ break;
12478
+ case 2:
12479
+ var value = /** @type {string} */ (reader.readString());
12480
+ msg.setGeo(value);
12481
+ break;
12482
+ case 3:
12483
+ var value = /** @type {string} */ (reader.readString());
12484
+ msg.setLocale(value);
12485
+ break;
12486
+ default:
12487
+ reader.skipField();
12488
+ break;
12489
+ }
12490
+ }
12491
+ return msg;
12492
+ };
12493
+
12494
+
12495
+ /**
12496
+ * Serializes the message to binary data (in protobuf wire format).
12497
+ * @return {!Uint8Array}
12498
+ */
12499
+ proto.cms.GetPromoTranslationRequest.prototype.serializeBinary = function() {
12500
+ var writer = new jspb.BinaryWriter();
12501
+ proto.cms.GetPromoTranslationRequest.serializeBinaryToWriter(this, writer);
12502
+ return writer.getResultBuffer();
12503
+ };
12504
+
12505
+
12506
+ /**
12507
+ * Serializes the given message to binary data (in protobuf wire
12508
+ * format), writing to the given BinaryWriter.
12509
+ * @param {!proto.cms.GetPromoTranslationRequest} message
12510
+ * @param {!jspb.BinaryWriter} writer
12511
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12512
+ */
12513
+ proto.cms.GetPromoTranslationRequest.serializeBinaryToWriter = function(message, writer) {
12514
+ var f = undefined;
12515
+ f = message.getPromoId();
12516
+ if (f !== 0) {
12517
+ writer.writeInt32(
12518
+ 1,
12519
+ f
12520
+ );
12521
+ }
12522
+ f = message.getGeo();
12523
+ if (f.length > 0) {
12524
+ writer.writeString(
12525
+ 2,
12526
+ f
12527
+ );
12528
+ }
12529
+ f = message.getLocale();
12530
+ if (f.length > 0) {
12531
+ writer.writeString(
12532
+ 3,
12533
+ f
12534
+ );
12535
+ }
12536
+ };
12537
+
12538
+
12539
+ /**
12540
+ * optional int32 promo_id = 1;
12541
+ * @return {number}
12542
+ */
12543
+ proto.cms.GetPromoTranslationRequest.prototype.getPromoId = function() {
12544
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
12545
+ };
12546
+
12547
+
12548
+ /**
12549
+ * @param {number} value
12550
+ * @return {!proto.cms.GetPromoTranslationRequest} returns this
12551
+ */
12552
+ proto.cms.GetPromoTranslationRequest.prototype.setPromoId = function(value) {
12553
+ return jspb.Message.setProto3IntField(this, 1, value);
12554
+ };
12555
+
12556
+
12557
+ /**
12558
+ * optional string geo = 2;
12559
+ * @return {string}
12560
+ */
12561
+ proto.cms.GetPromoTranslationRequest.prototype.getGeo = function() {
12562
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12563
+ };
12564
+
12565
+
12566
+ /**
12567
+ * @param {string} value
12568
+ * @return {!proto.cms.GetPromoTranslationRequest} returns this
12569
+ */
12570
+ proto.cms.GetPromoTranslationRequest.prototype.setGeo = function(value) {
12571
+ return jspb.Message.setProto3StringField(this, 2, value);
12572
+ };
12573
+
12574
+
12575
+ /**
12576
+ * optional string locale = 3;
12577
+ * @return {string}
12578
+ */
12579
+ proto.cms.GetPromoTranslationRequest.prototype.getLocale = function() {
12580
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
12581
+ };
12582
+
12583
+
12584
+ /**
12585
+ * @param {string} value
12586
+ * @return {!proto.cms.GetPromoTranslationRequest} returns this
12587
+ */
12588
+ proto.cms.GetPromoTranslationRequest.prototype.setLocale = function(value) {
12589
+ return jspb.Message.setProto3StringField(this, 3, value);
12590
+ };
12591
+
12592
+
12593
+
12594
+
12595
+
12596
+ if (jspb.Message.GENERATE_TO_OBJECT) {
12597
+ /**
12598
+ * Creates an object representation of this proto.
12599
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
12600
+ * Optional fields that are not set will be set to undefined.
12601
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
12602
+ * For the list of reserved names please see:
12603
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
12604
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
12605
+ * JSPB instance for transitional soy proto support:
12606
+ * http://goto/soy-param-migration
12607
+ * @return {!Object}
12608
+ */
12609
+ proto.cms.PromoTranslationResponse.prototype.toObject = function(opt_includeInstance) {
12610
+ return proto.cms.PromoTranslationResponse.toObject(opt_includeInstance, this);
12611
+ };
12612
+
12613
+
12614
+ /**
12615
+ * Static version of the {@see toObject} method.
12616
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
12617
+ * the JSPB instance for transitional soy proto support:
12618
+ * http://goto/soy-param-migration
12619
+ * @param {!proto.cms.PromoTranslationResponse} msg The msg instance to transform.
12620
+ * @return {!Object}
12621
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12622
+ */
12623
+ proto.cms.PromoTranslationResponse.toObject = function(includeInstance, msg) {
12624
+ var f, obj = {
12625
+ title: jspb.Message.getFieldWithDefault(msg, 1, ""),
12626
+ content: jspb.Message.getFieldWithDefault(msg, 2, "")
12627
+ };
12628
+
12629
+ if (includeInstance) {
12630
+ obj.$jspbMessageInstance = msg;
12631
+ }
12632
+ return obj;
12633
+ };
12634
+ }
12635
+
12636
+
12637
+ /**
12638
+ * Deserializes binary data (in protobuf wire format).
12639
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
12640
+ * @return {!proto.cms.PromoTranslationResponse}
12641
+ */
12642
+ proto.cms.PromoTranslationResponse.deserializeBinary = function(bytes) {
12643
+ var reader = new jspb.BinaryReader(bytes);
12644
+ var msg = new proto.cms.PromoTranslationResponse;
12645
+ return proto.cms.PromoTranslationResponse.deserializeBinaryFromReader(msg, reader);
12646
+ };
12647
+
12648
+
12649
+ /**
12650
+ * Deserializes binary data (in protobuf wire format) from the
12651
+ * given reader into the given message object.
12652
+ * @param {!proto.cms.PromoTranslationResponse} msg The message object to deserialize into.
12653
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
12654
+ * @return {!proto.cms.PromoTranslationResponse}
12655
+ */
12656
+ proto.cms.PromoTranslationResponse.deserializeBinaryFromReader = function(msg, reader) {
12657
+ while (reader.nextField()) {
12658
+ if (reader.isEndGroup()) {
12659
+ break;
12660
+ }
12661
+ var field = reader.getFieldNumber();
12662
+ switch (field) {
12663
+ case 1:
12664
+ var value = /** @type {string} */ (reader.readString());
12665
+ msg.setTitle(value);
12666
+ break;
12667
+ case 2:
12668
+ var value = /** @type {string} */ (reader.readString());
12669
+ msg.setContent(value);
12670
+ break;
12671
+ default:
12672
+ reader.skipField();
12673
+ break;
12674
+ }
12675
+ }
12676
+ return msg;
12677
+ };
12678
+
12679
+
12680
+ /**
12681
+ * Serializes the message to binary data (in protobuf wire format).
12682
+ * @return {!Uint8Array}
12683
+ */
12684
+ proto.cms.PromoTranslationResponse.prototype.serializeBinary = function() {
12685
+ var writer = new jspb.BinaryWriter();
12686
+ proto.cms.PromoTranslationResponse.serializeBinaryToWriter(this, writer);
12687
+ return writer.getResultBuffer();
12688
+ };
12689
+
12690
+
12691
+ /**
12692
+ * Serializes the given message to binary data (in protobuf wire
12693
+ * format), writing to the given BinaryWriter.
12694
+ * @param {!proto.cms.PromoTranslationResponse} message
12695
+ * @param {!jspb.BinaryWriter} writer
12696
+ * @suppress {unusedLocalVariables} f is only used for nested messages
12697
+ */
12698
+ proto.cms.PromoTranslationResponse.serializeBinaryToWriter = function(message, writer) {
12699
+ var f = undefined;
12700
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
12701
+ if (f != null) {
12702
+ writer.writeString(
12703
+ 1,
12704
+ f
12705
+ );
12706
+ }
12707
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
12708
+ if (f != null) {
12709
+ writer.writeString(
12710
+ 2,
12711
+ f
12712
+ );
12713
+ }
12714
+ };
12715
+
12716
+
12717
+ /**
12718
+ * optional string title = 1;
12719
+ * @return {string}
12720
+ */
12721
+ proto.cms.PromoTranslationResponse.prototype.getTitle = function() {
12722
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
12723
+ };
12724
+
12725
+
12726
+ /**
12727
+ * @param {string} value
12728
+ * @return {!proto.cms.PromoTranslationResponse} returns this
12729
+ */
12730
+ proto.cms.PromoTranslationResponse.prototype.setTitle = function(value) {
12731
+ return jspb.Message.setField(this, 1, value);
12732
+ };
12733
+
12734
+
12735
+ /**
12736
+ * Clears the field making it undefined.
12737
+ * @return {!proto.cms.PromoTranslationResponse} returns this
12738
+ */
12739
+ proto.cms.PromoTranslationResponse.prototype.clearTitle = function() {
12740
+ return jspb.Message.setField(this, 1, undefined);
12741
+ };
12742
+
12743
+
12744
+ /**
12745
+ * Returns whether this field is set.
12746
+ * @return {boolean}
12747
+ */
12748
+ proto.cms.PromoTranslationResponse.prototype.hasTitle = function() {
12749
+ return jspb.Message.getField(this, 1) != null;
12750
+ };
12751
+
12752
+
12753
+ /**
12754
+ * optional string content = 2;
12755
+ * @return {string}
12756
+ */
12757
+ proto.cms.PromoTranslationResponse.prototype.getContent = function() {
12758
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
12759
+ };
12760
+
12761
+
12762
+ /**
12763
+ * @param {string} value
12764
+ * @return {!proto.cms.PromoTranslationResponse} returns this
12765
+ */
12766
+ proto.cms.PromoTranslationResponse.prototype.setContent = function(value) {
12767
+ return jspb.Message.setField(this, 2, value);
12768
+ };
12769
+
12770
+
12771
+ /**
12772
+ * Clears the field making it undefined.
12773
+ * @return {!proto.cms.PromoTranslationResponse} returns this
12774
+ */
12775
+ proto.cms.PromoTranslationResponse.prototype.clearContent = function() {
12776
+ return jspb.Message.setField(this, 2, undefined);
12777
+ };
12778
+
12779
+
12780
+ /**
12781
+ * Returns whether this field is set.
12782
+ * @return {boolean}
12783
+ */
12784
+ proto.cms.PromoTranslationResponse.prototype.hasContent = function() {
12785
+ return jspb.Message.getField(this, 2) != null;
12786
+ };
12787
+
12788
+
12051
12789
  goog.object.extend(exports, proto.cms);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.33",
3
+ "version": "1.2.35",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {