protobuf-platform 1.0.245 → 1.0.247

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.
@@ -1,3957 +0,0 @@
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.GetNotificationRequest', null, global);
27
- goog.exportSymbol('proto.notification.NotificationItem', null, global);
28
- goog.exportSymbol('proto.notification.NotificationItemsResponse', null, global);
29
- goog.exportSymbol('proto.notification.NotificationRequest', null, global);
30
- goog.exportSymbol('proto.notification.NotificationResponse', null, global);
31
- goog.exportSymbol('proto.notification.NotificationSearchRequest', null, global);
32
- goog.exportSymbol('proto.notification.NotificationStatusResponse', null, global);
33
- goog.exportSymbol('proto.notification.PaginationRequest', null, global);
34
- goog.exportSymbol('proto.notification.PingRequest', null, global);
35
- goog.exportSymbol('proto.notification.PongResponse', null, global);
36
- goog.exportSymbol('proto.notification.SendNotificationRequest', null, global);
37
- goog.exportSymbol('proto.notification.UserNotificationItem', null, global);
38
- goog.exportSymbol('proto.notification.UserNotificationItemsResponse', null, global);
39
- goog.exportSymbol('proto.notification.UserNotificationsCountResponse', null, global);
40
- goog.exportSymbol('proto.notification.UserSearchRequest', null, global);
41
- /**
42
- * Generated by JsPbCodeGenerator.
43
- * @param {Array=} opt_data Optional initial data array, typically from a
44
- * server response, or constructed directly in Javascript. The array is used
45
- * in place and becomes part of the constructed object. It is not cloned.
46
- * If no data is provided, the constructed object will be empty, but still
47
- * valid.
48
- * @extends {jspb.Message}
49
- * @constructor
50
- */
51
- proto.notification.PingRequest = function(opt_data) {
52
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
53
- };
54
- goog.inherits(proto.notification.PingRequest, jspb.Message);
55
- if (goog.DEBUG && !COMPILED) {
56
- /**
57
- * @public
58
- * @override
59
- */
60
- proto.notification.PingRequest.displayName = 'proto.notification.PingRequest';
61
- }
62
- /**
63
- * Generated by JsPbCodeGenerator.
64
- * @param {Array=} opt_data Optional initial data array, typically from a
65
- * server response, or constructed directly in Javascript. The array is used
66
- * in place and becomes part of the constructed object. It is not cloned.
67
- * If no data is provided, the constructed object will be empty, but still
68
- * valid.
69
- * @extends {jspb.Message}
70
- * @constructor
71
- */
72
- proto.notification.PongResponse = function(opt_data) {
73
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
74
- };
75
- goog.inherits(proto.notification.PongResponse, jspb.Message);
76
- if (goog.DEBUG && !COMPILED) {
77
- /**
78
- * @public
79
- * @override
80
- */
81
- proto.notification.PongResponse.displayName = 'proto.notification.PongResponse';
82
- }
83
- /**
84
- * Generated by JsPbCodeGenerator.
85
- * @param {Array=} opt_data Optional initial data array, typically from a
86
- * server response, or constructed directly in Javascript. The array is used
87
- * in place and becomes part of the constructed object. It is not cloned.
88
- * If no data is provided, the constructed object will be empty, but still
89
- * valid.
90
- * @extends {jspb.Message}
91
- * @constructor
92
- */
93
- proto.notification.PaginationRequest = function(opt_data) {
94
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
95
- };
96
- goog.inherits(proto.notification.PaginationRequest, jspb.Message);
97
- if (goog.DEBUG && !COMPILED) {
98
- /**
99
- * @public
100
- * @override
101
- */
102
- proto.notification.PaginationRequest.displayName = 'proto.notification.PaginationRequest';
103
- }
104
- /**
105
- * Generated by JsPbCodeGenerator.
106
- * @param {Array=} opt_data Optional initial data array, typically from a
107
- * server response, or constructed directly in Javascript. The array is used
108
- * in place and becomes part of the constructed object. It is not cloned.
109
- * If no data is provided, the constructed object will be empty, but still
110
- * valid.
111
- * @extends {jspb.Message}
112
- * @constructor
113
- */
114
- proto.notification.NotificationSearchRequest = function(opt_data) {
115
- jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.NotificationSearchRequest.repeatedFields_, null);
116
- };
117
- goog.inherits(proto.notification.NotificationSearchRequest, jspb.Message);
118
- if (goog.DEBUG && !COMPILED) {
119
- /**
120
- * @public
121
- * @override
122
- */
123
- proto.notification.NotificationSearchRequest.displayName = 'proto.notification.NotificationSearchRequest';
124
- }
125
- /**
126
- * Generated by JsPbCodeGenerator.
127
- * @param {Array=} opt_data Optional initial data array, typically from a
128
- * server response, or constructed directly in Javascript. The array is used
129
- * in place and becomes part of the constructed object. It is not cloned.
130
- * If no data is provided, the constructed object will be empty, but still
131
- * valid.
132
- * @extends {jspb.Message}
133
- * @constructor
134
- */
135
- proto.notification.UserSearchRequest = function(opt_data) {
136
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
137
- };
138
- goog.inherits(proto.notification.UserSearchRequest, jspb.Message);
139
- if (goog.DEBUG && !COMPILED) {
140
- /**
141
- * @public
142
- * @override
143
- */
144
- proto.notification.UserSearchRequest.displayName = 'proto.notification.UserSearchRequest';
145
- }
146
- /**
147
- * Generated by JsPbCodeGenerator.
148
- * @param {Array=} opt_data Optional initial data array, typically from a
149
- * server response, or constructed directly in Javascript. The array is used
150
- * in place and becomes part of the constructed object. It is not cloned.
151
- * If no data is provided, the constructed object will be empty, but still
152
- * valid.
153
- * @extends {jspb.Message}
154
- * @constructor
155
- */
156
- proto.notification.File = function(opt_data) {
157
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
158
- };
159
- goog.inherits(proto.notification.File, jspb.Message);
160
- if (goog.DEBUG && !COMPILED) {
161
- /**
162
- * @public
163
- * @override
164
- */
165
- proto.notification.File.displayName = 'proto.notification.File';
166
- }
167
- /**
168
- * Generated by JsPbCodeGenerator.
169
- * @param {Array=} opt_data Optional initial data array, typically from a
170
- * server response, or constructed directly in Javascript. The array is used
171
- * in place and becomes part of the constructed object. It is not cloned.
172
- * If no data is provided, the constructed object will be empty, but still
173
- * valid.
174
- * @extends {jspb.Message}
175
- * @constructor
176
- */
177
- proto.notification.GetFileRequest = function(opt_data) {
178
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
179
- };
180
- goog.inherits(proto.notification.GetFileRequest, jspb.Message);
181
- if (goog.DEBUG && !COMPILED) {
182
- /**
183
- * @public
184
- * @override
185
- */
186
- proto.notification.GetFileRequest.displayName = 'proto.notification.GetFileRequest';
187
- }
188
- /**
189
- * Generated by JsPbCodeGenerator.
190
- * @param {Array=} opt_data Optional initial data array, typically from a
191
- * server response, or constructed directly in Javascript. The array is used
192
- * in place and becomes part of the constructed object. It is not cloned.
193
- * If no data is provided, the constructed object will be empty, but still
194
- * valid.
195
- * @extends {jspb.Message}
196
- * @constructor
197
- */
198
- proto.notification.NotificationRequest = function(opt_data) {
199
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
200
- };
201
- goog.inherits(proto.notification.NotificationRequest, jspb.Message);
202
- if (goog.DEBUG && !COMPILED) {
203
- /**
204
- * @public
205
- * @override
206
- */
207
- proto.notification.NotificationRequest.displayName = 'proto.notification.NotificationRequest';
208
- }
209
- /**
210
- * Generated by JsPbCodeGenerator.
211
- * @param {Array=} opt_data Optional initial data array, typically from a
212
- * server response, or constructed directly in Javascript. The array is used
213
- * in place and becomes part of the constructed object. It is not cloned.
214
- * If no data is provided, the constructed object will be empty, but still
215
- * valid.
216
- * @extends {jspb.Message}
217
- * @constructor
218
- */
219
- proto.notification.GetNotificationRequest = function(opt_data) {
220
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
221
- };
222
- goog.inherits(proto.notification.GetNotificationRequest, jspb.Message);
223
- if (goog.DEBUG && !COMPILED) {
224
- /**
225
- * @public
226
- * @override
227
- */
228
- proto.notification.GetNotificationRequest.displayName = 'proto.notification.GetNotificationRequest';
229
- }
230
- /**
231
- * Generated by JsPbCodeGenerator.
232
- * @param {Array=} opt_data Optional initial data array, typically from a
233
- * server response, or constructed directly in Javascript. The array is used
234
- * in place and becomes part of the constructed object. It is not cloned.
235
- * If no data is provided, the constructed object will be empty, but still
236
- * valid.
237
- * @extends {jspb.Message}
238
- * @constructor
239
- */
240
- proto.notification.SendNotificationRequest = function(opt_data) {
241
- jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.SendNotificationRequest.repeatedFields_, null);
242
- };
243
- goog.inherits(proto.notification.SendNotificationRequest, jspb.Message);
244
- if (goog.DEBUG && !COMPILED) {
245
- /**
246
- * @public
247
- * @override
248
- */
249
- proto.notification.SendNotificationRequest.displayName = 'proto.notification.SendNotificationRequest';
250
- }
251
- /**
252
- * Generated by JsPbCodeGenerator.
253
- * @param {Array=} opt_data Optional initial data array, typically from a
254
- * server response, or constructed directly in Javascript. The array is used
255
- * in place and becomes part of the constructed object. It is not cloned.
256
- * If no data is provided, the constructed object will be empty, but still
257
- * valid.
258
- * @extends {jspb.Message}
259
- * @constructor
260
- */
261
- proto.notification.NotificationStatusResponse = function(opt_data) {
262
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
263
- };
264
- goog.inherits(proto.notification.NotificationStatusResponse, jspb.Message);
265
- if (goog.DEBUG && !COMPILED) {
266
- /**
267
- * @public
268
- * @override
269
- */
270
- proto.notification.NotificationStatusResponse.displayName = 'proto.notification.NotificationStatusResponse';
271
- }
272
- /**
273
- * Generated by JsPbCodeGenerator.
274
- * @param {Array=} opt_data Optional initial data array, typically from a
275
- * server response, or constructed directly in Javascript. The array is used
276
- * in place and becomes part of the constructed object. It is not cloned.
277
- * If no data is provided, the constructed object will be empty, but still
278
- * valid.
279
- * @extends {jspb.Message}
280
- * @constructor
281
- */
282
- proto.notification.UserNotificationItem = function(opt_data) {
283
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
284
- };
285
- goog.inherits(proto.notification.UserNotificationItem, jspb.Message);
286
- if (goog.DEBUG && !COMPILED) {
287
- /**
288
- * @public
289
- * @override
290
- */
291
- proto.notification.UserNotificationItem.displayName = 'proto.notification.UserNotificationItem';
292
- }
293
- /**
294
- * Generated by JsPbCodeGenerator.
295
- * @param {Array=} opt_data Optional initial data array, typically from a
296
- * server response, or constructed directly in Javascript. The array is used
297
- * in place and becomes part of the constructed object. It is not cloned.
298
- * If no data is provided, the constructed object will be empty, but still
299
- * valid.
300
- * @extends {jspb.Message}
301
- * @constructor
302
- */
303
- proto.notification.UserNotificationItemsResponse = function(opt_data) {
304
- jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.UserNotificationItemsResponse.repeatedFields_, null);
305
- };
306
- goog.inherits(proto.notification.UserNotificationItemsResponse, jspb.Message);
307
- if (goog.DEBUG && !COMPILED) {
308
- /**
309
- * @public
310
- * @override
311
- */
312
- proto.notification.UserNotificationItemsResponse.displayName = 'proto.notification.UserNotificationItemsResponse';
313
- }
314
- /**
315
- * Generated by JsPbCodeGenerator.
316
- * @param {Array=} opt_data Optional initial data array, typically from a
317
- * server response, or constructed directly in Javascript. The array is used
318
- * in place and becomes part of the constructed object. It is not cloned.
319
- * If no data is provided, the constructed object will be empty, but still
320
- * valid.
321
- * @extends {jspb.Message}
322
- * @constructor
323
- */
324
- proto.notification.NotificationItem = function(opt_data) {
325
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
326
- };
327
- goog.inherits(proto.notification.NotificationItem, jspb.Message);
328
- if (goog.DEBUG && !COMPILED) {
329
- /**
330
- * @public
331
- * @override
332
- */
333
- proto.notification.NotificationItem.displayName = 'proto.notification.NotificationItem';
334
- }
335
- /**
336
- * Generated by JsPbCodeGenerator.
337
- * @param {Array=} opt_data Optional initial data array, typically from a
338
- * server response, or constructed directly in Javascript. The array is used
339
- * in place and becomes part of the constructed object. It is not cloned.
340
- * If no data is provided, the constructed object will be empty, but still
341
- * valid.
342
- * @extends {jspb.Message}
343
- * @constructor
344
- */
345
- proto.notification.NotificationResponse = function(opt_data) {
346
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
347
- };
348
- goog.inherits(proto.notification.NotificationResponse, jspb.Message);
349
- if (goog.DEBUG && !COMPILED) {
350
- /**
351
- * @public
352
- * @override
353
- */
354
- proto.notification.NotificationResponse.displayName = 'proto.notification.NotificationResponse';
355
- }
356
- /**
357
- * Generated by JsPbCodeGenerator.
358
- * @param {Array=} opt_data Optional initial data array, typically from a
359
- * server response, or constructed directly in Javascript. The array is used
360
- * in place and becomes part of the constructed object. It is not cloned.
361
- * If no data is provided, the constructed object will be empty, but still
362
- * valid.
363
- * @extends {jspb.Message}
364
- * @constructor
365
- */
366
- proto.notification.NotificationItemsResponse = function(opt_data) {
367
- jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.NotificationItemsResponse.repeatedFields_, null);
368
- };
369
- goog.inherits(proto.notification.NotificationItemsResponse, jspb.Message);
370
- if (goog.DEBUG && !COMPILED) {
371
- /**
372
- * @public
373
- * @override
374
- */
375
- proto.notification.NotificationItemsResponse.displayName = 'proto.notification.NotificationItemsResponse';
376
- }
377
- /**
378
- * Generated by JsPbCodeGenerator.
379
- * @param {Array=} opt_data Optional initial data array, typically from a
380
- * server response, or constructed directly in Javascript. The array is used
381
- * in place and becomes part of the constructed object. It is not cloned.
382
- * If no data is provided, the constructed object will be empty, but still
383
- * valid.
384
- * @extends {jspb.Message}
385
- * @constructor
386
- */
387
- proto.notification.UserNotificationsCountResponse = function(opt_data) {
388
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
389
- };
390
- goog.inherits(proto.notification.UserNotificationsCountResponse, jspb.Message);
391
- if (goog.DEBUG && !COMPILED) {
392
- /**
393
- * @public
394
- * @override
395
- */
396
- proto.notification.UserNotificationsCountResponse.displayName = 'proto.notification.UserNotificationsCountResponse';
397
- }
398
-
399
-
400
-
401
- if (jspb.Message.GENERATE_TO_OBJECT) {
402
- /**
403
- * Creates an object representation of this proto.
404
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
405
- * Optional fields that are not set will be set to undefined.
406
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
407
- * For the list of reserved names please see:
408
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
409
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
410
- * JSPB instance for transitional soy proto support:
411
- * http://goto/soy-param-migration
412
- * @return {!Object}
413
- */
414
- proto.notification.PingRequest.prototype.toObject = function(opt_includeInstance) {
415
- return proto.notification.PingRequest.toObject(opt_includeInstance, this);
416
- };
417
-
418
-
419
- /**
420
- * Static version of the {@see toObject} method.
421
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
422
- * the JSPB instance for transitional soy proto support:
423
- * http://goto/soy-param-migration
424
- * @param {!proto.notification.PingRequest} msg The msg instance to transform.
425
- * @return {!Object}
426
- * @suppress {unusedLocalVariables} f is only used for nested messages
427
- */
428
- proto.notification.PingRequest.toObject = function(includeInstance, msg) {
429
- var f, obj = {
430
- ping: jspb.Message.getFieldWithDefault(msg, 1, "")
431
- };
432
-
433
- if (includeInstance) {
434
- obj.$jspbMessageInstance = msg;
435
- }
436
- return obj;
437
- };
438
- }
439
-
440
-
441
- /**
442
- * Deserializes binary data (in protobuf wire format).
443
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
444
- * @return {!proto.notification.PingRequest}
445
- */
446
- proto.notification.PingRequest.deserializeBinary = function(bytes) {
447
- var reader = new jspb.BinaryReader(bytes);
448
- var msg = new proto.notification.PingRequest;
449
- return proto.notification.PingRequest.deserializeBinaryFromReader(msg, reader);
450
- };
451
-
452
-
453
- /**
454
- * Deserializes binary data (in protobuf wire format) from the
455
- * given reader into the given message object.
456
- * @param {!proto.notification.PingRequest} msg The message object to deserialize into.
457
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
458
- * @return {!proto.notification.PingRequest}
459
- */
460
- proto.notification.PingRequest.deserializeBinaryFromReader = function(msg, reader) {
461
- while (reader.nextField()) {
462
- if (reader.isEndGroup()) {
463
- break;
464
- }
465
- var field = reader.getFieldNumber();
466
- switch (field) {
467
- case 1:
468
- var value = /** @type {string} */ (reader.readString());
469
- msg.setPing(value);
470
- break;
471
- default:
472
- reader.skipField();
473
- break;
474
- }
475
- }
476
- return msg;
477
- };
478
-
479
-
480
- /**
481
- * Serializes the message to binary data (in protobuf wire format).
482
- * @return {!Uint8Array}
483
- */
484
- proto.notification.PingRequest.prototype.serializeBinary = function() {
485
- var writer = new jspb.BinaryWriter();
486
- proto.notification.PingRequest.serializeBinaryToWriter(this, writer);
487
- return writer.getResultBuffer();
488
- };
489
-
490
-
491
- /**
492
- * Serializes the given message to binary data (in protobuf wire
493
- * format), writing to the given BinaryWriter.
494
- * @param {!proto.notification.PingRequest} message
495
- * @param {!jspb.BinaryWriter} writer
496
- * @suppress {unusedLocalVariables} f is only used for nested messages
497
- */
498
- proto.notification.PingRequest.serializeBinaryToWriter = function(message, writer) {
499
- var f = undefined;
500
- f = message.getPing();
501
- if (f.length > 0) {
502
- writer.writeString(
503
- 1,
504
- f
505
- );
506
- }
507
- };
508
-
509
-
510
- /**
511
- * optional string ping = 1;
512
- * @return {string}
513
- */
514
- proto.notification.PingRequest.prototype.getPing = function() {
515
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
516
- };
517
-
518
-
519
- /**
520
- * @param {string} value
521
- * @return {!proto.notification.PingRequest} returns this
522
- */
523
- proto.notification.PingRequest.prototype.setPing = function(value) {
524
- return jspb.Message.setProto3StringField(this, 1, value);
525
- };
526
-
527
-
528
-
529
-
530
-
531
- if (jspb.Message.GENERATE_TO_OBJECT) {
532
- /**
533
- * Creates an object representation of this proto.
534
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
535
- * Optional fields that are not set will be set to undefined.
536
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
537
- * For the list of reserved names please see:
538
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
539
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
540
- * JSPB instance for transitional soy proto support:
541
- * http://goto/soy-param-migration
542
- * @return {!Object}
543
- */
544
- proto.notification.PongResponse.prototype.toObject = function(opt_includeInstance) {
545
- return proto.notification.PongResponse.toObject(opt_includeInstance, this);
546
- };
547
-
548
-
549
- /**
550
- * Static version of the {@see toObject} method.
551
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
552
- * the JSPB instance for transitional soy proto support:
553
- * http://goto/soy-param-migration
554
- * @param {!proto.notification.PongResponse} msg The msg instance to transform.
555
- * @return {!Object}
556
- * @suppress {unusedLocalVariables} f is only used for nested messages
557
- */
558
- proto.notification.PongResponse.toObject = function(includeInstance, msg) {
559
- var f, obj = {
560
- pong: jspb.Message.getFieldWithDefault(msg, 1, "")
561
- };
562
-
563
- if (includeInstance) {
564
- obj.$jspbMessageInstance = msg;
565
- }
566
- return obj;
567
- };
568
- }
569
-
570
-
571
- /**
572
- * Deserializes binary data (in protobuf wire format).
573
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
574
- * @return {!proto.notification.PongResponse}
575
- */
576
- proto.notification.PongResponse.deserializeBinary = function(bytes) {
577
- var reader = new jspb.BinaryReader(bytes);
578
- var msg = new proto.notification.PongResponse;
579
- return proto.notification.PongResponse.deserializeBinaryFromReader(msg, reader);
580
- };
581
-
582
-
583
- /**
584
- * Deserializes binary data (in protobuf wire format) from the
585
- * given reader into the given message object.
586
- * @param {!proto.notification.PongResponse} msg The message object to deserialize into.
587
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
588
- * @return {!proto.notification.PongResponse}
589
- */
590
- proto.notification.PongResponse.deserializeBinaryFromReader = function(msg, reader) {
591
- while (reader.nextField()) {
592
- if (reader.isEndGroup()) {
593
- break;
594
- }
595
- var field = reader.getFieldNumber();
596
- switch (field) {
597
- case 1:
598
- var value = /** @type {string} */ (reader.readString());
599
- msg.setPong(value);
600
- break;
601
- default:
602
- reader.skipField();
603
- break;
604
- }
605
- }
606
- return msg;
607
- };
608
-
609
-
610
- /**
611
- * Serializes the message to binary data (in protobuf wire format).
612
- * @return {!Uint8Array}
613
- */
614
- proto.notification.PongResponse.prototype.serializeBinary = function() {
615
- var writer = new jspb.BinaryWriter();
616
- proto.notification.PongResponse.serializeBinaryToWriter(this, writer);
617
- return writer.getResultBuffer();
618
- };
619
-
620
-
621
- /**
622
- * Serializes the given message to binary data (in protobuf wire
623
- * format), writing to the given BinaryWriter.
624
- * @param {!proto.notification.PongResponse} message
625
- * @param {!jspb.BinaryWriter} writer
626
- * @suppress {unusedLocalVariables} f is only used for nested messages
627
- */
628
- proto.notification.PongResponse.serializeBinaryToWriter = function(message, writer) {
629
- var f = undefined;
630
- f = message.getPong();
631
- if (f.length > 0) {
632
- writer.writeString(
633
- 1,
634
- f
635
- );
636
- }
637
- };
638
-
639
-
640
- /**
641
- * optional string pong = 1;
642
- * @return {string}
643
- */
644
- proto.notification.PongResponse.prototype.getPong = function() {
645
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
646
- };
647
-
648
-
649
- /**
650
- * @param {string} value
651
- * @return {!proto.notification.PongResponse} returns this
652
- */
653
- proto.notification.PongResponse.prototype.setPong = function(value) {
654
- return jspb.Message.setProto3StringField(this, 1, value);
655
- };
656
-
657
-
658
-
659
-
660
-
661
- if (jspb.Message.GENERATE_TO_OBJECT) {
662
- /**
663
- * Creates an object representation of this proto.
664
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
665
- * Optional fields that are not set will be set to undefined.
666
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
667
- * For the list of reserved names please see:
668
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
669
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
670
- * JSPB instance for transitional soy proto support:
671
- * http://goto/soy-param-migration
672
- * @return {!Object}
673
- */
674
- proto.notification.PaginationRequest.prototype.toObject = function(opt_includeInstance) {
675
- return proto.notification.PaginationRequest.toObject(opt_includeInstance, this);
676
- };
677
-
678
-
679
- /**
680
- * Static version of the {@see toObject} method.
681
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
682
- * the JSPB instance for transitional soy proto support:
683
- * http://goto/soy-param-migration
684
- * @param {!proto.notification.PaginationRequest} msg The msg instance to transform.
685
- * @return {!Object}
686
- * @suppress {unusedLocalVariables} f is only used for nested messages
687
- */
688
- proto.notification.PaginationRequest.toObject = function(includeInstance, msg) {
689
- var f, obj = {
690
- limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
691
- offset: jspb.Message.getFieldWithDefault(msg, 2, 0),
692
- notificationSearchParams: (f = msg.getNotificationSearchParams()) && proto.notification.NotificationSearchRequest.toObject(includeInstance, f),
693
- userSearchParams: (f = msg.getUserSearchParams()) && proto.notification.UserSearchRequest.toObject(includeInstance, f)
694
- };
695
-
696
- if (includeInstance) {
697
- obj.$jspbMessageInstance = msg;
698
- }
699
- return obj;
700
- };
701
- }
702
-
703
-
704
- /**
705
- * Deserializes binary data (in protobuf wire format).
706
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
707
- * @return {!proto.notification.PaginationRequest}
708
- */
709
- proto.notification.PaginationRequest.deserializeBinary = function(bytes) {
710
- var reader = new jspb.BinaryReader(bytes);
711
- var msg = new proto.notification.PaginationRequest;
712
- return proto.notification.PaginationRequest.deserializeBinaryFromReader(msg, reader);
713
- };
714
-
715
-
716
- /**
717
- * Deserializes binary data (in protobuf wire format) from the
718
- * given reader into the given message object.
719
- * @param {!proto.notification.PaginationRequest} msg The message object to deserialize into.
720
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
721
- * @return {!proto.notification.PaginationRequest}
722
- */
723
- proto.notification.PaginationRequest.deserializeBinaryFromReader = function(msg, reader) {
724
- while (reader.nextField()) {
725
- if (reader.isEndGroup()) {
726
- break;
727
- }
728
- var field = reader.getFieldNumber();
729
- switch (field) {
730
- case 1:
731
- var value = /** @type {number} */ (reader.readInt32());
732
- msg.setLimit(value);
733
- break;
734
- case 2:
735
- var value = /** @type {number} */ (reader.readInt32());
736
- msg.setOffset(value);
737
- break;
738
- case 3:
739
- var value = new proto.notification.NotificationSearchRequest;
740
- reader.readMessage(value,proto.notification.NotificationSearchRequest.deserializeBinaryFromReader);
741
- msg.setNotificationSearchParams(value);
742
- break;
743
- case 4:
744
- var value = new proto.notification.UserSearchRequest;
745
- reader.readMessage(value,proto.notification.UserSearchRequest.deserializeBinaryFromReader);
746
- msg.setUserSearchParams(value);
747
- break;
748
- default:
749
- reader.skipField();
750
- break;
751
- }
752
- }
753
- return msg;
754
- };
755
-
756
-
757
- /**
758
- * Serializes the message to binary data (in protobuf wire format).
759
- * @return {!Uint8Array}
760
- */
761
- proto.notification.PaginationRequest.prototype.serializeBinary = function() {
762
- var writer = new jspb.BinaryWriter();
763
- proto.notification.PaginationRequest.serializeBinaryToWriter(this, writer);
764
- return writer.getResultBuffer();
765
- };
766
-
767
-
768
- /**
769
- * Serializes the given message to binary data (in protobuf wire
770
- * format), writing to the given BinaryWriter.
771
- * @param {!proto.notification.PaginationRequest} message
772
- * @param {!jspb.BinaryWriter} writer
773
- * @suppress {unusedLocalVariables} f is only used for nested messages
774
- */
775
- proto.notification.PaginationRequest.serializeBinaryToWriter = function(message, writer) {
776
- var f = undefined;
777
- f = message.getLimit();
778
- if (f !== 0) {
779
- writer.writeInt32(
780
- 1,
781
- f
782
- );
783
- }
784
- f = message.getOffset();
785
- if (f !== 0) {
786
- writer.writeInt32(
787
- 2,
788
- f
789
- );
790
- }
791
- f = message.getNotificationSearchParams();
792
- if (f != null) {
793
- writer.writeMessage(
794
- 3,
795
- f,
796
- proto.notification.NotificationSearchRequest.serializeBinaryToWriter
797
- );
798
- }
799
- f = message.getUserSearchParams();
800
- if (f != null) {
801
- writer.writeMessage(
802
- 4,
803
- f,
804
- proto.notification.UserSearchRequest.serializeBinaryToWriter
805
- );
806
- }
807
- };
808
-
809
-
810
- /**
811
- * optional int32 limit = 1;
812
- * @return {number}
813
- */
814
- proto.notification.PaginationRequest.prototype.getLimit = function() {
815
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
816
- };
817
-
818
-
819
- /**
820
- * @param {number} value
821
- * @return {!proto.notification.PaginationRequest} returns this
822
- */
823
- proto.notification.PaginationRequest.prototype.setLimit = function(value) {
824
- return jspb.Message.setProto3IntField(this, 1, value);
825
- };
826
-
827
-
828
- /**
829
- * optional int32 offset = 2;
830
- * @return {number}
831
- */
832
- proto.notification.PaginationRequest.prototype.getOffset = function() {
833
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
834
- };
835
-
836
-
837
- /**
838
- * @param {number} value
839
- * @return {!proto.notification.PaginationRequest} returns this
840
- */
841
- proto.notification.PaginationRequest.prototype.setOffset = function(value) {
842
- return jspb.Message.setProto3IntField(this, 2, value);
843
- };
844
-
845
-
846
- /**
847
- * optional NotificationSearchRequest notification_search_params = 3;
848
- * @return {?proto.notification.NotificationSearchRequest}
849
- */
850
- proto.notification.PaginationRequest.prototype.getNotificationSearchParams = function() {
851
- return /** @type{?proto.notification.NotificationSearchRequest} */ (
852
- jspb.Message.getWrapperField(this, proto.notification.NotificationSearchRequest, 3));
853
- };
854
-
855
-
856
- /**
857
- * @param {?proto.notification.NotificationSearchRequest|undefined} value
858
- * @return {!proto.notification.PaginationRequest} returns this
859
- */
860
- proto.notification.PaginationRequest.prototype.setNotificationSearchParams = function(value) {
861
- return jspb.Message.setWrapperField(this, 3, value);
862
- };
863
-
864
-
865
- /**
866
- * Clears the message field making it undefined.
867
- * @return {!proto.notification.PaginationRequest} returns this
868
- */
869
- proto.notification.PaginationRequest.prototype.clearNotificationSearchParams = function() {
870
- return this.setNotificationSearchParams(undefined);
871
- };
872
-
873
-
874
- /**
875
- * Returns whether this field is set.
876
- * @return {boolean}
877
- */
878
- proto.notification.PaginationRequest.prototype.hasNotificationSearchParams = function() {
879
- return jspb.Message.getField(this, 3) != null;
880
- };
881
-
882
-
883
- /**
884
- * optional UserSearchRequest user_search_params = 4;
885
- * @return {?proto.notification.UserSearchRequest}
886
- */
887
- proto.notification.PaginationRequest.prototype.getUserSearchParams = function() {
888
- return /** @type{?proto.notification.UserSearchRequest} */ (
889
- jspb.Message.getWrapperField(this, proto.notification.UserSearchRequest, 4));
890
- };
891
-
892
-
893
- /**
894
- * @param {?proto.notification.UserSearchRequest|undefined} value
895
- * @return {!proto.notification.PaginationRequest} returns this
896
- */
897
- proto.notification.PaginationRequest.prototype.setUserSearchParams = function(value) {
898
- return jspb.Message.setWrapperField(this, 4, value);
899
- };
900
-
901
-
902
- /**
903
- * Clears the message field making it undefined.
904
- * @return {!proto.notification.PaginationRequest} returns this
905
- */
906
- proto.notification.PaginationRequest.prototype.clearUserSearchParams = function() {
907
- return this.setUserSearchParams(undefined);
908
- };
909
-
910
-
911
- /**
912
- * Returns whether this field is set.
913
- * @return {boolean}
914
- */
915
- proto.notification.PaginationRequest.prototype.hasUserSearchParams = function() {
916
- return jspb.Message.getField(this, 4) != null;
917
- };
918
-
919
-
920
-
921
- /**
922
- * List of repeated fields within this message type.
923
- * @private {!Array<number>}
924
- * @const
925
- */
926
- proto.notification.NotificationSearchRequest.repeatedFields_ = [4];
927
-
928
-
929
-
930
- if (jspb.Message.GENERATE_TO_OBJECT) {
931
- /**
932
- * Creates an object representation of this proto.
933
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
934
- * Optional fields that are not set will be set to undefined.
935
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
936
- * For the list of reserved names please see:
937
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
938
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
939
- * JSPB instance for transitional soy proto support:
940
- * http://goto/soy-param-migration
941
- * @return {!Object}
942
- */
943
- proto.notification.NotificationSearchRequest.prototype.toObject = function(opt_includeInstance) {
944
- return proto.notification.NotificationSearchRequest.toObject(opt_includeInstance, this);
945
- };
946
-
947
-
948
- /**
949
- * Static version of the {@see toObject} method.
950
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
951
- * the JSPB instance for transitional soy proto support:
952
- * http://goto/soy-param-migration
953
- * @param {!proto.notification.NotificationSearchRequest} msg The msg instance to transform.
954
- * @return {!Object}
955
- * @suppress {unusedLocalVariables} f is only used for nested messages
956
- */
957
- proto.notification.NotificationSearchRequest.toObject = function(includeInstance, msg) {
958
- var f, obj = {
959
- notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
960
- userId: jspb.Message.getFieldWithDefault(msg, 2, 0),
961
- notificationTitle: jspb.Message.getFieldWithDefault(msg, 3, ""),
962
- notificationIdsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
963
- };
964
-
965
- if (includeInstance) {
966
- obj.$jspbMessageInstance = msg;
967
- }
968
- return obj;
969
- };
970
- }
971
-
972
-
973
- /**
974
- * Deserializes binary data (in protobuf wire format).
975
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
976
- * @return {!proto.notification.NotificationSearchRequest}
977
- */
978
- proto.notification.NotificationSearchRequest.deserializeBinary = function(bytes) {
979
- var reader = new jspb.BinaryReader(bytes);
980
- var msg = new proto.notification.NotificationSearchRequest;
981
- return proto.notification.NotificationSearchRequest.deserializeBinaryFromReader(msg, reader);
982
- };
983
-
984
-
985
- /**
986
- * Deserializes binary data (in protobuf wire format) from the
987
- * given reader into the given message object.
988
- * @param {!proto.notification.NotificationSearchRequest} msg The message object to deserialize into.
989
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
990
- * @return {!proto.notification.NotificationSearchRequest}
991
- */
992
- proto.notification.NotificationSearchRequest.deserializeBinaryFromReader = function(msg, reader) {
993
- while (reader.nextField()) {
994
- if (reader.isEndGroup()) {
995
- break;
996
- }
997
- var field = reader.getFieldNumber();
998
- switch (field) {
999
- case 1:
1000
- var value = /** @type {number} */ (reader.readInt32());
1001
- msg.setNotificationId(value);
1002
- break;
1003
- case 2:
1004
- var value = /** @type {number} */ (reader.readInt32());
1005
- msg.setUserId(value);
1006
- break;
1007
- case 3:
1008
- var value = /** @type {string} */ (reader.readString());
1009
- msg.setNotificationTitle(value);
1010
- break;
1011
- case 4:
1012
- var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
1013
- for (var i = 0; i < values.length; i++) {
1014
- msg.addNotificationIds(values[i]);
1015
- }
1016
- break;
1017
- default:
1018
- reader.skipField();
1019
- break;
1020
- }
1021
- }
1022
- return msg;
1023
- };
1024
-
1025
-
1026
- /**
1027
- * Serializes the message to binary data (in protobuf wire format).
1028
- * @return {!Uint8Array}
1029
- */
1030
- proto.notification.NotificationSearchRequest.prototype.serializeBinary = function() {
1031
- var writer = new jspb.BinaryWriter();
1032
- proto.notification.NotificationSearchRequest.serializeBinaryToWriter(this, writer);
1033
- return writer.getResultBuffer();
1034
- };
1035
-
1036
-
1037
- /**
1038
- * Serializes the given message to binary data (in protobuf wire
1039
- * format), writing to the given BinaryWriter.
1040
- * @param {!proto.notification.NotificationSearchRequest} message
1041
- * @param {!jspb.BinaryWriter} writer
1042
- * @suppress {unusedLocalVariables} f is only used for nested messages
1043
- */
1044
- proto.notification.NotificationSearchRequest.serializeBinaryToWriter = function(message, writer) {
1045
- var f = undefined;
1046
- f = /** @type {number} */ (jspb.Message.getField(message, 1));
1047
- if (f != null) {
1048
- writer.writeInt32(
1049
- 1,
1050
- f
1051
- );
1052
- }
1053
- f = /** @type {number} */ (jspb.Message.getField(message, 2));
1054
- if (f != null) {
1055
- writer.writeInt32(
1056
- 2,
1057
- f
1058
- );
1059
- }
1060
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
1061
- if (f != null) {
1062
- writer.writeString(
1063
- 3,
1064
- f
1065
- );
1066
- }
1067
- f = message.getNotificationIdsList();
1068
- if (f.length > 0) {
1069
- writer.writePackedInt32(
1070
- 4,
1071
- f
1072
- );
1073
- }
1074
- };
1075
-
1076
-
1077
- /**
1078
- * optional int32 notification_id = 1;
1079
- * @return {number}
1080
- */
1081
- proto.notification.NotificationSearchRequest.prototype.getNotificationId = function() {
1082
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1083
- };
1084
-
1085
-
1086
- /**
1087
- * @param {number} value
1088
- * @return {!proto.notification.NotificationSearchRequest} returns this
1089
- */
1090
- proto.notification.NotificationSearchRequest.prototype.setNotificationId = function(value) {
1091
- return jspb.Message.setField(this, 1, value);
1092
- };
1093
-
1094
-
1095
- /**
1096
- * Clears the field making it undefined.
1097
- * @return {!proto.notification.NotificationSearchRequest} returns this
1098
- */
1099
- proto.notification.NotificationSearchRequest.prototype.clearNotificationId = function() {
1100
- return jspb.Message.setField(this, 1, undefined);
1101
- };
1102
-
1103
-
1104
- /**
1105
- * Returns whether this field is set.
1106
- * @return {boolean}
1107
- */
1108
- proto.notification.NotificationSearchRequest.prototype.hasNotificationId = function() {
1109
- return jspb.Message.getField(this, 1) != null;
1110
- };
1111
-
1112
-
1113
- /**
1114
- * optional int32 user_id = 2;
1115
- * @return {number}
1116
- */
1117
- proto.notification.NotificationSearchRequest.prototype.getUserId = function() {
1118
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1119
- };
1120
-
1121
-
1122
- /**
1123
- * @param {number} value
1124
- * @return {!proto.notification.NotificationSearchRequest} returns this
1125
- */
1126
- proto.notification.NotificationSearchRequest.prototype.setUserId = function(value) {
1127
- return jspb.Message.setField(this, 2, value);
1128
- };
1129
-
1130
-
1131
- /**
1132
- * Clears the field making it undefined.
1133
- * @return {!proto.notification.NotificationSearchRequest} returns this
1134
- */
1135
- proto.notification.NotificationSearchRequest.prototype.clearUserId = function() {
1136
- return jspb.Message.setField(this, 2, undefined);
1137
- };
1138
-
1139
-
1140
- /**
1141
- * Returns whether this field is set.
1142
- * @return {boolean}
1143
- */
1144
- proto.notification.NotificationSearchRequest.prototype.hasUserId = function() {
1145
- return jspb.Message.getField(this, 2) != null;
1146
- };
1147
-
1148
-
1149
- /**
1150
- * optional string notification_title = 3;
1151
- * @return {string}
1152
- */
1153
- proto.notification.NotificationSearchRequest.prototype.getNotificationTitle = function() {
1154
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1155
- };
1156
-
1157
-
1158
- /**
1159
- * @param {string} value
1160
- * @return {!proto.notification.NotificationSearchRequest} returns this
1161
- */
1162
- proto.notification.NotificationSearchRequest.prototype.setNotificationTitle = function(value) {
1163
- return jspb.Message.setField(this, 3, value);
1164
- };
1165
-
1166
-
1167
- /**
1168
- * Clears the field making it undefined.
1169
- * @return {!proto.notification.NotificationSearchRequest} returns this
1170
- */
1171
- proto.notification.NotificationSearchRequest.prototype.clearNotificationTitle = function() {
1172
- return jspb.Message.setField(this, 3, undefined);
1173
- };
1174
-
1175
-
1176
- /**
1177
- * Returns whether this field is set.
1178
- * @return {boolean}
1179
- */
1180
- proto.notification.NotificationSearchRequest.prototype.hasNotificationTitle = function() {
1181
- return jspb.Message.getField(this, 3) != null;
1182
- };
1183
-
1184
-
1185
- /**
1186
- * repeated int32 notification_ids = 4;
1187
- * @return {!Array<number>}
1188
- */
1189
- proto.notification.NotificationSearchRequest.prototype.getNotificationIdsList = function() {
1190
- return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 4));
1191
- };
1192
-
1193
-
1194
- /**
1195
- * @param {!Array<number>} value
1196
- * @return {!proto.notification.NotificationSearchRequest} returns this
1197
- */
1198
- proto.notification.NotificationSearchRequest.prototype.setNotificationIdsList = function(value) {
1199
- return jspb.Message.setField(this, 4, value || []);
1200
- };
1201
-
1202
-
1203
- /**
1204
- * @param {number} value
1205
- * @param {number=} opt_index
1206
- * @return {!proto.notification.NotificationSearchRequest} returns this
1207
- */
1208
- proto.notification.NotificationSearchRequest.prototype.addNotificationIds = function(value, opt_index) {
1209
- return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
1210
- };
1211
-
1212
-
1213
- /**
1214
- * Clears the list making it empty but non-null.
1215
- * @return {!proto.notification.NotificationSearchRequest} returns this
1216
- */
1217
- proto.notification.NotificationSearchRequest.prototype.clearNotificationIdsList = function() {
1218
- return this.setNotificationIdsList([]);
1219
- };
1220
-
1221
-
1222
-
1223
-
1224
-
1225
- if (jspb.Message.GENERATE_TO_OBJECT) {
1226
- /**
1227
- * Creates an object representation of this proto.
1228
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1229
- * Optional fields that are not set will be set to undefined.
1230
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1231
- * For the list of reserved names please see:
1232
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1233
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1234
- * JSPB instance for transitional soy proto support:
1235
- * http://goto/soy-param-migration
1236
- * @return {!Object}
1237
- */
1238
- proto.notification.UserSearchRequest.prototype.toObject = function(opt_includeInstance) {
1239
- return proto.notification.UserSearchRequest.toObject(opt_includeInstance, this);
1240
- };
1241
-
1242
-
1243
- /**
1244
- * Static version of the {@see toObject} method.
1245
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1246
- * the JSPB instance for transitional soy proto support:
1247
- * http://goto/soy-param-migration
1248
- * @param {!proto.notification.UserSearchRequest} msg The msg instance to transform.
1249
- * @return {!Object}
1250
- * @suppress {unusedLocalVariables} f is only used for nested messages
1251
- */
1252
- proto.notification.UserSearchRequest.toObject = function(includeInstance, msg) {
1253
- var f, obj = {
1254
- userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1255
- isChecked: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1256
- limit: jspb.Message.getFieldWithDefault(msg, 3, 0),
1257
- offset: jspb.Message.getFieldWithDefault(msg, 4, 0)
1258
- };
1259
-
1260
- if (includeInstance) {
1261
- obj.$jspbMessageInstance = msg;
1262
- }
1263
- return obj;
1264
- };
1265
- }
1266
-
1267
-
1268
- /**
1269
- * Deserializes binary data (in protobuf wire format).
1270
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1271
- * @return {!proto.notification.UserSearchRequest}
1272
- */
1273
- proto.notification.UserSearchRequest.deserializeBinary = function(bytes) {
1274
- var reader = new jspb.BinaryReader(bytes);
1275
- var msg = new proto.notification.UserSearchRequest;
1276
- return proto.notification.UserSearchRequest.deserializeBinaryFromReader(msg, reader);
1277
- };
1278
-
1279
-
1280
- /**
1281
- * Deserializes binary data (in protobuf wire format) from the
1282
- * given reader into the given message object.
1283
- * @param {!proto.notification.UserSearchRequest} msg The message object to deserialize into.
1284
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1285
- * @return {!proto.notification.UserSearchRequest}
1286
- */
1287
- proto.notification.UserSearchRequest.deserializeBinaryFromReader = function(msg, reader) {
1288
- while (reader.nextField()) {
1289
- if (reader.isEndGroup()) {
1290
- break;
1291
- }
1292
- var field = reader.getFieldNumber();
1293
- switch (field) {
1294
- case 1:
1295
- var value = /** @type {number} */ (reader.readInt32());
1296
- msg.setUserId(value);
1297
- break;
1298
- case 2:
1299
- var value = /** @type {boolean} */ (reader.readBool());
1300
- msg.setIsChecked(value);
1301
- break;
1302
- case 3:
1303
- var value = /** @type {number} */ (reader.readInt32());
1304
- msg.setLimit(value);
1305
- break;
1306
- case 4:
1307
- var value = /** @type {number} */ (reader.readInt32());
1308
- msg.setOffset(value);
1309
- break;
1310
- default:
1311
- reader.skipField();
1312
- break;
1313
- }
1314
- }
1315
- return msg;
1316
- };
1317
-
1318
-
1319
- /**
1320
- * Serializes the message to binary data (in protobuf wire format).
1321
- * @return {!Uint8Array}
1322
- */
1323
- proto.notification.UserSearchRequest.prototype.serializeBinary = function() {
1324
- var writer = new jspb.BinaryWriter();
1325
- proto.notification.UserSearchRequest.serializeBinaryToWriter(this, writer);
1326
- return writer.getResultBuffer();
1327
- };
1328
-
1329
-
1330
- /**
1331
- * Serializes the given message to binary data (in protobuf wire
1332
- * format), writing to the given BinaryWriter.
1333
- * @param {!proto.notification.UserSearchRequest} message
1334
- * @param {!jspb.BinaryWriter} writer
1335
- * @suppress {unusedLocalVariables} f is only used for nested messages
1336
- */
1337
- proto.notification.UserSearchRequest.serializeBinaryToWriter = function(message, writer) {
1338
- var f = undefined;
1339
- f = message.getUserId();
1340
- if (f !== 0) {
1341
- writer.writeInt32(
1342
- 1,
1343
- f
1344
- );
1345
- }
1346
- f = /** @type {boolean} */ (jspb.Message.getField(message, 2));
1347
- if (f != null) {
1348
- writer.writeBool(
1349
- 2,
1350
- f
1351
- );
1352
- }
1353
- f = /** @type {number} */ (jspb.Message.getField(message, 3));
1354
- if (f != null) {
1355
- writer.writeInt32(
1356
- 3,
1357
- f
1358
- );
1359
- }
1360
- f = /** @type {number} */ (jspb.Message.getField(message, 4));
1361
- if (f != null) {
1362
- writer.writeInt32(
1363
- 4,
1364
- f
1365
- );
1366
- }
1367
- };
1368
-
1369
-
1370
- /**
1371
- * optional int32 user_id = 1;
1372
- * @return {number}
1373
- */
1374
- proto.notification.UserSearchRequest.prototype.getUserId = function() {
1375
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1376
- };
1377
-
1378
-
1379
- /**
1380
- * @param {number} value
1381
- * @return {!proto.notification.UserSearchRequest} returns this
1382
- */
1383
- proto.notification.UserSearchRequest.prototype.setUserId = function(value) {
1384
- return jspb.Message.setProto3IntField(this, 1, value);
1385
- };
1386
-
1387
-
1388
- /**
1389
- * optional bool is_checked = 2;
1390
- * @return {boolean}
1391
- */
1392
- proto.notification.UserSearchRequest.prototype.getIsChecked = function() {
1393
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
1394
- };
1395
-
1396
-
1397
- /**
1398
- * @param {boolean} value
1399
- * @return {!proto.notification.UserSearchRequest} returns this
1400
- */
1401
- proto.notification.UserSearchRequest.prototype.setIsChecked = function(value) {
1402
- return jspb.Message.setField(this, 2, value);
1403
- };
1404
-
1405
-
1406
- /**
1407
- * Clears the field making it undefined.
1408
- * @return {!proto.notification.UserSearchRequest} returns this
1409
- */
1410
- proto.notification.UserSearchRequest.prototype.clearIsChecked = function() {
1411
- return jspb.Message.setField(this, 2, undefined);
1412
- };
1413
-
1414
-
1415
- /**
1416
- * Returns whether this field is set.
1417
- * @return {boolean}
1418
- */
1419
- proto.notification.UserSearchRequest.prototype.hasIsChecked = function() {
1420
- return jspb.Message.getField(this, 2) != null;
1421
- };
1422
-
1423
-
1424
- /**
1425
- * optional int32 limit = 3;
1426
- * @return {number}
1427
- */
1428
- proto.notification.UserSearchRequest.prototype.getLimit = function() {
1429
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1430
- };
1431
-
1432
-
1433
- /**
1434
- * @param {number} value
1435
- * @return {!proto.notification.UserSearchRequest} returns this
1436
- */
1437
- proto.notification.UserSearchRequest.prototype.setLimit = function(value) {
1438
- return jspb.Message.setField(this, 3, value);
1439
- };
1440
-
1441
-
1442
- /**
1443
- * Clears the field making it undefined.
1444
- * @return {!proto.notification.UserSearchRequest} returns this
1445
- */
1446
- proto.notification.UserSearchRequest.prototype.clearLimit = function() {
1447
- return jspb.Message.setField(this, 3, undefined);
1448
- };
1449
-
1450
-
1451
- /**
1452
- * Returns whether this field is set.
1453
- * @return {boolean}
1454
- */
1455
- proto.notification.UserSearchRequest.prototype.hasLimit = function() {
1456
- return jspb.Message.getField(this, 3) != null;
1457
- };
1458
-
1459
-
1460
- /**
1461
- * optional int32 offset = 4;
1462
- * @return {number}
1463
- */
1464
- proto.notification.UserSearchRequest.prototype.getOffset = function() {
1465
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1466
- };
1467
-
1468
-
1469
- /**
1470
- * @param {number} value
1471
- * @return {!proto.notification.UserSearchRequest} returns this
1472
- */
1473
- proto.notification.UserSearchRequest.prototype.setOffset = function(value) {
1474
- return jspb.Message.setField(this, 4, value);
1475
- };
1476
-
1477
-
1478
- /**
1479
- * Clears the field making it undefined.
1480
- * @return {!proto.notification.UserSearchRequest} returns this
1481
- */
1482
- proto.notification.UserSearchRequest.prototype.clearOffset = function() {
1483
- return jspb.Message.setField(this, 4, undefined);
1484
- };
1485
-
1486
-
1487
- /**
1488
- * Returns whether this field is set.
1489
- * @return {boolean}
1490
- */
1491
- proto.notification.UserSearchRequest.prototype.hasOffset = function() {
1492
- return jspb.Message.getField(this, 4) != null;
1493
- };
1494
-
1495
-
1496
-
1497
-
1498
-
1499
- if (jspb.Message.GENERATE_TO_OBJECT) {
1500
- /**
1501
- * Creates an object representation of this proto.
1502
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1503
- * Optional fields that are not set will be set to undefined.
1504
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1505
- * For the list of reserved names please see:
1506
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1507
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1508
- * JSPB instance for transitional soy proto support:
1509
- * http://goto/soy-param-migration
1510
- * @return {!Object}
1511
- */
1512
- proto.notification.File.prototype.toObject = function(opt_includeInstance) {
1513
- return proto.notification.File.toObject(opt_includeInstance, this);
1514
- };
1515
-
1516
-
1517
- /**
1518
- * Static version of the {@see toObject} method.
1519
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1520
- * the JSPB instance for transitional soy proto support:
1521
- * http://goto/soy-param-migration
1522
- * @param {!proto.notification.File} msg The msg instance to transform.
1523
- * @return {!Object}
1524
- * @suppress {unusedLocalVariables} f is only used for nested messages
1525
- */
1526
- proto.notification.File.toObject = function(includeInstance, msg) {
1527
- var f, obj = {
1528
- media: msg.getMedia_asB64()
1529
- };
1530
-
1531
- if (includeInstance) {
1532
- obj.$jspbMessageInstance = msg;
1533
- }
1534
- return obj;
1535
- };
1536
- }
1537
-
1538
-
1539
- /**
1540
- * Deserializes binary data (in protobuf wire format).
1541
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1542
- * @return {!proto.notification.File}
1543
- */
1544
- proto.notification.File.deserializeBinary = function(bytes) {
1545
- var reader = new jspb.BinaryReader(bytes);
1546
- var msg = new proto.notification.File;
1547
- return proto.notification.File.deserializeBinaryFromReader(msg, reader);
1548
- };
1549
-
1550
-
1551
- /**
1552
- * Deserializes binary data (in protobuf wire format) from the
1553
- * given reader into the given message object.
1554
- * @param {!proto.notification.File} msg The message object to deserialize into.
1555
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1556
- * @return {!proto.notification.File}
1557
- */
1558
- proto.notification.File.deserializeBinaryFromReader = function(msg, reader) {
1559
- while (reader.nextField()) {
1560
- if (reader.isEndGroup()) {
1561
- break;
1562
- }
1563
- var field = reader.getFieldNumber();
1564
- switch (field) {
1565
- case 1:
1566
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
1567
- msg.setMedia(value);
1568
- break;
1569
- default:
1570
- reader.skipField();
1571
- break;
1572
- }
1573
- }
1574
- return msg;
1575
- };
1576
-
1577
-
1578
- /**
1579
- * Serializes the message to binary data (in protobuf wire format).
1580
- * @return {!Uint8Array}
1581
- */
1582
- proto.notification.File.prototype.serializeBinary = function() {
1583
- var writer = new jspb.BinaryWriter();
1584
- proto.notification.File.serializeBinaryToWriter(this, writer);
1585
- return writer.getResultBuffer();
1586
- };
1587
-
1588
-
1589
- /**
1590
- * Serializes the given message to binary data (in protobuf wire
1591
- * format), writing to the given BinaryWriter.
1592
- * @param {!proto.notification.File} message
1593
- * @param {!jspb.BinaryWriter} writer
1594
- * @suppress {unusedLocalVariables} f is only used for nested messages
1595
- */
1596
- proto.notification.File.serializeBinaryToWriter = function(message, writer) {
1597
- var f = undefined;
1598
- f = message.getMedia_asU8();
1599
- if (f.length > 0) {
1600
- writer.writeBytes(
1601
- 1,
1602
- f
1603
- );
1604
- }
1605
- };
1606
-
1607
-
1608
- /**
1609
- * optional bytes media = 1;
1610
- * @return {!(string|Uint8Array)}
1611
- */
1612
- proto.notification.File.prototype.getMedia = function() {
1613
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1614
- };
1615
-
1616
-
1617
- /**
1618
- * optional bytes media = 1;
1619
- * This is a type-conversion wrapper around `getMedia()`
1620
- * @return {string}
1621
- */
1622
- proto.notification.File.prototype.getMedia_asB64 = function() {
1623
- return /** @type {string} */ (jspb.Message.bytesAsB64(
1624
- this.getMedia()));
1625
- };
1626
-
1627
-
1628
- /**
1629
- * optional bytes media = 1;
1630
- * Note that Uint8Array is not supported on all browsers.
1631
- * @see http://caniuse.com/Uint8Array
1632
- * This is a type-conversion wrapper around `getMedia()`
1633
- * @return {!Uint8Array}
1634
- */
1635
- proto.notification.File.prototype.getMedia_asU8 = function() {
1636
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
1637
- this.getMedia()));
1638
- };
1639
-
1640
-
1641
- /**
1642
- * @param {!(string|Uint8Array)} value
1643
- * @return {!proto.notification.File} returns this
1644
- */
1645
- proto.notification.File.prototype.setMedia = function(value) {
1646
- return jspb.Message.setProto3BytesField(this, 1, value);
1647
- };
1648
-
1649
-
1650
-
1651
-
1652
-
1653
- if (jspb.Message.GENERATE_TO_OBJECT) {
1654
- /**
1655
- * Creates an object representation of this proto.
1656
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1657
- * Optional fields that are not set will be set to undefined.
1658
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1659
- * For the list of reserved names please see:
1660
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1661
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1662
- * JSPB instance for transitional soy proto support:
1663
- * http://goto/soy-param-migration
1664
- * @return {!Object}
1665
- */
1666
- proto.notification.GetFileRequest.prototype.toObject = function(opt_includeInstance) {
1667
- return proto.notification.GetFileRequest.toObject(opt_includeInstance, this);
1668
- };
1669
-
1670
-
1671
- /**
1672
- * Static version of the {@see toObject} method.
1673
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1674
- * the JSPB instance for transitional soy proto support:
1675
- * http://goto/soy-param-migration
1676
- * @param {!proto.notification.GetFileRequest} msg The msg instance to transform.
1677
- * @return {!Object}
1678
- * @suppress {unusedLocalVariables} f is only used for nested messages
1679
- */
1680
- proto.notification.GetFileRequest.toObject = function(includeInstance, msg) {
1681
- var f, obj = {
1682
- fileName: jspb.Message.getFieldWithDefault(msg, 1, ""),
1683
- instanceType: jspb.Message.getFieldWithDefault(msg, 2, "")
1684
- };
1685
-
1686
- if (includeInstance) {
1687
- obj.$jspbMessageInstance = msg;
1688
- }
1689
- return obj;
1690
- };
1691
- }
1692
-
1693
-
1694
- /**
1695
- * Deserializes binary data (in protobuf wire format).
1696
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1697
- * @return {!proto.notification.GetFileRequest}
1698
- */
1699
- proto.notification.GetFileRequest.deserializeBinary = function(bytes) {
1700
- var reader = new jspb.BinaryReader(bytes);
1701
- var msg = new proto.notification.GetFileRequest;
1702
- return proto.notification.GetFileRequest.deserializeBinaryFromReader(msg, reader);
1703
- };
1704
-
1705
-
1706
- /**
1707
- * Deserializes binary data (in protobuf wire format) from the
1708
- * given reader into the given message object.
1709
- * @param {!proto.notification.GetFileRequest} msg The message object to deserialize into.
1710
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1711
- * @return {!proto.notification.GetFileRequest}
1712
- */
1713
- proto.notification.GetFileRequest.deserializeBinaryFromReader = function(msg, reader) {
1714
- while (reader.nextField()) {
1715
- if (reader.isEndGroup()) {
1716
- break;
1717
- }
1718
- var field = reader.getFieldNumber();
1719
- switch (field) {
1720
- case 1:
1721
- var value = /** @type {string} */ (reader.readString());
1722
- msg.setFileName(value);
1723
- break;
1724
- case 2:
1725
- var value = /** @type {string} */ (reader.readString());
1726
- msg.setInstanceType(value);
1727
- break;
1728
- default:
1729
- reader.skipField();
1730
- break;
1731
- }
1732
- }
1733
- return msg;
1734
- };
1735
-
1736
-
1737
- /**
1738
- * Serializes the message to binary data (in protobuf wire format).
1739
- * @return {!Uint8Array}
1740
- */
1741
- proto.notification.GetFileRequest.prototype.serializeBinary = function() {
1742
- var writer = new jspb.BinaryWriter();
1743
- proto.notification.GetFileRequest.serializeBinaryToWriter(this, writer);
1744
- return writer.getResultBuffer();
1745
- };
1746
-
1747
-
1748
- /**
1749
- * Serializes the given message to binary data (in protobuf wire
1750
- * format), writing to the given BinaryWriter.
1751
- * @param {!proto.notification.GetFileRequest} message
1752
- * @param {!jspb.BinaryWriter} writer
1753
- * @suppress {unusedLocalVariables} f is only used for nested messages
1754
- */
1755
- proto.notification.GetFileRequest.serializeBinaryToWriter = function(message, writer) {
1756
- var f = undefined;
1757
- f = message.getFileName();
1758
- if (f.length > 0) {
1759
- writer.writeString(
1760
- 1,
1761
- f
1762
- );
1763
- }
1764
- f = message.getInstanceType();
1765
- if (f.length > 0) {
1766
- writer.writeString(
1767
- 2,
1768
- f
1769
- );
1770
- }
1771
- };
1772
-
1773
-
1774
- /**
1775
- * optional string file_name = 1;
1776
- * @return {string}
1777
- */
1778
- proto.notification.GetFileRequest.prototype.getFileName = function() {
1779
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1780
- };
1781
-
1782
-
1783
- /**
1784
- * @param {string} value
1785
- * @return {!proto.notification.GetFileRequest} returns this
1786
- */
1787
- proto.notification.GetFileRequest.prototype.setFileName = function(value) {
1788
- return jspb.Message.setProto3StringField(this, 1, value);
1789
- };
1790
-
1791
-
1792
- /**
1793
- * optional string instance_type = 2;
1794
- * @return {string}
1795
- */
1796
- proto.notification.GetFileRequest.prototype.getInstanceType = function() {
1797
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1798
- };
1799
-
1800
-
1801
- /**
1802
- * @param {string} value
1803
- * @return {!proto.notification.GetFileRequest} returns this
1804
- */
1805
- proto.notification.GetFileRequest.prototype.setInstanceType = function(value) {
1806
- return jspb.Message.setProto3StringField(this, 2, value);
1807
- };
1808
-
1809
-
1810
-
1811
-
1812
-
1813
- if (jspb.Message.GENERATE_TO_OBJECT) {
1814
- /**
1815
- * Creates an object representation of this proto.
1816
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1817
- * Optional fields that are not set will be set to undefined.
1818
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1819
- * For the list of reserved names please see:
1820
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1821
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1822
- * JSPB instance for transitional soy proto support:
1823
- * http://goto/soy-param-migration
1824
- * @return {!Object}
1825
- */
1826
- proto.notification.NotificationRequest.prototype.toObject = function(opt_includeInstance) {
1827
- return proto.notification.NotificationRequest.toObject(opt_includeInstance, this);
1828
- };
1829
-
1830
-
1831
- /**
1832
- * Static version of the {@see toObject} method.
1833
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1834
- * the JSPB instance for transitional soy proto support:
1835
- * http://goto/soy-param-migration
1836
- * @param {!proto.notification.NotificationRequest} msg The msg instance to transform.
1837
- * @return {!Object}
1838
- * @suppress {unusedLocalVariables} f is only used for nested messages
1839
- */
1840
- proto.notification.NotificationRequest.toObject = function(includeInstance, msg) {
1841
- var f, obj = {
1842
- id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1843
- title: jspb.Message.getFieldWithDefault(msg, 2, ""),
1844
- content: jspb.Message.getFieldWithDefault(msg, 3, ""),
1845
- type: jspb.Message.getFieldWithDefault(msg, 4, ""),
1846
- isActive: jspb.Message.getFieldWithDefault(msg, 5, 0)
1847
- };
1848
-
1849
- if (includeInstance) {
1850
- obj.$jspbMessageInstance = msg;
1851
- }
1852
- return obj;
1853
- };
1854
- }
1855
-
1856
-
1857
- /**
1858
- * Deserializes binary data (in protobuf wire format).
1859
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1860
- * @return {!proto.notification.NotificationRequest}
1861
- */
1862
- proto.notification.NotificationRequest.deserializeBinary = function(bytes) {
1863
- var reader = new jspb.BinaryReader(bytes);
1864
- var msg = new proto.notification.NotificationRequest;
1865
- return proto.notification.NotificationRequest.deserializeBinaryFromReader(msg, reader);
1866
- };
1867
-
1868
-
1869
- /**
1870
- * Deserializes binary data (in protobuf wire format) from the
1871
- * given reader into the given message object.
1872
- * @param {!proto.notification.NotificationRequest} msg The message object to deserialize into.
1873
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1874
- * @return {!proto.notification.NotificationRequest}
1875
- */
1876
- proto.notification.NotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
1877
- while (reader.nextField()) {
1878
- if (reader.isEndGroup()) {
1879
- break;
1880
- }
1881
- var field = reader.getFieldNumber();
1882
- switch (field) {
1883
- case 1:
1884
- var value = /** @type {number} */ (reader.readInt32());
1885
- msg.setId(value);
1886
- break;
1887
- case 2:
1888
- var value = /** @type {string} */ (reader.readString());
1889
- msg.setTitle(value);
1890
- break;
1891
- case 3:
1892
- var value = /** @type {string} */ (reader.readString());
1893
- msg.setContent(value);
1894
- break;
1895
- case 4:
1896
- var value = /** @type {string} */ (reader.readString());
1897
- msg.setType(value);
1898
- break;
1899
- case 5:
1900
- var value = /** @type {number} */ (reader.readInt32());
1901
- msg.setIsActive(value);
1902
- break;
1903
- default:
1904
- reader.skipField();
1905
- break;
1906
- }
1907
- }
1908
- return msg;
1909
- };
1910
-
1911
-
1912
- /**
1913
- * Serializes the message to binary data (in protobuf wire format).
1914
- * @return {!Uint8Array}
1915
- */
1916
- proto.notification.NotificationRequest.prototype.serializeBinary = function() {
1917
- var writer = new jspb.BinaryWriter();
1918
- proto.notification.NotificationRequest.serializeBinaryToWriter(this, writer);
1919
- return writer.getResultBuffer();
1920
- };
1921
-
1922
-
1923
- /**
1924
- * Serializes the given message to binary data (in protobuf wire
1925
- * format), writing to the given BinaryWriter.
1926
- * @param {!proto.notification.NotificationRequest} message
1927
- * @param {!jspb.BinaryWriter} writer
1928
- * @suppress {unusedLocalVariables} f is only used for nested messages
1929
- */
1930
- proto.notification.NotificationRequest.serializeBinaryToWriter = function(message, writer) {
1931
- var f = undefined;
1932
- f = /** @type {number} */ (jspb.Message.getField(message, 1));
1933
- if (f != null) {
1934
- writer.writeInt32(
1935
- 1,
1936
- f
1937
- );
1938
- }
1939
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
1940
- if (f != null) {
1941
- writer.writeString(
1942
- 2,
1943
- f
1944
- );
1945
- }
1946
- f = /** @type {string} */ (jspb.Message.getField(message, 3));
1947
- if (f != null) {
1948
- writer.writeString(
1949
- 3,
1950
- f
1951
- );
1952
- }
1953
- f = /** @type {string} */ (jspb.Message.getField(message, 4));
1954
- if (f != null) {
1955
- writer.writeString(
1956
- 4,
1957
- f
1958
- );
1959
- }
1960
- f = /** @type {number} */ (jspb.Message.getField(message, 5));
1961
- if (f != null) {
1962
- writer.writeInt32(
1963
- 5,
1964
- f
1965
- );
1966
- }
1967
- };
1968
-
1969
-
1970
- /**
1971
- * optional int32 id = 1;
1972
- * @return {number}
1973
- */
1974
- proto.notification.NotificationRequest.prototype.getId = function() {
1975
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1976
- };
1977
-
1978
-
1979
- /**
1980
- * @param {number} value
1981
- * @return {!proto.notification.NotificationRequest} returns this
1982
- */
1983
- proto.notification.NotificationRequest.prototype.setId = function(value) {
1984
- return jspb.Message.setField(this, 1, value);
1985
- };
1986
-
1987
-
1988
- /**
1989
- * Clears the field making it undefined.
1990
- * @return {!proto.notification.NotificationRequest} returns this
1991
- */
1992
- proto.notification.NotificationRequest.prototype.clearId = function() {
1993
- return jspb.Message.setField(this, 1, undefined);
1994
- };
1995
-
1996
-
1997
- /**
1998
- * Returns whether this field is set.
1999
- * @return {boolean}
2000
- */
2001
- proto.notification.NotificationRequest.prototype.hasId = function() {
2002
- return jspb.Message.getField(this, 1) != null;
2003
- };
2004
-
2005
-
2006
- /**
2007
- * optional string title = 2;
2008
- * @return {string}
2009
- */
2010
- proto.notification.NotificationRequest.prototype.getTitle = function() {
2011
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2012
- };
2013
-
2014
-
2015
- /**
2016
- * @param {string} value
2017
- * @return {!proto.notification.NotificationRequest} returns this
2018
- */
2019
- proto.notification.NotificationRequest.prototype.setTitle = function(value) {
2020
- return jspb.Message.setField(this, 2, value);
2021
- };
2022
-
2023
-
2024
- /**
2025
- * Clears the field making it undefined.
2026
- * @return {!proto.notification.NotificationRequest} returns this
2027
- */
2028
- proto.notification.NotificationRequest.prototype.clearTitle = function() {
2029
- return jspb.Message.setField(this, 2, undefined);
2030
- };
2031
-
2032
-
2033
- /**
2034
- * Returns whether this field is set.
2035
- * @return {boolean}
2036
- */
2037
- proto.notification.NotificationRequest.prototype.hasTitle = function() {
2038
- return jspb.Message.getField(this, 2) != null;
2039
- };
2040
-
2041
-
2042
- /**
2043
- * optional string content = 3;
2044
- * @return {string}
2045
- */
2046
- proto.notification.NotificationRequest.prototype.getContent = function() {
2047
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2048
- };
2049
-
2050
-
2051
- /**
2052
- * @param {string} value
2053
- * @return {!proto.notification.NotificationRequest} returns this
2054
- */
2055
- proto.notification.NotificationRequest.prototype.setContent = function(value) {
2056
- return jspb.Message.setField(this, 3, value);
2057
- };
2058
-
2059
-
2060
- /**
2061
- * Clears the field making it undefined.
2062
- * @return {!proto.notification.NotificationRequest} returns this
2063
- */
2064
- proto.notification.NotificationRequest.prototype.clearContent = function() {
2065
- return jspb.Message.setField(this, 3, undefined);
2066
- };
2067
-
2068
-
2069
- /**
2070
- * Returns whether this field is set.
2071
- * @return {boolean}
2072
- */
2073
- proto.notification.NotificationRequest.prototype.hasContent = function() {
2074
- return jspb.Message.getField(this, 3) != null;
2075
- };
2076
-
2077
-
2078
- /**
2079
- * optional string type = 4;
2080
- * @return {string}
2081
- */
2082
- proto.notification.NotificationRequest.prototype.getType = function() {
2083
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2084
- };
2085
-
2086
-
2087
- /**
2088
- * @param {string} value
2089
- * @return {!proto.notification.NotificationRequest} returns this
2090
- */
2091
- proto.notification.NotificationRequest.prototype.setType = function(value) {
2092
- return jspb.Message.setField(this, 4, value);
2093
- };
2094
-
2095
-
2096
- /**
2097
- * Clears the field making it undefined.
2098
- * @return {!proto.notification.NotificationRequest} returns this
2099
- */
2100
- proto.notification.NotificationRequest.prototype.clearType = function() {
2101
- return jspb.Message.setField(this, 4, undefined);
2102
- };
2103
-
2104
-
2105
- /**
2106
- * Returns whether this field is set.
2107
- * @return {boolean}
2108
- */
2109
- proto.notification.NotificationRequest.prototype.hasType = function() {
2110
- return jspb.Message.getField(this, 4) != null;
2111
- };
2112
-
2113
-
2114
- /**
2115
- * optional int32 is_active = 5;
2116
- * @return {number}
2117
- */
2118
- proto.notification.NotificationRequest.prototype.getIsActive = function() {
2119
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2120
- };
2121
-
2122
-
2123
- /**
2124
- * @param {number} value
2125
- * @return {!proto.notification.NotificationRequest} returns this
2126
- */
2127
- proto.notification.NotificationRequest.prototype.setIsActive = function(value) {
2128
- return jspb.Message.setField(this, 5, value);
2129
- };
2130
-
2131
-
2132
- /**
2133
- * Clears the field making it undefined.
2134
- * @return {!proto.notification.NotificationRequest} returns this
2135
- */
2136
- proto.notification.NotificationRequest.prototype.clearIsActive = function() {
2137
- return jspb.Message.setField(this, 5, undefined);
2138
- };
2139
-
2140
-
2141
- /**
2142
- * Returns whether this field is set.
2143
- * @return {boolean}
2144
- */
2145
- proto.notification.NotificationRequest.prototype.hasIsActive = function() {
2146
- return jspb.Message.getField(this, 5) != null;
2147
- };
2148
-
2149
-
2150
-
2151
-
2152
-
2153
- if (jspb.Message.GENERATE_TO_OBJECT) {
2154
- /**
2155
- * Creates an object representation of this proto.
2156
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2157
- * Optional fields that are not set will be set to undefined.
2158
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2159
- * For the list of reserved names please see:
2160
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2161
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2162
- * JSPB instance for transitional soy proto support:
2163
- * http://goto/soy-param-migration
2164
- * @return {!Object}
2165
- */
2166
- proto.notification.GetNotificationRequest.prototype.toObject = function(opt_includeInstance) {
2167
- return proto.notification.GetNotificationRequest.toObject(opt_includeInstance, this);
2168
- };
2169
-
2170
-
2171
- /**
2172
- * Static version of the {@see toObject} method.
2173
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2174
- * the JSPB instance for transitional soy proto support:
2175
- * http://goto/soy-param-migration
2176
- * @param {!proto.notification.GetNotificationRequest} msg The msg instance to transform.
2177
- * @return {!Object}
2178
- * @suppress {unusedLocalVariables} f is only used for nested messages
2179
- */
2180
- proto.notification.GetNotificationRequest.toObject = function(includeInstance, msg) {
2181
- var f, obj = {
2182
- id: jspb.Message.getFieldWithDefault(msg, 1, 0)
2183
- };
2184
-
2185
- if (includeInstance) {
2186
- obj.$jspbMessageInstance = msg;
2187
- }
2188
- return obj;
2189
- };
2190
- }
2191
-
2192
-
2193
- /**
2194
- * Deserializes binary data (in protobuf wire format).
2195
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2196
- * @return {!proto.notification.GetNotificationRequest}
2197
- */
2198
- proto.notification.GetNotificationRequest.deserializeBinary = function(bytes) {
2199
- var reader = new jspb.BinaryReader(bytes);
2200
- var msg = new proto.notification.GetNotificationRequest;
2201
- return proto.notification.GetNotificationRequest.deserializeBinaryFromReader(msg, reader);
2202
- };
2203
-
2204
-
2205
- /**
2206
- * Deserializes binary data (in protobuf wire format) from the
2207
- * given reader into the given message object.
2208
- * @param {!proto.notification.GetNotificationRequest} msg The message object to deserialize into.
2209
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2210
- * @return {!proto.notification.GetNotificationRequest}
2211
- */
2212
- proto.notification.GetNotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
2213
- while (reader.nextField()) {
2214
- if (reader.isEndGroup()) {
2215
- break;
2216
- }
2217
- var field = reader.getFieldNumber();
2218
- switch (field) {
2219
- case 1:
2220
- var value = /** @type {number} */ (reader.readInt32());
2221
- msg.setId(value);
2222
- break;
2223
- default:
2224
- reader.skipField();
2225
- break;
2226
- }
2227
- }
2228
- return msg;
2229
- };
2230
-
2231
-
2232
- /**
2233
- * Serializes the message to binary data (in protobuf wire format).
2234
- * @return {!Uint8Array}
2235
- */
2236
- proto.notification.GetNotificationRequest.prototype.serializeBinary = function() {
2237
- var writer = new jspb.BinaryWriter();
2238
- proto.notification.GetNotificationRequest.serializeBinaryToWriter(this, writer);
2239
- return writer.getResultBuffer();
2240
- };
2241
-
2242
-
2243
- /**
2244
- * Serializes the given message to binary data (in protobuf wire
2245
- * format), writing to the given BinaryWriter.
2246
- * @param {!proto.notification.GetNotificationRequest} message
2247
- * @param {!jspb.BinaryWriter} writer
2248
- * @suppress {unusedLocalVariables} f is only used for nested messages
2249
- */
2250
- proto.notification.GetNotificationRequest.serializeBinaryToWriter = function(message, writer) {
2251
- var f = undefined;
2252
- f = message.getId();
2253
- if (f !== 0) {
2254
- writer.writeInt32(
2255
- 1,
2256
- f
2257
- );
2258
- }
2259
- };
2260
-
2261
-
2262
- /**
2263
- * optional int32 id = 1;
2264
- * @return {number}
2265
- */
2266
- proto.notification.GetNotificationRequest.prototype.getId = function() {
2267
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2268
- };
2269
-
2270
-
2271
- /**
2272
- * @param {number} value
2273
- * @return {!proto.notification.GetNotificationRequest} returns this
2274
- */
2275
- proto.notification.GetNotificationRequest.prototype.setId = function(value) {
2276
- return jspb.Message.setProto3IntField(this, 1, value);
2277
- };
2278
-
2279
-
2280
-
2281
- /**
2282
- * List of repeated fields within this message type.
2283
- * @private {!Array<number>}
2284
- * @const
2285
- */
2286
- proto.notification.SendNotificationRequest.repeatedFields_ = [2];
2287
-
2288
-
2289
-
2290
- if (jspb.Message.GENERATE_TO_OBJECT) {
2291
- /**
2292
- * Creates an object representation of this proto.
2293
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2294
- * Optional fields that are not set will be set to undefined.
2295
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2296
- * For the list of reserved names please see:
2297
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2298
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2299
- * JSPB instance for transitional soy proto support:
2300
- * http://goto/soy-param-migration
2301
- * @return {!Object}
2302
- */
2303
- proto.notification.SendNotificationRequest.prototype.toObject = function(opt_includeInstance) {
2304
- return proto.notification.SendNotificationRequest.toObject(opt_includeInstance, this);
2305
- };
2306
-
2307
-
2308
- /**
2309
- * Static version of the {@see toObject} method.
2310
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2311
- * the JSPB instance for transitional soy proto support:
2312
- * http://goto/soy-param-migration
2313
- * @param {!proto.notification.SendNotificationRequest} msg The msg instance to transform.
2314
- * @return {!Object}
2315
- * @suppress {unusedLocalVariables} f is only used for nested messages
2316
- */
2317
- proto.notification.SendNotificationRequest.toObject = function(includeInstance, msg) {
2318
- var f, obj = {
2319
- notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
2320
- userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
2321
- };
2322
-
2323
- if (includeInstance) {
2324
- obj.$jspbMessageInstance = msg;
2325
- }
2326
- return obj;
2327
- };
2328
- }
2329
-
2330
-
2331
- /**
2332
- * Deserializes binary data (in protobuf wire format).
2333
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2334
- * @return {!proto.notification.SendNotificationRequest}
2335
- */
2336
- proto.notification.SendNotificationRequest.deserializeBinary = function(bytes) {
2337
- var reader = new jspb.BinaryReader(bytes);
2338
- var msg = new proto.notification.SendNotificationRequest;
2339
- return proto.notification.SendNotificationRequest.deserializeBinaryFromReader(msg, reader);
2340
- };
2341
-
2342
-
2343
- /**
2344
- * Deserializes binary data (in protobuf wire format) from the
2345
- * given reader into the given message object.
2346
- * @param {!proto.notification.SendNotificationRequest} msg The message object to deserialize into.
2347
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2348
- * @return {!proto.notification.SendNotificationRequest}
2349
- */
2350
- proto.notification.SendNotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
2351
- while (reader.nextField()) {
2352
- if (reader.isEndGroup()) {
2353
- break;
2354
- }
2355
- var field = reader.getFieldNumber();
2356
- switch (field) {
2357
- case 1:
2358
- var value = /** @type {number} */ (reader.readInt32());
2359
- msg.setNotificationId(value);
2360
- break;
2361
- case 2:
2362
- var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
2363
- for (var i = 0; i < values.length; i++) {
2364
- msg.addUserIds(values[i]);
2365
- }
2366
- break;
2367
- default:
2368
- reader.skipField();
2369
- break;
2370
- }
2371
- }
2372
- return msg;
2373
- };
2374
-
2375
-
2376
- /**
2377
- * Serializes the message to binary data (in protobuf wire format).
2378
- * @return {!Uint8Array}
2379
- */
2380
- proto.notification.SendNotificationRequest.prototype.serializeBinary = function() {
2381
- var writer = new jspb.BinaryWriter();
2382
- proto.notification.SendNotificationRequest.serializeBinaryToWriter(this, writer);
2383
- return writer.getResultBuffer();
2384
- };
2385
-
2386
-
2387
- /**
2388
- * Serializes the given message to binary data (in protobuf wire
2389
- * format), writing to the given BinaryWriter.
2390
- * @param {!proto.notification.SendNotificationRequest} message
2391
- * @param {!jspb.BinaryWriter} writer
2392
- * @suppress {unusedLocalVariables} f is only used for nested messages
2393
- */
2394
- proto.notification.SendNotificationRequest.serializeBinaryToWriter = function(message, writer) {
2395
- var f = undefined;
2396
- f = message.getNotificationId();
2397
- if (f !== 0) {
2398
- writer.writeInt32(
2399
- 1,
2400
- f
2401
- );
2402
- }
2403
- f = message.getUserIdsList();
2404
- if (f.length > 0) {
2405
- writer.writePackedInt32(
2406
- 2,
2407
- f
2408
- );
2409
- }
2410
- };
2411
-
2412
-
2413
- /**
2414
- * optional int32 notification_id = 1;
2415
- * @return {number}
2416
- */
2417
- proto.notification.SendNotificationRequest.prototype.getNotificationId = function() {
2418
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2419
- };
2420
-
2421
-
2422
- /**
2423
- * @param {number} value
2424
- * @return {!proto.notification.SendNotificationRequest} returns this
2425
- */
2426
- proto.notification.SendNotificationRequest.prototype.setNotificationId = function(value) {
2427
- return jspb.Message.setProto3IntField(this, 1, value);
2428
- };
2429
-
2430
-
2431
- /**
2432
- * repeated int32 user_ids = 2;
2433
- * @return {!Array<number>}
2434
- */
2435
- proto.notification.SendNotificationRequest.prototype.getUserIdsList = function() {
2436
- return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
2437
- };
2438
-
2439
-
2440
- /**
2441
- * @param {!Array<number>} value
2442
- * @return {!proto.notification.SendNotificationRequest} returns this
2443
- */
2444
- proto.notification.SendNotificationRequest.prototype.setUserIdsList = function(value) {
2445
- return jspb.Message.setField(this, 2, value || []);
2446
- };
2447
-
2448
-
2449
- /**
2450
- * @param {number} value
2451
- * @param {number=} opt_index
2452
- * @return {!proto.notification.SendNotificationRequest} returns this
2453
- */
2454
- proto.notification.SendNotificationRequest.prototype.addUserIds = function(value, opt_index) {
2455
- return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
2456
- };
2457
-
2458
-
2459
- /**
2460
- * Clears the list making it empty but non-null.
2461
- * @return {!proto.notification.SendNotificationRequest} returns this
2462
- */
2463
- proto.notification.SendNotificationRequest.prototype.clearUserIdsList = function() {
2464
- return this.setUserIdsList([]);
2465
- };
2466
-
2467
-
2468
-
2469
-
2470
-
2471
- if (jspb.Message.GENERATE_TO_OBJECT) {
2472
- /**
2473
- * Creates an object representation of this proto.
2474
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2475
- * Optional fields that are not set will be set to undefined.
2476
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2477
- * For the list of reserved names please see:
2478
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2479
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2480
- * JSPB instance for transitional soy proto support:
2481
- * http://goto/soy-param-migration
2482
- * @return {!Object}
2483
- */
2484
- proto.notification.NotificationStatusResponse.prototype.toObject = function(opt_includeInstance) {
2485
- return proto.notification.NotificationStatusResponse.toObject(opt_includeInstance, this);
2486
- };
2487
-
2488
-
2489
- /**
2490
- * Static version of the {@see toObject} method.
2491
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2492
- * the JSPB instance for transitional soy proto support:
2493
- * http://goto/soy-param-migration
2494
- * @param {!proto.notification.NotificationStatusResponse} msg The msg instance to transform.
2495
- * @return {!Object}
2496
- * @suppress {unusedLocalVariables} f is only used for nested messages
2497
- */
2498
- proto.notification.NotificationStatusResponse.toObject = function(includeInstance, msg) {
2499
- var f, obj = {
2500
- status: jspb.Message.getFieldWithDefault(msg, 1, "")
2501
- };
2502
-
2503
- if (includeInstance) {
2504
- obj.$jspbMessageInstance = msg;
2505
- }
2506
- return obj;
2507
- };
2508
- }
2509
-
2510
-
2511
- /**
2512
- * Deserializes binary data (in protobuf wire format).
2513
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2514
- * @return {!proto.notification.NotificationStatusResponse}
2515
- */
2516
- proto.notification.NotificationStatusResponse.deserializeBinary = function(bytes) {
2517
- var reader = new jspb.BinaryReader(bytes);
2518
- var msg = new proto.notification.NotificationStatusResponse;
2519
- return proto.notification.NotificationStatusResponse.deserializeBinaryFromReader(msg, reader);
2520
- };
2521
-
2522
-
2523
- /**
2524
- * Deserializes binary data (in protobuf wire format) from the
2525
- * given reader into the given message object.
2526
- * @param {!proto.notification.NotificationStatusResponse} msg The message object to deserialize into.
2527
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2528
- * @return {!proto.notification.NotificationStatusResponse}
2529
- */
2530
- proto.notification.NotificationStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
2531
- while (reader.nextField()) {
2532
- if (reader.isEndGroup()) {
2533
- break;
2534
- }
2535
- var field = reader.getFieldNumber();
2536
- switch (field) {
2537
- case 1:
2538
- var value = /** @type {string} */ (reader.readString());
2539
- msg.setStatus(value);
2540
- break;
2541
- default:
2542
- reader.skipField();
2543
- break;
2544
- }
2545
- }
2546
- return msg;
2547
- };
2548
-
2549
-
2550
- /**
2551
- * Serializes the message to binary data (in protobuf wire format).
2552
- * @return {!Uint8Array}
2553
- */
2554
- proto.notification.NotificationStatusResponse.prototype.serializeBinary = function() {
2555
- var writer = new jspb.BinaryWriter();
2556
- proto.notification.NotificationStatusResponse.serializeBinaryToWriter(this, writer);
2557
- return writer.getResultBuffer();
2558
- };
2559
-
2560
-
2561
- /**
2562
- * Serializes the given message to binary data (in protobuf wire
2563
- * format), writing to the given BinaryWriter.
2564
- * @param {!proto.notification.NotificationStatusResponse} message
2565
- * @param {!jspb.BinaryWriter} writer
2566
- * @suppress {unusedLocalVariables} f is only used for nested messages
2567
- */
2568
- proto.notification.NotificationStatusResponse.serializeBinaryToWriter = function(message, writer) {
2569
- var f = undefined;
2570
- f = message.getStatus();
2571
- if (f.length > 0) {
2572
- writer.writeString(
2573
- 1,
2574
- f
2575
- );
2576
- }
2577
- };
2578
-
2579
-
2580
- /**
2581
- * optional string status = 1;
2582
- * @return {string}
2583
- */
2584
- proto.notification.NotificationStatusResponse.prototype.getStatus = function() {
2585
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2586
- };
2587
-
2588
-
2589
- /**
2590
- * @param {string} value
2591
- * @return {!proto.notification.NotificationStatusResponse} returns this
2592
- */
2593
- proto.notification.NotificationStatusResponse.prototype.setStatus = function(value) {
2594
- return jspb.Message.setProto3StringField(this, 1, value);
2595
- };
2596
-
2597
-
2598
-
2599
-
2600
-
2601
- if (jspb.Message.GENERATE_TO_OBJECT) {
2602
- /**
2603
- * Creates an object representation of this proto.
2604
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2605
- * Optional fields that are not set will be set to undefined.
2606
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2607
- * For the list of reserved names please see:
2608
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2609
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2610
- * JSPB instance for transitional soy proto support:
2611
- * http://goto/soy-param-migration
2612
- * @return {!Object}
2613
- */
2614
- proto.notification.UserNotificationItem.prototype.toObject = function(opt_includeInstance) {
2615
- return proto.notification.UserNotificationItem.toObject(opt_includeInstance, this);
2616
- };
2617
-
2618
-
2619
- /**
2620
- * Static version of the {@see toObject} method.
2621
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2622
- * the JSPB instance for transitional soy proto support:
2623
- * http://goto/soy-param-migration
2624
- * @param {!proto.notification.UserNotificationItem} msg The msg instance to transform.
2625
- * @return {!Object}
2626
- * @suppress {unusedLocalVariables} f is only used for nested messages
2627
- */
2628
- proto.notification.UserNotificationItem.toObject = function(includeInstance, msg) {
2629
- var f, obj = {
2630
- id: jspb.Message.getFieldWithDefault(msg, 1, 0),
2631
- title: jspb.Message.getFieldWithDefault(msg, 2, ""),
2632
- content: jspb.Message.getFieldWithDefault(msg, 3, ""),
2633
- isChecked: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
2634
- created: jspb.Message.getFieldWithDefault(msg, 5, "")
2635
- };
2636
-
2637
- if (includeInstance) {
2638
- obj.$jspbMessageInstance = msg;
2639
- }
2640
- return obj;
2641
- };
2642
- }
2643
-
2644
-
2645
- /**
2646
- * Deserializes binary data (in protobuf wire format).
2647
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2648
- * @return {!proto.notification.UserNotificationItem}
2649
- */
2650
- proto.notification.UserNotificationItem.deserializeBinary = function(bytes) {
2651
- var reader = new jspb.BinaryReader(bytes);
2652
- var msg = new proto.notification.UserNotificationItem;
2653
- return proto.notification.UserNotificationItem.deserializeBinaryFromReader(msg, reader);
2654
- };
2655
-
2656
-
2657
- /**
2658
- * Deserializes binary data (in protobuf wire format) from the
2659
- * given reader into the given message object.
2660
- * @param {!proto.notification.UserNotificationItem} msg The message object to deserialize into.
2661
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2662
- * @return {!proto.notification.UserNotificationItem}
2663
- */
2664
- proto.notification.UserNotificationItem.deserializeBinaryFromReader = function(msg, reader) {
2665
- while (reader.nextField()) {
2666
- if (reader.isEndGroup()) {
2667
- break;
2668
- }
2669
- var field = reader.getFieldNumber();
2670
- switch (field) {
2671
- case 1:
2672
- var value = /** @type {number} */ (reader.readInt32());
2673
- msg.setId(value);
2674
- break;
2675
- case 2:
2676
- var value = /** @type {string} */ (reader.readString());
2677
- msg.setTitle(value);
2678
- break;
2679
- case 3:
2680
- var value = /** @type {string} */ (reader.readString());
2681
- msg.setContent(value);
2682
- break;
2683
- case 4:
2684
- var value = /** @type {boolean} */ (reader.readBool());
2685
- msg.setIsChecked(value);
2686
- break;
2687
- case 5:
2688
- var value = /** @type {string} */ (reader.readString());
2689
- msg.setCreated(value);
2690
- break;
2691
- default:
2692
- reader.skipField();
2693
- break;
2694
- }
2695
- }
2696
- return msg;
2697
- };
2698
-
2699
-
2700
- /**
2701
- * Serializes the message to binary data (in protobuf wire format).
2702
- * @return {!Uint8Array}
2703
- */
2704
- proto.notification.UserNotificationItem.prototype.serializeBinary = function() {
2705
- var writer = new jspb.BinaryWriter();
2706
- proto.notification.UserNotificationItem.serializeBinaryToWriter(this, writer);
2707
- return writer.getResultBuffer();
2708
- };
2709
-
2710
-
2711
- /**
2712
- * Serializes the given message to binary data (in protobuf wire
2713
- * format), writing to the given BinaryWriter.
2714
- * @param {!proto.notification.UserNotificationItem} message
2715
- * @param {!jspb.BinaryWriter} writer
2716
- * @suppress {unusedLocalVariables} f is only used for nested messages
2717
- */
2718
- proto.notification.UserNotificationItem.serializeBinaryToWriter = function(message, writer) {
2719
- var f = undefined;
2720
- f = message.getId();
2721
- if (f !== 0) {
2722
- writer.writeInt32(
2723
- 1,
2724
- f
2725
- );
2726
- }
2727
- f = message.getTitle();
2728
- if (f.length > 0) {
2729
- writer.writeString(
2730
- 2,
2731
- f
2732
- );
2733
- }
2734
- f = message.getContent();
2735
- if (f.length > 0) {
2736
- writer.writeString(
2737
- 3,
2738
- f
2739
- );
2740
- }
2741
- f = message.getIsChecked();
2742
- if (f) {
2743
- writer.writeBool(
2744
- 4,
2745
- f
2746
- );
2747
- }
2748
- f = /** @type {string} */ (jspb.Message.getField(message, 5));
2749
- if (f != null) {
2750
- writer.writeString(
2751
- 5,
2752
- f
2753
- );
2754
- }
2755
- };
2756
-
2757
-
2758
- /**
2759
- * optional int32 id = 1;
2760
- * @return {number}
2761
- */
2762
- proto.notification.UserNotificationItem.prototype.getId = function() {
2763
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2764
- };
2765
-
2766
-
2767
- /**
2768
- * @param {number} value
2769
- * @return {!proto.notification.UserNotificationItem} returns this
2770
- */
2771
- proto.notification.UserNotificationItem.prototype.setId = function(value) {
2772
- return jspb.Message.setProto3IntField(this, 1, value);
2773
- };
2774
-
2775
-
2776
- /**
2777
- * optional string title = 2;
2778
- * @return {string}
2779
- */
2780
- proto.notification.UserNotificationItem.prototype.getTitle = function() {
2781
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2782
- };
2783
-
2784
-
2785
- /**
2786
- * @param {string} value
2787
- * @return {!proto.notification.UserNotificationItem} returns this
2788
- */
2789
- proto.notification.UserNotificationItem.prototype.setTitle = function(value) {
2790
- return jspb.Message.setProto3StringField(this, 2, value);
2791
- };
2792
-
2793
-
2794
- /**
2795
- * optional string content = 3;
2796
- * @return {string}
2797
- */
2798
- proto.notification.UserNotificationItem.prototype.getContent = function() {
2799
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2800
- };
2801
-
2802
-
2803
- /**
2804
- * @param {string} value
2805
- * @return {!proto.notification.UserNotificationItem} returns this
2806
- */
2807
- proto.notification.UserNotificationItem.prototype.setContent = function(value) {
2808
- return jspb.Message.setProto3StringField(this, 3, value);
2809
- };
2810
-
2811
-
2812
- /**
2813
- * optional bool is_checked = 4;
2814
- * @return {boolean}
2815
- */
2816
- proto.notification.UserNotificationItem.prototype.getIsChecked = function() {
2817
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
2818
- };
2819
-
2820
-
2821
- /**
2822
- * @param {boolean} value
2823
- * @return {!proto.notification.UserNotificationItem} returns this
2824
- */
2825
- proto.notification.UserNotificationItem.prototype.setIsChecked = function(value) {
2826
- return jspb.Message.setProto3BooleanField(this, 4, value);
2827
- };
2828
-
2829
-
2830
- /**
2831
- * optional string created = 5;
2832
- * @return {string}
2833
- */
2834
- proto.notification.UserNotificationItem.prototype.getCreated = function() {
2835
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2836
- };
2837
-
2838
-
2839
- /**
2840
- * @param {string} value
2841
- * @return {!proto.notification.UserNotificationItem} returns this
2842
- */
2843
- proto.notification.UserNotificationItem.prototype.setCreated = function(value) {
2844
- return jspb.Message.setField(this, 5, value);
2845
- };
2846
-
2847
-
2848
- /**
2849
- * Clears the field making it undefined.
2850
- * @return {!proto.notification.UserNotificationItem} returns this
2851
- */
2852
- proto.notification.UserNotificationItem.prototype.clearCreated = function() {
2853
- return jspb.Message.setField(this, 5, undefined);
2854
- };
2855
-
2856
-
2857
- /**
2858
- * Returns whether this field is set.
2859
- * @return {boolean}
2860
- */
2861
- proto.notification.UserNotificationItem.prototype.hasCreated = function() {
2862
- return jspb.Message.getField(this, 5) != null;
2863
- };
2864
-
2865
-
2866
-
2867
- /**
2868
- * List of repeated fields within this message type.
2869
- * @private {!Array<number>}
2870
- * @const
2871
- */
2872
- proto.notification.UserNotificationItemsResponse.repeatedFields_ = [1];
2873
-
2874
-
2875
-
2876
- if (jspb.Message.GENERATE_TO_OBJECT) {
2877
- /**
2878
- * Creates an object representation of this proto.
2879
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2880
- * Optional fields that are not set will be set to undefined.
2881
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2882
- * For the list of reserved names please see:
2883
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2884
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2885
- * JSPB instance for transitional soy proto support:
2886
- * http://goto/soy-param-migration
2887
- * @return {!Object}
2888
- */
2889
- proto.notification.UserNotificationItemsResponse.prototype.toObject = function(opt_includeInstance) {
2890
- return proto.notification.UserNotificationItemsResponse.toObject(opt_includeInstance, this);
2891
- };
2892
-
2893
-
2894
- /**
2895
- * Static version of the {@see toObject} method.
2896
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2897
- * the JSPB instance for transitional soy proto support:
2898
- * http://goto/soy-param-migration
2899
- * @param {!proto.notification.UserNotificationItemsResponse} msg The msg instance to transform.
2900
- * @return {!Object}
2901
- * @suppress {unusedLocalVariables} f is only used for nested messages
2902
- */
2903
- proto.notification.UserNotificationItemsResponse.toObject = function(includeInstance, msg) {
2904
- var f, obj = {
2905
- itemsList: jspb.Message.toObjectList(msg.getItemsList(),
2906
- proto.notification.UserNotificationItem.toObject, includeInstance),
2907
- totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
2908
- totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
2909
- };
2910
-
2911
- if (includeInstance) {
2912
- obj.$jspbMessageInstance = msg;
2913
- }
2914
- return obj;
2915
- };
2916
- }
2917
-
2918
-
2919
- /**
2920
- * Deserializes binary data (in protobuf wire format).
2921
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2922
- * @return {!proto.notification.UserNotificationItemsResponse}
2923
- */
2924
- proto.notification.UserNotificationItemsResponse.deserializeBinary = function(bytes) {
2925
- var reader = new jspb.BinaryReader(bytes);
2926
- var msg = new proto.notification.UserNotificationItemsResponse;
2927
- return proto.notification.UserNotificationItemsResponse.deserializeBinaryFromReader(msg, reader);
2928
- };
2929
-
2930
-
2931
- /**
2932
- * Deserializes binary data (in protobuf wire format) from the
2933
- * given reader into the given message object.
2934
- * @param {!proto.notification.UserNotificationItemsResponse} msg The message object to deserialize into.
2935
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2936
- * @return {!proto.notification.UserNotificationItemsResponse}
2937
- */
2938
- proto.notification.UserNotificationItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
2939
- while (reader.nextField()) {
2940
- if (reader.isEndGroup()) {
2941
- break;
2942
- }
2943
- var field = reader.getFieldNumber();
2944
- switch (field) {
2945
- case 1:
2946
- var value = new proto.notification.UserNotificationItem;
2947
- reader.readMessage(value,proto.notification.UserNotificationItem.deserializeBinaryFromReader);
2948
- msg.addItems(value);
2949
- break;
2950
- case 2:
2951
- var value = /** @type {number} */ (reader.readInt32());
2952
- msg.setTotalPages(value);
2953
- break;
2954
- case 3:
2955
- var value = /** @type {number} */ (reader.readInt32());
2956
- msg.setTotalItems(value);
2957
- break;
2958
- default:
2959
- reader.skipField();
2960
- break;
2961
- }
2962
- }
2963
- return msg;
2964
- };
2965
-
2966
-
2967
- /**
2968
- * Serializes the message to binary data (in protobuf wire format).
2969
- * @return {!Uint8Array}
2970
- */
2971
- proto.notification.UserNotificationItemsResponse.prototype.serializeBinary = function() {
2972
- var writer = new jspb.BinaryWriter();
2973
- proto.notification.UserNotificationItemsResponse.serializeBinaryToWriter(this, writer);
2974
- return writer.getResultBuffer();
2975
- };
2976
-
2977
-
2978
- /**
2979
- * Serializes the given message to binary data (in protobuf wire
2980
- * format), writing to the given BinaryWriter.
2981
- * @param {!proto.notification.UserNotificationItemsResponse} message
2982
- * @param {!jspb.BinaryWriter} writer
2983
- * @suppress {unusedLocalVariables} f is only used for nested messages
2984
- */
2985
- proto.notification.UserNotificationItemsResponse.serializeBinaryToWriter = function(message, writer) {
2986
- var f = undefined;
2987
- f = message.getItemsList();
2988
- if (f.length > 0) {
2989
- writer.writeRepeatedMessage(
2990
- 1,
2991
- f,
2992
- proto.notification.UserNotificationItem.serializeBinaryToWriter
2993
- );
2994
- }
2995
- f = /** @type {number} */ (jspb.Message.getField(message, 2));
2996
- if (f != null) {
2997
- writer.writeInt32(
2998
- 2,
2999
- f
3000
- );
3001
- }
3002
- f = /** @type {number} */ (jspb.Message.getField(message, 3));
3003
- if (f != null) {
3004
- writer.writeInt32(
3005
- 3,
3006
- f
3007
- );
3008
- }
3009
- };
3010
-
3011
-
3012
- /**
3013
- * repeated UserNotificationItem items = 1;
3014
- * @return {!Array<!proto.notification.UserNotificationItem>}
3015
- */
3016
- proto.notification.UserNotificationItemsResponse.prototype.getItemsList = function() {
3017
- return /** @type{!Array<!proto.notification.UserNotificationItem>} */ (
3018
- jspb.Message.getRepeatedWrapperField(this, proto.notification.UserNotificationItem, 1));
3019
- };
3020
-
3021
-
3022
- /**
3023
- * @param {!Array<!proto.notification.UserNotificationItem>} value
3024
- * @return {!proto.notification.UserNotificationItemsResponse} returns this
3025
- */
3026
- proto.notification.UserNotificationItemsResponse.prototype.setItemsList = function(value) {
3027
- return jspb.Message.setRepeatedWrapperField(this, 1, value);
3028
- };
3029
-
3030
-
3031
- /**
3032
- * @param {!proto.notification.UserNotificationItem=} opt_value
3033
- * @param {number=} opt_index
3034
- * @return {!proto.notification.UserNotificationItem}
3035
- */
3036
- proto.notification.UserNotificationItemsResponse.prototype.addItems = function(opt_value, opt_index) {
3037
- return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.notification.UserNotificationItem, opt_index);
3038
- };
3039
-
3040
-
3041
- /**
3042
- * Clears the list making it empty but non-null.
3043
- * @return {!proto.notification.UserNotificationItemsResponse} returns this
3044
- */
3045
- proto.notification.UserNotificationItemsResponse.prototype.clearItemsList = function() {
3046
- return this.setItemsList([]);
3047
- };
3048
-
3049
-
3050
- /**
3051
- * optional int32 total_pages = 2;
3052
- * @return {number}
3053
- */
3054
- proto.notification.UserNotificationItemsResponse.prototype.getTotalPages = function() {
3055
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3056
- };
3057
-
3058
-
3059
- /**
3060
- * @param {number} value
3061
- * @return {!proto.notification.UserNotificationItemsResponse} returns this
3062
- */
3063
- proto.notification.UserNotificationItemsResponse.prototype.setTotalPages = function(value) {
3064
- return jspb.Message.setField(this, 2, value);
3065
- };
3066
-
3067
-
3068
- /**
3069
- * Clears the field making it undefined.
3070
- * @return {!proto.notification.UserNotificationItemsResponse} returns this
3071
- */
3072
- proto.notification.UserNotificationItemsResponse.prototype.clearTotalPages = function() {
3073
- return jspb.Message.setField(this, 2, undefined);
3074
- };
3075
-
3076
-
3077
- /**
3078
- * Returns whether this field is set.
3079
- * @return {boolean}
3080
- */
3081
- proto.notification.UserNotificationItemsResponse.prototype.hasTotalPages = function() {
3082
- return jspb.Message.getField(this, 2) != null;
3083
- };
3084
-
3085
-
3086
- /**
3087
- * optional int32 total_items = 3;
3088
- * @return {number}
3089
- */
3090
- proto.notification.UserNotificationItemsResponse.prototype.getTotalItems = function() {
3091
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3092
- };
3093
-
3094
-
3095
- /**
3096
- * @param {number} value
3097
- * @return {!proto.notification.UserNotificationItemsResponse} returns this
3098
- */
3099
- proto.notification.UserNotificationItemsResponse.prototype.setTotalItems = function(value) {
3100
- return jspb.Message.setField(this, 3, value);
3101
- };
3102
-
3103
-
3104
- /**
3105
- * Clears the field making it undefined.
3106
- * @return {!proto.notification.UserNotificationItemsResponse} returns this
3107
- */
3108
- proto.notification.UserNotificationItemsResponse.prototype.clearTotalItems = function() {
3109
- return jspb.Message.setField(this, 3, undefined);
3110
- };
3111
-
3112
-
3113
- /**
3114
- * Returns whether this field is set.
3115
- * @return {boolean}
3116
- */
3117
- proto.notification.UserNotificationItemsResponse.prototype.hasTotalItems = function() {
3118
- return jspb.Message.getField(this, 3) != null;
3119
- };
3120
-
3121
-
3122
-
3123
-
3124
-
3125
- if (jspb.Message.GENERATE_TO_OBJECT) {
3126
- /**
3127
- * Creates an object representation of this proto.
3128
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3129
- * Optional fields that are not set will be set to undefined.
3130
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3131
- * For the list of reserved names please see:
3132
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3133
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3134
- * JSPB instance for transitional soy proto support:
3135
- * http://goto/soy-param-migration
3136
- * @return {!Object}
3137
- */
3138
- proto.notification.NotificationItem.prototype.toObject = function(opt_includeInstance) {
3139
- return proto.notification.NotificationItem.toObject(opt_includeInstance, this);
3140
- };
3141
-
3142
-
3143
- /**
3144
- * Static version of the {@see toObject} method.
3145
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3146
- * the JSPB instance for transitional soy proto support:
3147
- * http://goto/soy-param-migration
3148
- * @param {!proto.notification.NotificationItem} msg The msg instance to transform.
3149
- * @return {!Object}
3150
- * @suppress {unusedLocalVariables} f is only used for nested messages
3151
- */
3152
- proto.notification.NotificationItem.toObject = function(includeInstance, msg) {
3153
- var f, obj = {
3154
- id: jspb.Message.getFieldWithDefault(msg, 1, 0),
3155
- title: jspb.Message.getFieldWithDefault(msg, 2, ""),
3156
- content: jspb.Message.getFieldWithDefault(msg, 3, ""),
3157
- isActive: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
3158
- type: jspb.Message.getFieldWithDefault(msg, 5, ""),
3159
- created: jspb.Message.getFieldWithDefault(msg, 6, "")
3160
- };
3161
-
3162
- if (includeInstance) {
3163
- obj.$jspbMessageInstance = msg;
3164
- }
3165
- return obj;
3166
- };
3167
- }
3168
-
3169
-
3170
- /**
3171
- * Deserializes binary data (in protobuf wire format).
3172
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3173
- * @return {!proto.notification.NotificationItem}
3174
- */
3175
- proto.notification.NotificationItem.deserializeBinary = function(bytes) {
3176
- var reader = new jspb.BinaryReader(bytes);
3177
- var msg = new proto.notification.NotificationItem;
3178
- return proto.notification.NotificationItem.deserializeBinaryFromReader(msg, reader);
3179
- };
3180
-
3181
-
3182
- /**
3183
- * Deserializes binary data (in protobuf wire format) from the
3184
- * given reader into the given message object.
3185
- * @param {!proto.notification.NotificationItem} msg The message object to deserialize into.
3186
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3187
- * @return {!proto.notification.NotificationItem}
3188
- */
3189
- proto.notification.NotificationItem.deserializeBinaryFromReader = function(msg, reader) {
3190
- while (reader.nextField()) {
3191
- if (reader.isEndGroup()) {
3192
- break;
3193
- }
3194
- var field = reader.getFieldNumber();
3195
- switch (field) {
3196
- case 1:
3197
- var value = /** @type {number} */ (reader.readInt32());
3198
- msg.setId(value);
3199
- break;
3200
- case 2:
3201
- var value = /** @type {string} */ (reader.readString());
3202
- msg.setTitle(value);
3203
- break;
3204
- case 3:
3205
- var value = /** @type {string} */ (reader.readString());
3206
- msg.setContent(value);
3207
- break;
3208
- case 4:
3209
- var value = /** @type {boolean} */ (reader.readBool());
3210
- msg.setIsActive(value);
3211
- break;
3212
- case 5:
3213
- var value = /** @type {string} */ (reader.readString());
3214
- msg.setType(value);
3215
- break;
3216
- case 6:
3217
- var value = /** @type {string} */ (reader.readString());
3218
- msg.setCreated(value);
3219
- break;
3220
- default:
3221
- reader.skipField();
3222
- break;
3223
- }
3224
- }
3225
- return msg;
3226
- };
3227
-
3228
-
3229
- /**
3230
- * Serializes the message to binary data (in protobuf wire format).
3231
- * @return {!Uint8Array}
3232
- */
3233
- proto.notification.NotificationItem.prototype.serializeBinary = function() {
3234
- var writer = new jspb.BinaryWriter();
3235
- proto.notification.NotificationItem.serializeBinaryToWriter(this, writer);
3236
- return writer.getResultBuffer();
3237
- };
3238
-
3239
-
3240
- /**
3241
- * Serializes the given message to binary data (in protobuf wire
3242
- * format), writing to the given BinaryWriter.
3243
- * @param {!proto.notification.NotificationItem} message
3244
- * @param {!jspb.BinaryWriter} writer
3245
- * @suppress {unusedLocalVariables} f is only used for nested messages
3246
- */
3247
- proto.notification.NotificationItem.serializeBinaryToWriter = function(message, writer) {
3248
- var f = undefined;
3249
- f = message.getId();
3250
- if (f !== 0) {
3251
- writer.writeInt32(
3252
- 1,
3253
- f
3254
- );
3255
- }
3256
- f = message.getTitle();
3257
- if (f.length > 0) {
3258
- writer.writeString(
3259
- 2,
3260
- f
3261
- );
3262
- }
3263
- f = message.getContent();
3264
- if (f.length > 0) {
3265
- writer.writeString(
3266
- 3,
3267
- f
3268
- );
3269
- }
3270
- f = message.getIsActive();
3271
- if (f) {
3272
- writer.writeBool(
3273
- 4,
3274
- f
3275
- );
3276
- }
3277
- f = message.getType();
3278
- if (f.length > 0) {
3279
- writer.writeString(
3280
- 5,
3281
- f
3282
- );
3283
- }
3284
- f = /** @type {string} */ (jspb.Message.getField(message, 6));
3285
- if (f != null) {
3286
- writer.writeString(
3287
- 6,
3288
- f
3289
- );
3290
- }
3291
- };
3292
-
3293
-
3294
- /**
3295
- * optional int32 id = 1;
3296
- * @return {number}
3297
- */
3298
- proto.notification.NotificationItem.prototype.getId = function() {
3299
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3300
- };
3301
-
3302
-
3303
- /**
3304
- * @param {number} value
3305
- * @return {!proto.notification.NotificationItem} returns this
3306
- */
3307
- proto.notification.NotificationItem.prototype.setId = function(value) {
3308
- return jspb.Message.setProto3IntField(this, 1, value);
3309
- };
3310
-
3311
-
3312
- /**
3313
- * optional string title = 2;
3314
- * @return {string}
3315
- */
3316
- proto.notification.NotificationItem.prototype.getTitle = function() {
3317
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3318
- };
3319
-
3320
-
3321
- /**
3322
- * @param {string} value
3323
- * @return {!proto.notification.NotificationItem} returns this
3324
- */
3325
- proto.notification.NotificationItem.prototype.setTitle = function(value) {
3326
- return jspb.Message.setProto3StringField(this, 2, value);
3327
- };
3328
-
3329
-
3330
- /**
3331
- * optional string content = 3;
3332
- * @return {string}
3333
- */
3334
- proto.notification.NotificationItem.prototype.getContent = function() {
3335
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3336
- };
3337
-
3338
-
3339
- /**
3340
- * @param {string} value
3341
- * @return {!proto.notification.NotificationItem} returns this
3342
- */
3343
- proto.notification.NotificationItem.prototype.setContent = function(value) {
3344
- return jspb.Message.setProto3StringField(this, 3, value);
3345
- };
3346
-
3347
-
3348
- /**
3349
- * optional bool is_active = 4;
3350
- * @return {boolean}
3351
- */
3352
- proto.notification.NotificationItem.prototype.getIsActive = function() {
3353
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
3354
- };
3355
-
3356
-
3357
- /**
3358
- * @param {boolean} value
3359
- * @return {!proto.notification.NotificationItem} returns this
3360
- */
3361
- proto.notification.NotificationItem.prototype.setIsActive = function(value) {
3362
- return jspb.Message.setProto3BooleanField(this, 4, value);
3363
- };
3364
-
3365
-
3366
- /**
3367
- * optional string type = 5;
3368
- * @return {string}
3369
- */
3370
- proto.notification.NotificationItem.prototype.getType = function() {
3371
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3372
- };
3373
-
3374
-
3375
- /**
3376
- * @param {string} value
3377
- * @return {!proto.notification.NotificationItem} returns this
3378
- */
3379
- proto.notification.NotificationItem.prototype.setType = function(value) {
3380
- return jspb.Message.setProto3StringField(this, 5, value);
3381
- };
3382
-
3383
-
3384
- /**
3385
- * optional string created = 6;
3386
- * @return {string}
3387
- */
3388
- proto.notification.NotificationItem.prototype.getCreated = function() {
3389
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
3390
- };
3391
-
3392
-
3393
- /**
3394
- * @param {string} value
3395
- * @return {!proto.notification.NotificationItem} returns this
3396
- */
3397
- proto.notification.NotificationItem.prototype.setCreated = function(value) {
3398
- return jspb.Message.setField(this, 6, value);
3399
- };
3400
-
3401
-
3402
- /**
3403
- * Clears the field making it undefined.
3404
- * @return {!proto.notification.NotificationItem} returns this
3405
- */
3406
- proto.notification.NotificationItem.prototype.clearCreated = function() {
3407
- return jspb.Message.setField(this, 6, undefined);
3408
- };
3409
-
3410
-
3411
- /**
3412
- * Returns whether this field is set.
3413
- * @return {boolean}
3414
- */
3415
- proto.notification.NotificationItem.prototype.hasCreated = function() {
3416
- return jspb.Message.getField(this, 6) != null;
3417
- };
3418
-
3419
-
3420
-
3421
-
3422
-
3423
- if (jspb.Message.GENERATE_TO_OBJECT) {
3424
- /**
3425
- * Creates an object representation of this proto.
3426
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3427
- * Optional fields that are not set will be set to undefined.
3428
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3429
- * For the list of reserved names please see:
3430
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3431
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3432
- * JSPB instance for transitional soy proto support:
3433
- * http://goto/soy-param-migration
3434
- * @return {!Object}
3435
- */
3436
- proto.notification.NotificationResponse.prototype.toObject = function(opt_includeInstance) {
3437
- return proto.notification.NotificationResponse.toObject(opt_includeInstance, this);
3438
- };
3439
-
3440
-
3441
- /**
3442
- * Static version of the {@see toObject} method.
3443
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3444
- * the JSPB instance for transitional soy proto support:
3445
- * http://goto/soy-param-migration
3446
- * @param {!proto.notification.NotificationResponse} msg The msg instance to transform.
3447
- * @return {!Object}
3448
- * @suppress {unusedLocalVariables} f is only used for nested messages
3449
- */
3450
- proto.notification.NotificationResponse.toObject = function(includeInstance, msg) {
3451
- var f, obj = {
3452
- data: (f = msg.getData()) && proto.notification.NotificationItem.toObject(includeInstance, f)
3453
- };
3454
-
3455
- if (includeInstance) {
3456
- obj.$jspbMessageInstance = msg;
3457
- }
3458
- return obj;
3459
- };
3460
- }
3461
-
3462
-
3463
- /**
3464
- * Deserializes binary data (in protobuf wire format).
3465
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3466
- * @return {!proto.notification.NotificationResponse}
3467
- */
3468
- proto.notification.NotificationResponse.deserializeBinary = function(bytes) {
3469
- var reader = new jspb.BinaryReader(bytes);
3470
- var msg = new proto.notification.NotificationResponse;
3471
- return proto.notification.NotificationResponse.deserializeBinaryFromReader(msg, reader);
3472
- };
3473
-
3474
-
3475
- /**
3476
- * Deserializes binary data (in protobuf wire format) from the
3477
- * given reader into the given message object.
3478
- * @param {!proto.notification.NotificationResponse} msg The message object to deserialize into.
3479
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3480
- * @return {!proto.notification.NotificationResponse}
3481
- */
3482
- proto.notification.NotificationResponse.deserializeBinaryFromReader = function(msg, reader) {
3483
- while (reader.nextField()) {
3484
- if (reader.isEndGroup()) {
3485
- break;
3486
- }
3487
- var field = reader.getFieldNumber();
3488
- switch (field) {
3489
- case 1:
3490
- var value = new proto.notification.NotificationItem;
3491
- reader.readMessage(value,proto.notification.NotificationItem.deserializeBinaryFromReader);
3492
- msg.setData(value);
3493
- break;
3494
- default:
3495
- reader.skipField();
3496
- break;
3497
- }
3498
- }
3499
- return msg;
3500
- };
3501
-
3502
-
3503
- /**
3504
- * Serializes the message to binary data (in protobuf wire format).
3505
- * @return {!Uint8Array}
3506
- */
3507
- proto.notification.NotificationResponse.prototype.serializeBinary = function() {
3508
- var writer = new jspb.BinaryWriter();
3509
- proto.notification.NotificationResponse.serializeBinaryToWriter(this, writer);
3510
- return writer.getResultBuffer();
3511
- };
3512
-
3513
-
3514
- /**
3515
- * Serializes the given message to binary data (in protobuf wire
3516
- * format), writing to the given BinaryWriter.
3517
- * @param {!proto.notification.NotificationResponse} message
3518
- * @param {!jspb.BinaryWriter} writer
3519
- * @suppress {unusedLocalVariables} f is only used for nested messages
3520
- */
3521
- proto.notification.NotificationResponse.serializeBinaryToWriter = function(message, writer) {
3522
- var f = undefined;
3523
- f = message.getData();
3524
- if (f != null) {
3525
- writer.writeMessage(
3526
- 1,
3527
- f,
3528
- proto.notification.NotificationItem.serializeBinaryToWriter
3529
- );
3530
- }
3531
- };
3532
-
3533
-
3534
- /**
3535
- * optional NotificationItem data = 1;
3536
- * @return {?proto.notification.NotificationItem}
3537
- */
3538
- proto.notification.NotificationResponse.prototype.getData = function() {
3539
- return /** @type{?proto.notification.NotificationItem} */ (
3540
- jspb.Message.getWrapperField(this, proto.notification.NotificationItem, 1));
3541
- };
3542
-
3543
-
3544
- /**
3545
- * @param {?proto.notification.NotificationItem|undefined} value
3546
- * @return {!proto.notification.NotificationResponse} returns this
3547
- */
3548
- proto.notification.NotificationResponse.prototype.setData = function(value) {
3549
- return jspb.Message.setWrapperField(this, 1, value);
3550
- };
3551
-
3552
-
3553
- /**
3554
- * Clears the message field making it undefined.
3555
- * @return {!proto.notification.NotificationResponse} returns this
3556
- */
3557
- proto.notification.NotificationResponse.prototype.clearData = function() {
3558
- return this.setData(undefined);
3559
- };
3560
-
3561
-
3562
- /**
3563
- * Returns whether this field is set.
3564
- * @return {boolean}
3565
- */
3566
- proto.notification.NotificationResponse.prototype.hasData = function() {
3567
- return jspb.Message.getField(this, 1) != null;
3568
- };
3569
-
3570
-
3571
-
3572
- /**
3573
- * List of repeated fields within this message type.
3574
- * @private {!Array<number>}
3575
- * @const
3576
- */
3577
- proto.notification.NotificationItemsResponse.repeatedFields_ = [1];
3578
-
3579
-
3580
-
3581
- if (jspb.Message.GENERATE_TO_OBJECT) {
3582
- /**
3583
- * Creates an object representation of this proto.
3584
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3585
- * Optional fields that are not set will be set to undefined.
3586
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3587
- * For the list of reserved names please see:
3588
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3589
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3590
- * JSPB instance for transitional soy proto support:
3591
- * http://goto/soy-param-migration
3592
- * @return {!Object}
3593
- */
3594
- proto.notification.NotificationItemsResponse.prototype.toObject = function(opt_includeInstance) {
3595
- return proto.notification.NotificationItemsResponse.toObject(opt_includeInstance, this);
3596
- };
3597
-
3598
-
3599
- /**
3600
- * Static version of the {@see toObject} method.
3601
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3602
- * the JSPB instance for transitional soy proto support:
3603
- * http://goto/soy-param-migration
3604
- * @param {!proto.notification.NotificationItemsResponse} msg The msg instance to transform.
3605
- * @return {!Object}
3606
- * @suppress {unusedLocalVariables} f is only used for nested messages
3607
- */
3608
- proto.notification.NotificationItemsResponse.toObject = function(includeInstance, msg) {
3609
- var f, obj = {
3610
- itemsList: jspb.Message.toObjectList(msg.getItemsList(),
3611
- proto.notification.NotificationItem.toObject, includeInstance),
3612
- totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
3613
- totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
3614
- };
3615
-
3616
- if (includeInstance) {
3617
- obj.$jspbMessageInstance = msg;
3618
- }
3619
- return obj;
3620
- };
3621
- }
3622
-
3623
-
3624
- /**
3625
- * Deserializes binary data (in protobuf wire format).
3626
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3627
- * @return {!proto.notification.NotificationItemsResponse}
3628
- */
3629
- proto.notification.NotificationItemsResponse.deserializeBinary = function(bytes) {
3630
- var reader = new jspb.BinaryReader(bytes);
3631
- var msg = new proto.notification.NotificationItemsResponse;
3632
- return proto.notification.NotificationItemsResponse.deserializeBinaryFromReader(msg, reader);
3633
- };
3634
-
3635
-
3636
- /**
3637
- * Deserializes binary data (in protobuf wire format) from the
3638
- * given reader into the given message object.
3639
- * @param {!proto.notification.NotificationItemsResponse} msg The message object to deserialize into.
3640
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3641
- * @return {!proto.notification.NotificationItemsResponse}
3642
- */
3643
- proto.notification.NotificationItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
3644
- while (reader.nextField()) {
3645
- if (reader.isEndGroup()) {
3646
- break;
3647
- }
3648
- var field = reader.getFieldNumber();
3649
- switch (field) {
3650
- case 1:
3651
- var value = new proto.notification.NotificationItem;
3652
- reader.readMessage(value,proto.notification.NotificationItem.deserializeBinaryFromReader);
3653
- msg.addItems(value);
3654
- break;
3655
- case 2:
3656
- var value = /** @type {number} */ (reader.readInt32());
3657
- msg.setTotalPages(value);
3658
- break;
3659
- case 3:
3660
- var value = /** @type {number} */ (reader.readInt32());
3661
- msg.setTotalItems(value);
3662
- break;
3663
- default:
3664
- reader.skipField();
3665
- break;
3666
- }
3667
- }
3668
- return msg;
3669
- };
3670
-
3671
-
3672
- /**
3673
- * Serializes the message to binary data (in protobuf wire format).
3674
- * @return {!Uint8Array}
3675
- */
3676
- proto.notification.NotificationItemsResponse.prototype.serializeBinary = function() {
3677
- var writer = new jspb.BinaryWriter();
3678
- proto.notification.NotificationItemsResponse.serializeBinaryToWriter(this, writer);
3679
- return writer.getResultBuffer();
3680
- };
3681
-
3682
-
3683
- /**
3684
- * Serializes the given message to binary data (in protobuf wire
3685
- * format), writing to the given BinaryWriter.
3686
- * @param {!proto.notification.NotificationItemsResponse} message
3687
- * @param {!jspb.BinaryWriter} writer
3688
- * @suppress {unusedLocalVariables} f is only used for nested messages
3689
- */
3690
- proto.notification.NotificationItemsResponse.serializeBinaryToWriter = function(message, writer) {
3691
- var f = undefined;
3692
- f = message.getItemsList();
3693
- if (f.length > 0) {
3694
- writer.writeRepeatedMessage(
3695
- 1,
3696
- f,
3697
- proto.notification.NotificationItem.serializeBinaryToWriter
3698
- );
3699
- }
3700
- f = /** @type {number} */ (jspb.Message.getField(message, 2));
3701
- if (f != null) {
3702
- writer.writeInt32(
3703
- 2,
3704
- f
3705
- );
3706
- }
3707
- f = /** @type {number} */ (jspb.Message.getField(message, 3));
3708
- if (f != null) {
3709
- writer.writeInt32(
3710
- 3,
3711
- f
3712
- );
3713
- }
3714
- };
3715
-
3716
-
3717
- /**
3718
- * repeated NotificationItem items = 1;
3719
- * @return {!Array<!proto.notification.NotificationItem>}
3720
- */
3721
- proto.notification.NotificationItemsResponse.prototype.getItemsList = function() {
3722
- return /** @type{!Array<!proto.notification.NotificationItem>} */ (
3723
- jspb.Message.getRepeatedWrapperField(this, proto.notification.NotificationItem, 1));
3724
- };
3725
-
3726
-
3727
- /**
3728
- * @param {!Array<!proto.notification.NotificationItem>} value
3729
- * @return {!proto.notification.NotificationItemsResponse} returns this
3730
- */
3731
- proto.notification.NotificationItemsResponse.prototype.setItemsList = function(value) {
3732
- return jspb.Message.setRepeatedWrapperField(this, 1, value);
3733
- };
3734
-
3735
-
3736
- /**
3737
- * @param {!proto.notification.NotificationItem=} opt_value
3738
- * @param {number=} opt_index
3739
- * @return {!proto.notification.NotificationItem}
3740
- */
3741
- proto.notification.NotificationItemsResponse.prototype.addItems = function(opt_value, opt_index) {
3742
- return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.notification.NotificationItem, opt_index);
3743
- };
3744
-
3745
-
3746
- /**
3747
- * Clears the list making it empty but non-null.
3748
- * @return {!proto.notification.NotificationItemsResponse} returns this
3749
- */
3750
- proto.notification.NotificationItemsResponse.prototype.clearItemsList = function() {
3751
- return this.setItemsList([]);
3752
- };
3753
-
3754
-
3755
- /**
3756
- * optional int32 total_pages = 2;
3757
- * @return {number}
3758
- */
3759
- proto.notification.NotificationItemsResponse.prototype.getTotalPages = function() {
3760
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
3761
- };
3762
-
3763
-
3764
- /**
3765
- * @param {number} value
3766
- * @return {!proto.notification.NotificationItemsResponse} returns this
3767
- */
3768
- proto.notification.NotificationItemsResponse.prototype.setTotalPages = function(value) {
3769
- return jspb.Message.setField(this, 2, value);
3770
- };
3771
-
3772
-
3773
- /**
3774
- * Clears the field making it undefined.
3775
- * @return {!proto.notification.NotificationItemsResponse} returns this
3776
- */
3777
- proto.notification.NotificationItemsResponse.prototype.clearTotalPages = function() {
3778
- return jspb.Message.setField(this, 2, undefined);
3779
- };
3780
-
3781
-
3782
- /**
3783
- * Returns whether this field is set.
3784
- * @return {boolean}
3785
- */
3786
- proto.notification.NotificationItemsResponse.prototype.hasTotalPages = function() {
3787
- return jspb.Message.getField(this, 2) != null;
3788
- };
3789
-
3790
-
3791
- /**
3792
- * optional int32 total_items = 3;
3793
- * @return {number}
3794
- */
3795
- proto.notification.NotificationItemsResponse.prototype.getTotalItems = function() {
3796
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3797
- };
3798
-
3799
-
3800
- /**
3801
- * @param {number} value
3802
- * @return {!proto.notification.NotificationItemsResponse} returns this
3803
- */
3804
- proto.notification.NotificationItemsResponse.prototype.setTotalItems = function(value) {
3805
- return jspb.Message.setField(this, 3, value);
3806
- };
3807
-
3808
-
3809
- /**
3810
- * Clears the field making it undefined.
3811
- * @return {!proto.notification.NotificationItemsResponse} returns this
3812
- */
3813
- proto.notification.NotificationItemsResponse.prototype.clearTotalItems = function() {
3814
- return jspb.Message.setField(this, 3, undefined);
3815
- };
3816
-
3817
-
3818
- /**
3819
- * Returns whether this field is set.
3820
- * @return {boolean}
3821
- */
3822
- proto.notification.NotificationItemsResponse.prototype.hasTotalItems = function() {
3823
- return jspb.Message.getField(this, 3) != null;
3824
- };
3825
-
3826
-
3827
-
3828
-
3829
-
3830
- if (jspb.Message.GENERATE_TO_OBJECT) {
3831
- /**
3832
- * Creates an object representation of this proto.
3833
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3834
- * Optional fields that are not set will be set to undefined.
3835
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3836
- * For the list of reserved names please see:
3837
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3838
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3839
- * JSPB instance for transitional soy proto support:
3840
- * http://goto/soy-param-migration
3841
- * @return {!Object}
3842
- */
3843
- proto.notification.UserNotificationsCountResponse.prototype.toObject = function(opt_includeInstance) {
3844
- return proto.notification.UserNotificationsCountResponse.toObject(opt_includeInstance, this);
3845
- };
3846
-
3847
-
3848
- /**
3849
- * Static version of the {@see toObject} method.
3850
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3851
- * the JSPB instance for transitional soy proto support:
3852
- * http://goto/soy-param-migration
3853
- * @param {!proto.notification.UserNotificationsCountResponse} msg The msg instance to transform.
3854
- * @return {!Object}
3855
- * @suppress {unusedLocalVariables} f is only used for nested messages
3856
- */
3857
- proto.notification.UserNotificationsCountResponse.toObject = function(includeInstance, msg) {
3858
- var f, obj = {
3859
- count: jspb.Message.getFieldWithDefault(msg, 1, 0)
3860
- };
3861
-
3862
- if (includeInstance) {
3863
- obj.$jspbMessageInstance = msg;
3864
- }
3865
- return obj;
3866
- };
3867
- }
3868
-
3869
-
3870
- /**
3871
- * Deserializes binary data (in protobuf wire format).
3872
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3873
- * @return {!proto.notification.UserNotificationsCountResponse}
3874
- */
3875
- proto.notification.UserNotificationsCountResponse.deserializeBinary = function(bytes) {
3876
- var reader = new jspb.BinaryReader(bytes);
3877
- var msg = new proto.notification.UserNotificationsCountResponse;
3878
- return proto.notification.UserNotificationsCountResponse.deserializeBinaryFromReader(msg, reader);
3879
- };
3880
-
3881
-
3882
- /**
3883
- * Deserializes binary data (in protobuf wire format) from the
3884
- * given reader into the given message object.
3885
- * @param {!proto.notification.UserNotificationsCountResponse} msg The message object to deserialize into.
3886
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3887
- * @return {!proto.notification.UserNotificationsCountResponse}
3888
- */
3889
- proto.notification.UserNotificationsCountResponse.deserializeBinaryFromReader = function(msg, reader) {
3890
- while (reader.nextField()) {
3891
- if (reader.isEndGroup()) {
3892
- break;
3893
- }
3894
- var field = reader.getFieldNumber();
3895
- switch (field) {
3896
- case 1:
3897
- var value = /** @type {number} */ (reader.readInt32());
3898
- msg.setCount(value);
3899
- break;
3900
- default:
3901
- reader.skipField();
3902
- break;
3903
- }
3904
- }
3905
- return msg;
3906
- };
3907
-
3908
-
3909
- /**
3910
- * Serializes the message to binary data (in protobuf wire format).
3911
- * @return {!Uint8Array}
3912
- */
3913
- proto.notification.UserNotificationsCountResponse.prototype.serializeBinary = function() {
3914
- var writer = new jspb.BinaryWriter();
3915
- proto.notification.UserNotificationsCountResponse.serializeBinaryToWriter(this, writer);
3916
- return writer.getResultBuffer();
3917
- };
3918
-
3919
-
3920
- /**
3921
- * Serializes the given message to binary data (in protobuf wire
3922
- * format), writing to the given BinaryWriter.
3923
- * @param {!proto.notification.UserNotificationsCountResponse} message
3924
- * @param {!jspb.BinaryWriter} writer
3925
- * @suppress {unusedLocalVariables} f is only used for nested messages
3926
- */
3927
- proto.notification.UserNotificationsCountResponse.serializeBinaryToWriter = function(message, writer) {
3928
- var f = undefined;
3929
- f = message.getCount();
3930
- if (f !== 0) {
3931
- writer.writeInt32(
3932
- 1,
3933
- f
3934
- );
3935
- }
3936
- };
3937
-
3938
-
3939
- /**
3940
- * optional int32 count = 1;
3941
- * @return {number}
3942
- */
3943
- proto.notification.UserNotificationsCountResponse.prototype.getCount = function() {
3944
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3945
- };
3946
-
3947
-
3948
- /**
3949
- * @param {number} value
3950
- * @return {!proto.notification.UserNotificationsCountResponse} returns this
3951
- */
3952
- proto.notification.UserNotificationsCountResponse.prototype.setCount = function(value) {
3953
- return jspb.Message.setProto3IntField(this, 1, value);
3954
- };
3955
-
3956
-
3957
- goog.object.extend(exports, proto.notification);