protobuf-platform 1.0.174 → 1.0.175

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/index.js CHANGED
@@ -19,6 +19,8 @@ const BonusService = require('./bonus/bonus_grpc_pb');
19
19
  const BonusServiceMessages = require('./bonus/bonus_pb');
20
20
  const LoyaltyService = require('./loyalty/loyalty_grpc_pb');
21
21
  const LoyaltyServiceMessages = require('./loyalty/loyalty_pb');
22
+ const NotificationService = require('./notification/notification_grpc_pb');
23
+ const NotificationServiceMessages = require('./notification/notification_pb');
22
24
  module.exports = {
23
25
  gRPC: gRPC,
24
26
  maxSendMessageLength: 10388608,
@@ -60,4 +62,8 @@ module.exports = {
60
62
  service: LoyaltyService,
61
63
  messages: LoyaltyServiceMessages
62
64
  },
65
+ notification: {
66
+ service: NotificationService,
67
+ messages: NotificationServiceMessages
68
+ },
63
69
  };
@@ -0,0 +1,26 @@
1
+ syntax = "proto3";
2
+
3
+ package notification;
4
+
5
+ service Notification {
6
+ rpc checkConnection(PingRequest) returns (PongResponse);
7
+ rpc getMediaResource(GetFileRequest) returns (stream File);
8
+ //Notifications
9
+ //rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
10
+ //rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
11
+ //rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
12
+ //rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
13
+ //rpc readListLevels(PaginationRequest) returns (LevelItemsResponse);
14
+ }
15
+
16
+ message PingRequest { string ping = 1; }
17
+ message PongResponse { string pong = 1; }
18
+ message PaginationRequest { int32 limit = 1; int32 offset = 2; optional NotificationSearchRequest notification_search_params = 3; }
19
+ message NotificationSearchRequest {
20
+ optional int32 notification_id = 1;
21
+ optional int32 user_id = 2;
22
+ optional string notification_title = 3;
23
+ }
24
+ //Media
25
+ message File { bytes media = 1; }
26
+ message GetFileRequest { string file_name = 1; string instance_type = 2; }
@@ -0,0 +1,83 @@
1
+ // GENERATED CODE -- DO NOT EDIT!
2
+
3
+ 'use strict';
4
+ var grpc = require('@grpc/grpc-js');
5
+ var notification_pb = require('./notification_pb.js');
6
+
7
+ function serialize_notification_File(arg) {
8
+ if (!(arg instanceof notification_pb.File)) {
9
+ throw new Error('Expected argument of type notification.File');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_notification_File(buffer_arg) {
15
+ return notification_pb.File.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
18
+ function serialize_notification_GetFileRequest(arg) {
19
+ if (!(arg instanceof notification_pb.GetFileRequest)) {
20
+ throw new Error('Expected argument of type notification.GetFileRequest');
21
+ }
22
+ return Buffer.from(arg.serializeBinary());
23
+ }
24
+
25
+ function deserialize_notification_GetFileRequest(buffer_arg) {
26
+ return notification_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
27
+ }
28
+
29
+ function serialize_notification_PingRequest(arg) {
30
+ if (!(arg instanceof notification_pb.PingRequest)) {
31
+ throw new Error('Expected argument of type notification.PingRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_notification_PingRequest(buffer_arg) {
37
+ return notification_pb.PingRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
40
+ function serialize_notification_PongResponse(arg) {
41
+ if (!(arg instanceof notification_pb.PongResponse)) {
42
+ throw new Error('Expected argument of type notification.PongResponse');
43
+ }
44
+ return Buffer.from(arg.serializeBinary());
45
+ }
46
+
47
+ function deserialize_notification_PongResponse(buffer_arg) {
48
+ return notification_pb.PongResponse.deserializeBinary(new Uint8Array(buffer_arg));
49
+ }
50
+
51
+
52
+ var NotificationService = exports.NotificationService = {
53
+ checkConnection: {
54
+ path: '/notification.Notification/checkConnection',
55
+ requestStream: false,
56
+ responseStream: false,
57
+ requestType: notification_pb.PingRequest,
58
+ responseType: notification_pb.PongResponse,
59
+ requestSerialize: serialize_notification_PingRequest,
60
+ requestDeserialize: deserialize_notification_PingRequest,
61
+ responseSerialize: serialize_notification_PongResponse,
62
+ responseDeserialize: deserialize_notification_PongResponse,
63
+ },
64
+ getMediaResource: {
65
+ path: '/notification.Notification/getMediaResource',
66
+ requestStream: false,
67
+ responseStream: true,
68
+ requestType: notification_pb.GetFileRequest,
69
+ responseType: notification_pb.File,
70
+ requestSerialize: serialize_notification_GetFileRequest,
71
+ requestDeserialize: deserialize_notification_GetFileRequest,
72
+ responseSerialize: serialize_notification_File,
73
+ responseDeserialize: deserialize_notification_File,
74
+ },
75
+ // Notifications
76
+ // rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
77
+ // rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
78
+ // rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
79
+ // rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
80
+ // rpc readListLevels(PaginationRequest) returns (LevelItemsResponse);
81
+ };
82
+
83
+ exports.NotificationClient = grpc.makeGenericClientConstructor(NotificationService);
@@ -0,0 +1,1185 @@
1
+ // source: notification.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() {
17
+ if (this) { return this; }
18
+ if (typeof window !== 'undefined') { return window; }
19
+ if (typeof global !== 'undefined') { return global; }
20
+ if (typeof self !== 'undefined') { return self; }
21
+ return Function('return this')();
22
+ }.call(null));
23
+
24
+ goog.exportSymbol('proto.notification.File', null, global);
25
+ goog.exportSymbol('proto.notification.GetFileRequest', null, global);
26
+ goog.exportSymbol('proto.notification.NotificationSearchRequest', null, global);
27
+ goog.exportSymbol('proto.notification.PaginationRequest', null, global);
28
+ goog.exportSymbol('proto.notification.PingRequest', null, global);
29
+ goog.exportSymbol('proto.notification.PongResponse', null, global);
30
+ /**
31
+ * Generated by JsPbCodeGenerator.
32
+ * @param {Array=} opt_data Optional initial data array, typically from a
33
+ * server response, or constructed directly in Javascript. The array is used
34
+ * in place and becomes part of the constructed object. It is not cloned.
35
+ * If no data is provided, the constructed object will be empty, but still
36
+ * valid.
37
+ * @extends {jspb.Message}
38
+ * @constructor
39
+ */
40
+ proto.notification.PingRequest = function(opt_data) {
41
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
42
+ };
43
+ goog.inherits(proto.notification.PingRequest, jspb.Message);
44
+ if (goog.DEBUG && !COMPILED) {
45
+ /**
46
+ * @public
47
+ * @override
48
+ */
49
+ proto.notification.PingRequest.displayName = 'proto.notification.PingRequest';
50
+ }
51
+ /**
52
+ * Generated by JsPbCodeGenerator.
53
+ * @param {Array=} opt_data Optional initial data array, typically from a
54
+ * server response, or constructed directly in Javascript. The array is used
55
+ * in place and becomes part of the constructed object. It is not cloned.
56
+ * If no data is provided, the constructed object will be empty, but still
57
+ * valid.
58
+ * @extends {jspb.Message}
59
+ * @constructor
60
+ */
61
+ proto.notification.PongResponse = function(opt_data) {
62
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
63
+ };
64
+ goog.inherits(proto.notification.PongResponse, jspb.Message);
65
+ if (goog.DEBUG && !COMPILED) {
66
+ /**
67
+ * @public
68
+ * @override
69
+ */
70
+ proto.notification.PongResponse.displayName = 'proto.notification.PongResponse';
71
+ }
72
+ /**
73
+ * Generated by JsPbCodeGenerator.
74
+ * @param {Array=} opt_data Optional initial data array, typically from a
75
+ * server response, or constructed directly in Javascript. The array is used
76
+ * in place and becomes part of the constructed object. It is not cloned.
77
+ * If no data is provided, the constructed object will be empty, but still
78
+ * valid.
79
+ * @extends {jspb.Message}
80
+ * @constructor
81
+ */
82
+ proto.notification.PaginationRequest = function(opt_data) {
83
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
84
+ };
85
+ goog.inherits(proto.notification.PaginationRequest, jspb.Message);
86
+ if (goog.DEBUG && !COMPILED) {
87
+ /**
88
+ * @public
89
+ * @override
90
+ */
91
+ proto.notification.PaginationRequest.displayName = 'proto.notification.PaginationRequest';
92
+ }
93
+ /**
94
+ * Generated by JsPbCodeGenerator.
95
+ * @param {Array=} opt_data Optional initial data array, typically from a
96
+ * server response, or constructed directly in Javascript. The array is used
97
+ * in place and becomes part of the constructed object. It is not cloned.
98
+ * If no data is provided, the constructed object will be empty, but still
99
+ * valid.
100
+ * @extends {jspb.Message}
101
+ * @constructor
102
+ */
103
+ proto.notification.NotificationSearchRequest = function(opt_data) {
104
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
105
+ };
106
+ goog.inherits(proto.notification.NotificationSearchRequest, jspb.Message);
107
+ if (goog.DEBUG && !COMPILED) {
108
+ /**
109
+ * @public
110
+ * @override
111
+ */
112
+ proto.notification.NotificationSearchRequest.displayName = 'proto.notification.NotificationSearchRequest';
113
+ }
114
+ /**
115
+ * Generated by JsPbCodeGenerator.
116
+ * @param {Array=} opt_data Optional initial data array, typically from a
117
+ * server response, or constructed directly in Javascript. The array is used
118
+ * in place and becomes part of the constructed object. It is not cloned.
119
+ * If no data is provided, the constructed object will be empty, but still
120
+ * valid.
121
+ * @extends {jspb.Message}
122
+ * @constructor
123
+ */
124
+ proto.notification.File = function(opt_data) {
125
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
126
+ };
127
+ goog.inherits(proto.notification.File, jspb.Message);
128
+ if (goog.DEBUG && !COMPILED) {
129
+ /**
130
+ * @public
131
+ * @override
132
+ */
133
+ proto.notification.File.displayName = 'proto.notification.File';
134
+ }
135
+ /**
136
+ * Generated by JsPbCodeGenerator.
137
+ * @param {Array=} opt_data Optional initial data array, typically from a
138
+ * server response, or constructed directly in Javascript. The array is used
139
+ * in place and becomes part of the constructed object. It is not cloned.
140
+ * If no data is provided, the constructed object will be empty, but still
141
+ * valid.
142
+ * @extends {jspb.Message}
143
+ * @constructor
144
+ */
145
+ proto.notification.GetFileRequest = function(opt_data) {
146
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
147
+ };
148
+ goog.inherits(proto.notification.GetFileRequest, jspb.Message);
149
+ if (goog.DEBUG && !COMPILED) {
150
+ /**
151
+ * @public
152
+ * @override
153
+ */
154
+ proto.notification.GetFileRequest.displayName = 'proto.notification.GetFileRequest';
155
+ }
156
+
157
+
158
+
159
+ if (jspb.Message.GENERATE_TO_OBJECT) {
160
+ /**
161
+ * Creates an object representation of this proto.
162
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
163
+ * Optional fields that are not set will be set to undefined.
164
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
165
+ * For the list of reserved names please see:
166
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
167
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
168
+ * JSPB instance for transitional soy proto support:
169
+ * http://goto/soy-param-migration
170
+ * @return {!Object}
171
+ */
172
+ proto.notification.PingRequest.prototype.toObject = function(opt_includeInstance) {
173
+ return proto.notification.PingRequest.toObject(opt_includeInstance, this);
174
+ };
175
+
176
+
177
+ /**
178
+ * Static version of the {@see toObject} method.
179
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
180
+ * the JSPB instance for transitional soy proto support:
181
+ * http://goto/soy-param-migration
182
+ * @param {!proto.notification.PingRequest} msg The msg instance to transform.
183
+ * @return {!Object}
184
+ * @suppress {unusedLocalVariables} f is only used for nested messages
185
+ */
186
+ proto.notification.PingRequest.toObject = function(includeInstance, msg) {
187
+ var f, obj = {
188
+ ping: jspb.Message.getFieldWithDefault(msg, 1, "")
189
+ };
190
+
191
+ if (includeInstance) {
192
+ obj.$jspbMessageInstance = msg;
193
+ }
194
+ return obj;
195
+ };
196
+ }
197
+
198
+
199
+ /**
200
+ * Deserializes binary data (in protobuf wire format).
201
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
202
+ * @return {!proto.notification.PingRequest}
203
+ */
204
+ proto.notification.PingRequest.deserializeBinary = function(bytes) {
205
+ var reader = new jspb.BinaryReader(bytes);
206
+ var msg = new proto.notification.PingRequest;
207
+ return proto.notification.PingRequest.deserializeBinaryFromReader(msg, reader);
208
+ };
209
+
210
+
211
+ /**
212
+ * Deserializes binary data (in protobuf wire format) from the
213
+ * given reader into the given message object.
214
+ * @param {!proto.notification.PingRequest} msg The message object to deserialize into.
215
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
216
+ * @return {!proto.notification.PingRequest}
217
+ */
218
+ proto.notification.PingRequest.deserializeBinaryFromReader = function(msg, reader) {
219
+ while (reader.nextField()) {
220
+ if (reader.isEndGroup()) {
221
+ break;
222
+ }
223
+ var field = reader.getFieldNumber();
224
+ switch (field) {
225
+ case 1:
226
+ var value = /** @type {string} */ (reader.readString());
227
+ msg.setPing(value);
228
+ break;
229
+ default:
230
+ reader.skipField();
231
+ break;
232
+ }
233
+ }
234
+ return msg;
235
+ };
236
+
237
+
238
+ /**
239
+ * Serializes the message to binary data (in protobuf wire format).
240
+ * @return {!Uint8Array}
241
+ */
242
+ proto.notification.PingRequest.prototype.serializeBinary = function() {
243
+ var writer = new jspb.BinaryWriter();
244
+ proto.notification.PingRequest.serializeBinaryToWriter(this, writer);
245
+ return writer.getResultBuffer();
246
+ };
247
+
248
+
249
+ /**
250
+ * Serializes the given message to binary data (in protobuf wire
251
+ * format), writing to the given BinaryWriter.
252
+ * @param {!proto.notification.PingRequest} message
253
+ * @param {!jspb.BinaryWriter} writer
254
+ * @suppress {unusedLocalVariables} f is only used for nested messages
255
+ */
256
+ proto.notification.PingRequest.serializeBinaryToWriter = function(message, writer) {
257
+ var f = undefined;
258
+ f = message.getPing();
259
+ if (f.length > 0) {
260
+ writer.writeString(
261
+ 1,
262
+ f
263
+ );
264
+ }
265
+ };
266
+
267
+
268
+ /**
269
+ * optional string ping = 1;
270
+ * @return {string}
271
+ */
272
+ proto.notification.PingRequest.prototype.getPing = function() {
273
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
274
+ };
275
+
276
+
277
+ /**
278
+ * @param {string} value
279
+ * @return {!proto.notification.PingRequest} returns this
280
+ */
281
+ proto.notification.PingRequest.prototype.setPing = function(value) {
282
+ return jspb.Message.setProto3StringField(this, 1, value);
283
+ };
284
+
285
+
286
+
287
+
288
+
289
+ if (jspb.Message.GENERATE_TO_OBJECT) {
290
+ /**
291
+ * Creates an object representation of this proto.
292
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
293
+ * Optional fields that are not set will be set to undefined.
294
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
295
+ * For the list of reserved names please see:
296
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
297
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
298
+ * JSPB instance for transitional soy proto support:
299
+ * http://goto/soy-param-migration
300
+ * @return {!Object}
301
+ */
302
+ proto.notification.PongResponse.prototype.toObject = function(opt_includeInstance) {
303
+ return proto.notification.PongResponse.toObject(opt_includeInstance, this);
304
+ };
305
+
306
+
307
+ /**
308
+ * Static version of the {@see toObject} method.
309
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
310
+ * the JSPB instance for transitional soy proto support:
311
+ * http://goto/soy-param-migration
312
+ * @param {!proto.notification.PongResponse} msg The msg instance to transform.
313
+ * @return {!Object}
314
+ * @suppress {unusedLocalVariables} f is only used for nested messages
315
+ */
316
+ proto.notification.PongResponse.toObject = function(includeInstance, msg) {
317
+ var f, obj = {
318
+ pong: jspb.Message.getFieldWithDefault(msg, 1, "")
319
+ };
320
+
321
+ if (includeInstance) {
322
+ obj.$jspbMessageInstance = msg;
323
+ }
324
+ return obj;
325
+ };
326
+ }
327
+
328
+
329
+ /**
330
+ * Deserializes binary data (in protobuf wire format).
331
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
332
+ * @return {!proto.notification.PongResponse}
333
+ */
334
+ proto.notification.PongResponse.deserializeBinary = function(bytes) {
335
+ var reader = new jspb.BinaryReader(bytes);
336
+ var msg = new proto.notification.PongResponse;
337
+ return proto.notification.PongResponse.deserializeBinaryFromReader(msg, reader);
338
+ };
339
+
340
+
341
+ /**
342
+ * Deserializes binary data (in protobuf wire format) from the
343
+ * given reader into the given message object.
344
+ * @param {!proto.notification.PongResponse} msg The message object to deserialize into.
345
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
346
+ * @return {!proto.notification.PongResponse}
347
+ */
348
+ proto.notification.PongResponse.deserializeBinaryFromReader = function(msg, reader) {
349
+ while (reader.nextField()) {
350
+ if (reader.isEndGroup()) {
351
+ break;
352
+ }
353
+ var field = reader.getFieldNumber();
354
+ switch (field) {
355
+ case 1:
356
+ var value = /** @type {string} */ (reader.readString());
357
+ msg.setPong(value);
358
+ break;
359
+ default:
360
+ reader.skipField();
361
+ break;
362
+ }
363
+ }
364
+ return msg;
365
+ };
366
+
367
+
368
+ /**
369
+ * Serializes the message to binary data (in protobuf wire format).
370
+ * @return {!Uint8Array}
371
+ */
372
+ proto.notification.PongResponse.prototype.serializeBinary = function() {
373
+ var writer = new jspb.BinaryWriter();
374
+ proto.notification.PongResponse.serializeBinaryToWriter(this, writer);
375
+ return writer.getResultBuffer();
376
+ };
377
+
378
+
379
+ /**
380
+ * Serializes the given message to binary data (in protobuf wire
381
+ * format), writing to the given BinaryWriter.
382
+ * @param {!proto.notification.PongResponse} message
383
+ * @param {!jspb.BinaryWriter} writer
384
+ * @suppress {unusedLocalVariables} f is only used for nested messages
385
+ */
386
+ proto.notification.PongResponse.serializeBinaryToWriter = function(message, writer) {
387
+ var f = undefined;
388
+ f = message.getPong();
389
+ if (f.length > 0) {
390
+ writer.writeString(
391
+ 1,
392
+ f
393
+ );
394
+ }
395
+ };
396
+
397
+
398
+ /**
399
+ * optional string pong = 1;
400
+ * @return {string}
401
+ */
402
+ proto.notification.PongResponse.prototype.getPong = function() {
403
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
404
+ };
405
+
406
+
407
+ /**
408
+ * @param {string} value
409
+ * @return {!proto.notification.PongResponse} returns this
410
+ */
411
+ proto.notification.PongResponse.prototype.setPong = function(value) {
412
+ return jspb.Message.setProto3StringField(this, 1, value);
413
+ };
414
+
415
+
416
+
417
+
418
+
419
+ if (jspb.Message.GENERATE_TO_OBJECT) {
420
+ /**
421
+ * Creates an object representation of this proto.
422
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
423
+ * Optional fields that are not set will be set to undefined.
424
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
425
+ * For the list of reserved names please see:
426
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
427
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
428
+ * JSPB instance for transitional soy proto support:
429
+ * http://goto/soy-param-migration
430
+ * @return {!Object}
431
+ */
432
+ proto.notification.PaginationRequest.prototype.toObject = function(opt_includeInstance) {
433
+ return proto.notification.PaginationRequest.toObject(opt_includeInstance, this);
434
+ };
435
+
436
+
437
+ /**
438
+ * Static version of the {@see toObject} method.
439
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
440
+ * the JSPB instance for transitional soy proto support:
441
+ * http://goto/soy-param-migration
442
+ * @param {!proto.notification.PaginationRequest} msg The msg instance to transform.
443
+ * @return {!Object}
444
+ * @suppress {unusedLocalVariables} f is only used for nested messages
445
+ */
446
+ proto.notification.PaginationRequest.toObject = function(includeInstance, msg) {
447
+ var f, obj = {
448
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
449
+ offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
450
+ notificationSearchParams: (f = msg.getNotificationSearchParams()) && proto.notification.NotificationSearchRequest.toObject(includeInstance, f)
451
+ };
452
+
453
+ if (includeInstance) {
454
+ obj.$jspbMessageInstance = msg;
455
+ }
456
+ return obj;
457
+ };
458
+ }
459
+
460
+
461
+ /**
462
+ * Deserializes binary data (in protobuf wire format).
463
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
464
+ * @return {!proto.notification.PaginationRequest}
465
+ */
466
+ proto.notification.PaginationRequest.deserializeBinary = function(bytes) {
467
+ var reader = new jspb.BinaryReader(bytes);
468
+ var msg = new proto.notification.PaginationRequest;
469
+ return proto.notification.PaginationRequest.deserializeBinaryFromReader(msg, reader);
470
+ };
471
+
472
+
473
+ /**
474
+ * Deserializes binary data (in protobuf wire format) from the
475
+ * given reader into the given message object.
476
+ * @param {!proto.notification.PaginationRequest} msg The message object to deserialize into.
477
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
478
+ * @return {!proto.notification.PaginationRequest}
479
+ */
480
+ proto.notification.PaginationRequest.deserializeBinaryFromReader = function(msg, reader) {
481
+ while (reader.nextField()) {
482
+ if (reader.isEndGroup()) {
483
+ break;
484
+ }
485
+ var field = reader.getFieldNumber();
486
+ switch (field) {
487
+ case 1:
488
+ var value = /** @type {number} */ (reader.readInt32());
489
+ msg.setLimit(value);
490
+ break;
491
+ case 2:
492
+ var value = /** @type {number} */ (reader.readInt32());
493
+ msg.setOffset(value);
494
+ break;
495
+ case 3:
496
+ var value = new proto.notification.NotificationSearchRequest;
497
+ reader.readMessage(value,proto.notification.NotificationSearchRequest.deserializeBinaryFromReader);
498
+ msg.setNotificationSearchParams(value);
499
+ break;
500
+ default:
501
+ reader.skipField();
502
+ break;
503
+ }
504
+ }
505
+ return msg;
506
+ };
507
+
508
+
509
+ /**
510
+ * Serializes the message to binary data (in protobuf wire format).
511
+ * @return {!Uint8Array}
512
+ */
513
+ proto.notification.PaginationRequest.prototype.serializeBinary = function() {
514
+ var writer = new jspb.BinaryWriter();
515
+ proto.notification.PaginationRequest.serializeBinaryToWriter(this, writer);
516
+ return writer.getResultBuffer();
517
+ };
518
+
519
+
520
+ /**
521
+ * Serializes the given message to binary data (in protobuf wire
522
+ * format), writing to the given BinaryWriter.
523
+ * @param {!proto.notification.PaginationRequest} message
524
+ * @param {!jspb.BinaryWriter} writer
525
+ * @suppress {unusedLocalVariables} f is only used for nested messages
526
+ */
527
+ proto.notification.PaginationRequest.serializeBinaryToWriter = function(message, writer) {
528
+ var f = undefined;
529
+ f = message.getLimit();
530
+ if (f !== 0) {
531
+ writer.writeInt32(
532
+ 1,
533
+ f
534
+ );
535
+ }
536
+ f = message.getOffset();
537
+ if (f !== 0) {
538
+ writer.writeInt32(
539
+ 2,
540
+ f
541
+ );
542
+ }
543
+ f = message.getNotificationSearchParams();
544
+ if (f != null) {
545
+ writer.writeMessage(
546
+ 3,
547
+ f,
548
+ proto.notification.NotificationSearchRequest.serializeBinaryToWriter
549
+ );
550
+ }
551
+ };
552
+
553
+
554
+ /**
555
+ * optional int32 limit = 1;
556
+ * @return {number}
557
+ */
558
+ proto.notification.PaginationRequest.prototype.getLimit = function() {
559
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
560
+ };
561
+
562
+
563
+ /**
564
+ * @param {number} value
565
+ * @return {!proto.notification.PaginationRequest} returns this
566
+ */
567
+ proto.notification.PaginationRequest.prototype.setLimit = function(value) {
568
+ return jspb.Message.setProto3IntField(this, 1, value);
569
+ };
570
+
571
+
572
+ /**
573
+ * optional int32 offset = 2;
574
+ * @return {number}
575
+ */
576
+ proto.notification.PaginationRequest.prototype.getOffset = function() {
577
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
578
+ };
579
+
580
+
581
+ /**
582
+ * @param {number} value
583
+ * @return {!proto.notification.PaginationRequest} returns this
584
+ */
585
+ proto.notification.PaginationRequest.prototype.setOffset = function(value) {
586
+ return jspb.Message.setProto3IntField(this, 2, value);
587
+ };
588
+
589
+
590
+ /**
591
+ * optional NotificationSearchRequest notification_search_params = 3;
592
+ * @return {?proto.notification.NotificationSearchRequest}
593
+ */
594
+ proto.notification.PaginationRequest.prototype.getNotificationSearchParams = function() {
595
+ return /** @type{?proto.notification.NotificationSearchRequest} */ (
596
+ jspb.Message.getWrapperField(this, proto.notification.NotificationSearchRequest, 3));
597
+ };
598
+
599
+
600
+ /**
601
+ * @param {?proto.notification.NotificationSearchRequest|undefined} value
602
+ * @return {!proto.notification.PaginationRequest} returns this
603
+ */
604
+ proto.notification.PaginationRequest.prototype.setNotificationSearchParams = function(value) {
605
+ return jspb.Message.setWrapperField(this, 3, value);
606
+ };
607
+
608
+
609
+ /**
610
+ * Clears the message field making it undefined.
611
+ * @return {!proto.notification.PaginationRequest} returns this
612
+ */
613
+ proto.notification.PaginationRequest.prototype.clearNotificationSearchParams = function() {
614
+ return this.setNotificationSearchParams(undefined);
615
+ };
616
+
617
+
618
+ /**
619
+ * Returns whether this field is set.
620
+ * @return {boolean}
621
+ */
622
+ proto.notification.PaginationRequest.prototype.hasNotificationSearchParams = function() {
623
+ return jspb.Message.getField(this, 3) != null;
624
+ };
625
+
626
+
627
+
628
+
629
+
630
+ if (jspb.Message.GENERATE_TO_OBJECT) {
631
+ /**
632
+ * Creates an object representation of this proto.
633
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
634
+ * Optional fields that are not set will be set to undefined.
635
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
636
+ * For the list of reserved names please see:
637
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
638
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
639
+ * JSPB instance for transitional soy proto support:
640
+ * http://goto/soy-param-migration
641
+ * @return {!Object}
642
+ */
643
+ proto.notification.NotificationSearchRequest.prototype.toObject = function(opt_includeInstance) {
644
+ return proto.notification.NotificationSearchRequest.toObject(opt_includeInstance, this);
645
+ };
646
+
647
+
648
+ /**
649
+ * Static version of the {@see toObject} method.
650
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
651
+ * the JSPB instance for transitional soy proto support:
652
+ * http://goto/soy-param-migration
653
+ * @param {!proto.notification.NotificationSearchRequest} msg The msg instance to transform.
654
+ * @return {!Object}
655
+ * @suppress {unusedLocalVariables} f is only used for nested messages
656
+ */
657
+ proto.notification.NotificationSearchRequest.toObject = function(includeInstance, msg) {
658
+ var f, obj = {
659
+ notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
660
+ userId: jspb.Message.getFieldWithDefault(msg, 2, 0),
661
+ notificationTitle: jspb.Message.getFieldWithDefault(msg, 3, "")
662
+ };
663
+
664
+ if (includeInstance) {
665
+ obj.$jspbMessageInstance = msg;
666
+ }
667
+ return obj;
668
+ };
669
+ }
670
+
671
+
672
+ /**
673
+ * Deserializes binary data (in protobuf wire format).
674
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
675
+ * @return {!proto.notification.NotificationSearchRequest}
676
+ */
677
+ proto.notification.NotificationSearchRequest.deserializeBinary = function(bytes) {
678
+ var reader = new jspb.BinaryReader(bytes);
679
+ var msg = new proto.notification.NotificationSearchRequest;
680
+ return proto.notification.NotificationSearchRequest.deserializeBinaryFromReader(msg, reader);
681
+ };
682
+
683
+
684
+ /**
685
+ * Deserializes binary data (in protobuf wire format) from the
686
+ * given reader into the given message object.
687
+ * @param {!proto.notification.NotificationSearchRequest} msg The message object to deserialize into.
688
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
689
+ * @return {!proto.notification.NotificationSearchRequest}
690
+ */
691
+ proto.notification.NotificationSearchRequest.deserializeBinaryFromReader = function(msg, reader) {
692
+ while (reader.nextField()) {
693
+ if (reader.isEndGroup()) {
694
+ break;
695
+ }
696
+ var field = reader.getFieldNumber();
697
+ switch (field) {
698
+ case 1:
699
+ var value = /** @type {number} */ (reader.readInt32());
700
+ msg.setNotificationId(value);
701
+ break;
702
+ case 2:
703
+ var value = /** @type {number} */ (reader.readInt32());
704
+ msg.setUserId(value);
705
+ break;
706
+ case 3:
707
+ var value = /** @type {string} */ (reader.readString());
708
+ msg.setNotificationTitle(value);
709
+ break;
710
+ default:
711
+ reader.skipField();
712
+ break;
713
+ }
714
+ }
715
+ return msg;
716
+ };
717
+
718
+
719
+ /**
720
+ * Serializes the message to binary data (in protobuf wire format).
721
+ * @return {!Uint8Array}
722
+ */
723
+ proto.notification.NotificationSearchRequest.prototype.serializeBinary = function() {
724
+ var writer = new jspb.BinaryWriter();
725
+ proto.notification.NotificationSearchRequest.serializeBinaryToWriter(this, writer);
726
+ return writer.getResultBuffer();
727
+ };
728
+
729
+
730
+ /**
731
+ * Serializes the given message to binary data (in protobuf wire
732
+ * format), writing to the given BinaryWriter.
733
+ * @param {!proto.notification.NotificationSearchRequest} message
734
+ * @param {!jspb.BinaryWriter} writer
735
+ * @suppress {unusedLocalVariables} f is only used for nested messages
736
+ */
737
+ proto.notification.NotificationSearchRequest.serializeBinaryToWriter = function(message, writer) {
738
+ var f = undefined;
739
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
740
+ if (f != null) {
741
+ writer.writeInt32(
742
+ 1,
743
+ f
744
+ );
745
+ }
746
+ f = /** @type {number} */ (jspb.Message.getField(message, 2));
747
+ if (f != null) {
748
+ writer.writeInt32(
749
+ 2,
750
+ f
751
+ );
752
+ }
753
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
754
+ if (f != null) {
755
+ writer.writeString(
756
+ 3,
757
+ f
758
+ );
759
+ }
760
+ };
761
+
762
+
763
+ /**
764
+ * optional int32 notification_id = 1;
765
+ * @return {number}
766
+ */
767
+ proto.notification.NotificationSearchRequest.prototype.getNotificationId = function() {
768
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
769
+ };
770
+
771
+
772
+ /**
773
+ * @param {number} value
774
+ * @return {!proto.notification.NotificationSearchRequest} returns this
775
+ */
776
+ proto.notification.NotificationSearchRequest.prototype.setNotificationId = function(value) {
777
+ return jspb.Message.setField(this, 1, value);
778
+ };
779
+
780
+
781
+ /**
782
+ * Clears the field making it undefined.
783
+ * @return {!proto.notification.NotificationSearchRequest} returns this
784
+ */
785
+ proto.notification.NotificationSearchRequest.prototype.clearNotificationId = function() {
786
+ return jspb.Message.setField(this, 1, undefined);
787
+ };
788
+
789
+
790
+ /**
791
+ * Returns whether this field is set.
792
+ * @return {boolean}
793
+ */
794
+ proto.notification.NotificationSearchRequest.prototype.hasNotificationId = function() {
795
+ return jspb.Message.getField(this, 1) != null;
796
+ };
797
+
798
+
799
+ /**
800
+ * optional int32 user_id = 2;
801
+ * @return {number}
802
+ */
803
+ proto.notification.NotificationSearchRequest.prototype.getUserId = function() {
804
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
805
+ };
806
+
807
+
808
+ /**
809
+ * @param {number} value
810
+ * @return {!proto.notification.NotificationSearchRequest} returns this
811
+ */
812
+ proto.notification.NotificationSearchRequest.prototype.setUserId = function(value) {
813
+ return jspb.Message.setField(this, 2, value);
814
+ };
815
+
816
+
817
+ /**
818
+ * Clears the field making it undefined.
819
+ * @return {!proto.notification.NotificationSearchRequest} returns this
820
+ */
821
+ proto.notification.NotificationSearchRequest.prototype.clearUserId = function() {
822
+ return jspb.Message.setField(this, 2, undefined);
823
+ };
824
+
825
+
826
+ /**
827
+ * Returns whether this field is set.
828
+ * @return {boolean}
829
+ */
830
+ proto.notification.NotificationSearchRequest.prototype.hasUserId = function() {
831
+ return jspb.Message.getField(this, 2) != null;
832
+ };
833
+
834
+
835
+ /**
836
+ * optional string notification_title = 3;
837
+ * @return {string}
838
+ */
839
+ proto.notification.NotificationSearchRequest.prototype.getNotificationTitle = function() {
840
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
841
+ };
842
+
843
+
844
+ /**
845
+ * @param {string} value
846
+ * @return {!proto.notification.NotificationSearchRequest} returns this
847
+ */
848
+ proto.notification.NotificationSearchRequest.prototype.setNotificationTitle = function(value) {
849
+ return jspb.Message.setField(this, 3, value);
850
+ };
851
+
852
+
853
+ /**
854
+ * Clears the field making it undefined.
855
+ * @return {!proto.notification.NotificationSearchRequest} returns this
856
+ */
857
+ proto.notification.NotificationSearchRequest.prototype.clearNotificationTitle = function() {
858
+ return jspb.Message.setField(this, 3, undefined);
859
+ };
860
+
861
+
862
+ /**
863
+ * Returns whether this field is set.
864
+ * @return {boolean}
865
+ */
866
+ proto.notification.NotificationSearchRequest.prototype.hasNotificationTitle = function() {
867
+ return jspb.Message.getField(this, 3) != null;
868
+ };
869
+
870
+
871
+
872
+
873
+
874
+ if (jspb.Message.GENERATE_TO_OBJECT) {
875
+ /**
876
+ * Creates an object representation of this proto.
877
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
878
+ * Optional fields that are not set will be set to undefined.
879
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
880
+ * For the list of reserved names please see:
881
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
882
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
883
+ * JSPB instance for transitional soy proto support:
884
+ * http://goto/soy-param-migration
885
+ * @return {!Object}
886
+ */
887
+ proto.notification.File.prototype.toObject = function(opt_includeInstance) {
888
+ return proto.notification.File.toObject(opt_includeInstance, this);
889
+ };
890
+
891
+
892
+ /**
893
+ * Static version of the {@see toObject} method.
894
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
895
+ * the JSPB instance for transitional soy proto support:
896
+ * http://goto/soy-param-migration
897
+ * @param {!proto.notification.File} msg The msg instance to transform.
898
+ * @return {!Object}
899
+ * @suppress {unusedLocalVariables} f is only used for nested messages
900
+ */
901
+ proto.notification.File.toObject = function(includeInstance, msg) {
902
+ var f, obj = {
903
+ media: msg.getMedia_asB64()
904
+ };
905
+
906
+ if (includeInstance) {
907
+ obj.$jspbMessageInstance = msg;
908
+ }
909
+ return obj;
910
+ };
911
+ }
912
+
913
+
914
+ /**
915
+ * Deserializes binary data (in protobuf wire format).
916
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
917
+ * @return {!proto.notification.File}
918
+ */
919
+ proto.notification.File.deserializeBinary = function(bytes) {
920
+ var reader = new jspb.BinaryReader(bytes);
921
+ var msg = new proto.notification.File;
922
+ return proto.notification.File.deserializeBinaryFromReader(msg, reader);
923
+ };
924
+
925
+
926
+ /**
927
+ * Deserializes binary data (in protobuf wire format) from the
928
+ * given reader into the given message object.
929
+ * @param {!proto.notification.File} msg The message object to deserialize into.
930
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
931
+ * @return {!proto.notification.File}
932
+ */
933
+ proto.notification.File.deserializeBinaryFromReader = function(msg, reader) {
934
+ while (reader.nextField()) {
935
+ if (reader.isEndGroup()) {
936
+ break;
937
+ }
938
+ var field = reader.getFieldNumber();
939
+ switch (field) {
940
+ case 1:
941
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
942
+ msg.setMedia(value);
943
+ break;
944
+ default:
945
+ reader.skipField();
946
+ break;
947
+ }
948
+ }
949
+ return msg;
950
+ };
951
+
952
+
953
+ /**
954
+ * Serializes the message to binary data (in protobuf wire format).
955
+ * @return {!Uint8Array}
956
+ */
957
+ proto.notification.File.prototype.serializeBinary = function() {
958
+ var writer = new jspb.BinaryWriter();
959
+ proto.notification.File.serializeBinaryToWriter(this, writer);
960
+ return writer.getResultBuffer();
961
+ };
962
+
963
+
964
+ /**
965
+ * Serializes the given message to binary data (in protobuf wire
966
+ * format), writing to the given BinaryWriter.
967
+ * @param {!proto.notification.File} message
968
+ * @param {!jspb.BinaryWriter} writer
969
+ * @suppress {unusedLocalVariables} f is only used for nested messages
970
+ */
971
+ proto.notification.File.serializeBinaryToWriter = function(message, writer) {
972
+ var f = undefined;
973
+ f = message.getMedia_asU8();
974
+ if (f.length > 0) {
975
+ writer.writeBytes(
976
+ 1,
977
+ f
978
+ );
979
+ }
980
+ };
981
+
982
+
983
+ /**
984
+ * optional bytes media = 1;
985
+ * @return {!(string|Uint8Array)}
986
+ */
987
+ proto.notification.File.prototype.getMedia = function() {
988
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
989
+ };
990
+
991
+
992
+ /**
993
+ * optional bytes media = 1;
994
+ * This is a type-conversion wrapper around `getMedia()`
995
+ * @return {string}
996
+ */
997
+ proto.notification.File.prototype.getMedia_asB64 = function() {
998
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
999
+ this.getMedia()));
1000
+ };
1001
+
1002
+
1003
+ /**
1004
+ * optional bytes media = 1;
1005
+ * Note that Uint8Array is not supported on all browsers.
1006
+ * @see http://caniuse.com/Uint8Array
1007
+ * This is a type-conversion wrapper around `getMedia()`
1008
+ * @return {!Uint8Array}
1009
+ */
1010
+ proto.notification.File.prototype.getMedia_asU8 = function() {
1011
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1012
+ this.getMedia()));
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * @param {!(string|Uint8Array)} value
1018
+ * @return {!proto.notification.File} returns this
1019
+ */
1020
+ proto.notification.File.prototype.setMedia = function(value) {
1021
+ return jspb.Message.setProto3BytesField(this, 1, value);
1022
+ };
1023
+
1024
+
1025
+
1026
+
1027
+
1028
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1029
+ /**
1030
+ * Creates an object representation of this proto.
1031
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1032
+ * Optional fields that are not set will be set to undefined.
1033
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1034
+ * For the list of reserved names please see:
1035
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1036
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1037
+ * JSPB instance for transitional soy proto support:
1038
+ * http://goto/soy-param-migration
1039
+ * @return {!Object}
1040
+ */
1041
+ proto.notification.GetFileRequest.prototype.toObject = function(opt_includeInstance) {
1042
+ return proto.notification.GetFileRequest.toObject(opt_includeInstance, this);
1043
+ };
1044
+
1045
+
1046
+ /**
1047
+ * Static version of the {@see toObject} method.
1048
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1049
+ * the JSPB instance for transitional soy proto support:
1050
+ * http://goto/soy-param-migration
1051
+ * @param {!proto.notification.GetFileRequest} msg The msg instance to transform.
1052
+ * @return {!Object}
1053
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1054
+ */
1055
+ proto.notification.GetFileRequest.toObject = function(includeInstance, msg) {
1056
+ var f, obj = {
1057
+ fileName: jspb.Message.getFieldWithDefault(msg, 1, ""),
1058
+ instanceType: jspb.Message.getFieldWithDefault(msg, 2, "")
1059
+ };
1060
+
1061
+ if (includeInstance) {
1062
+ obj.$jspbMessageInstance = msg;
1063
+ }
1064
+ return obj;
1065
+ };
1066
+ }
1067
+
1068
+
1069
+ /**
1070
+ * Deserializes binary data (in protobuf wire format).
1071
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1072
+ * @return {!proto.notification.GetFileRequest}
1073
+ */
1074
+ proto.notification.GetFileRequest.deserializeBinary = function(bytes) {
1075
+ var reader = new jspb.BinaryReader(bytes);
1076
+ var msg = new proto.notification.GetFileRequest;
1077
+ return proto.notification.GetFileRequest.deserializeBinaryFromReader(msg, reader);
1078
+ };
1079
+
1080
+
1081
+ /**
1082
+ * Deserializes binary data (in protobuf wire format) from the
1083
+ * given reader into the given message object.
1084
+ * @param {!proto.notification.GetFileRequest} msg The message object to deserialize into.
1085
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1086
+ * @return {!proto.notification.GetFileRequest}
1087
+ */
1088
+ proto.notification.GetFileRequest.deserializeBinaryFromReader = function(msg, reader) {
1089
+ while (reader.nextField()) {
1090
+ if (reader.isEndGroup()) {
1091
+ break;
1092
+ }
1093
+ var field = reader.getFieldNumber();
1094
+ switch (field) {
1095
+ case 1:
1096
+ var value = /** @type {string} */ (reader.readString());
1097
+ msg.setFileName(value);
1098
+ break;
1099
+ case 2:
1100
+ var value = /** @type {string} */ (reader.readString());
1101
+ msg.setInstanceType(value);
1102
+ break;
1103
+ default:
1104
+ reader.skipField();
1105
+ break;
1106
+ }
1107
+ }
1108
+ return msg;
1109
+ };
1110
+
1111
+
1112
+ /**
1113
+ * Serializes the message to binary data (in protobuf wire format).
1114
+ * @return {!Uint8Array}
1115
+ */
1116
+ proto.notification.GetFileRequest.prototype.serializeBinary = function() {
1117
+ var writer = new jspb.BinaryWriter();
1118
+ proto.notification.GetFileRequest.serializeBinaryToWriter(this, writer);
1119
+ return writer.getResultBuffer();
1120
+ };
1121
+
1122
+
1123
+ /**
1124
+ * Serializes the given message to binary data (in protobuf wire
1125
+ * format), writing to the given BinaryWriter.
1126
+ * @param {!proto.notification.GetFileRequest} message
1127
+ * @param {!jspb.BinaryWriter} writer
1128
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1129
+ */
1130
+ proto.notification.GetFileRequest.serializeBinaryToWriter = function(message, writer) {
1131
+ var f = undefined;
1132
+ f = message.getFileName();
1133
+ if (f.length > 0) {
1134
+ writer.writeString(
1135
+ 1,
1136
+ f
1137
+ );
1138
+ }
1139
+ f = message.getInstanceType();
1140
+ if (f.length > 0) {
1141
+ writer.writeString(
1142
+ 2,
1143
+ f
1144
+ );
1145
+ }
1146
+ };
1147
+
1148
+
1149
+ /**
1150
+ * optional string file_name = 1;
1151
+ * @return {string}
1152
+ */
1153
+ proto.notification.GetFileRequest.prototype.getFileName = function() {
1154
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1155
+ };
1156
+
1157
+
1158
+ /**
1159
+ * @param {string} value
1160
+ * @return {!proto.notification.GetFileRequest} returns this
1161
+ */
1162
+ proto.notification.GetFileRequest.prototype.setFileName = function(value) {
1163
+ return jspb.Message.setProto3StringField(this, 1, value);
1164
+ };
1165
+
1166
+
1167
+ /**
1168
+ * optional string instance_type = 2;
1169
+ * @return {string}
1170
+ */
1171
+ proto.notification.GetFileRequest.prototype.getInstanceType = function() {
1172
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1173
+ };
1174
+
1175
+
1176
+ /**
1177
+ * @param {string} value
1178
+ * @return {!proto.notification.GetFileRequest} returns this
1179
+ */
1180
+ proto.notification.GetFileRequest.prototype.setInstanceType = function(value) {
1181
+ return jspb.Message.setProto3StringField(this, 2, value);
1182
+ };
1183
+
1184
+
1185
+ goog.object.extend(exports, proto.notification);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.174",
3
+ "version": "1.0.175",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,4 +8,5 @@ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:file --grpc_out=grp
8
8
  grpc_tools_node_protoc --js_out=import_style=commonjs,binary:bet --grpc_out=grpc_js:bet --proto_path=./bet ./bet/*.proto &&
9
9
  grpc_tools_node_protoc --js_out=import_style=commonjs,binary:cms --grpc_out=grpc_js:cms --proto_path=./cms ./cms/*.proto &&
10
10
  grpc_tools_node_protoc --js_out=import_style=commonjs,binary:bonus --grpc_out=grpc_js:bonus --proto_path=./bonus ./bonus/*.proto &&
11
- grpc_tools_node_protoc --js_out=import_style=commonjs,binary:loyalty --grpc_out=grpc_js:loyalty --proto_path=./loyalty ./loyalty/*.proto
11
+ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:loyalty --grpc_out=grpc_js:loyalty --proto_path=./loyalty ./loyalty/*.proto &&
12
+ grpc_tools_node_protoc --js_out=import_style=commonjs,binary:notification --grpc_out=grpc_js:notification --proto_path=./notification ./notification/*.proto