@aldiokta/protocgen 1.1.63 → 1.1.64

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.
@@ -0,0 +1,3015 @@
1
+ // source: prisca/v1/core/messaging/notification_event.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 = globalThis;
17
+
18
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
19
+ goog.object.extend(proto, prisca_v1_global_meta_meta_pb);
20
+ var prisca_v1_core_messaging_notification_pb = require('../../../../prisca/v1/core/messaging/notification_pb.js');
21
+ goog.object.extend(proto, prisca_v1_core_messaging_notification_pb);
22
+ goog.exportSymbol('proto.CreateNotificationEventReq', null, global);
23
+ goog.exportSymbol('proto.GetEventByCodeReq', null, global);
24
+ goog.exportSymbol('proto.GetListNotificationEventsReq', null, global);
25
+ goog.exportSymbol('proto.GetListNotificationEventsRes', null, global);
26
+ goog.exportSymbol('proto.NotificationEventChannelItem', null, global);
27
+ goog.exportSymbol('proto.NotificationEventChannelReqItem', null, global);
28
+ goog.exportSymbol('proto.NotificationEventDetailItem', null, global);
29
+ goog.exportSymbol('proto.NotificationEventItem', null, global);
30
+ goog.exportSymbol('proto.UpdateNotificationEventReq', null, global);
31
+ goog.exportSymbol('proto.UpsertEventChannelReq', null, global);
32
+ /**
33
+ * Generated by JsPbCodeGenerator.
34
+ * @param {Array=} opt_data Optional initial data array, typically from a
35
+ * server response, or constructed directly in Javascript. The array is used
36
+ * in place and becomes part of the constructed object. It is not cloned.
37
+ * If no data is provided, the constructed object will be empty, but still
38
+ * valid.
39
+ * @extends {jspb.Message}
40
+ * @constructor
41
+ */
42
+ proto.NotificationEventItem = function(opt_data) {
43
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
44
+ };
45
+ goog.inherits(proto.NotificationEventItem, jspb.Message);
46
+ if (goog.DEBUG && !COMPILED) {
47
+ /**
48
+ * @public
49
+ * @override
50
+ */
51
+ proto.NotificationEventItem.displayName = 'proto.NotificationEventItem';
52
+ }
53
+ /**
54
+ * Generated by JsPbCodeGenerator.
55
+ * @param {Array=} opt_data Optional initial data array, typically from a
56
+ * server response, or constructed directly in Javascript. The array is used
57
+ * in place and becomes part of the constructed object. It is not cloned.
58
+ * If no data is provided, the constructed object will be empty, but still
59
+ * valid.
60
+ * @extends {jspb.Message}
61
+ * @constructor
62
+ */
63
+ proto.NotificationEventDetailItem = function(opt_data) {
64
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.NotificationEventDetailItem.repeatedFields_, null);
65
+ };
66
+ goog.inherits(proto.NotificationEventDetailItem, jspb.Message);
67
+ if (goog.DEBUG && !COMPILED) {
68
+ /**
69
+ * @public
70
+ * @override
71
+ */
72
+ proto.NotificationEventDetailItem.displayName = 'proto.NotificationEventDetailItem';
73
+ }
74
+ /**
75
+ * Generated by JsPbCodeGenerator.
76
+ * @param {Array=} opt_data Optional initial data array, typically from a
77
+ * server response, or constructed directly in Javascript. The array is used
78
+ * in place and becomes part of the constructed object. It is not cloned.
79
+ * If no data is provided, the constructed object will be empty, but still
80
+ * valid.
81
+ * @extends {jspb.Message}
82
+ * @constructor
83
+ */
84
+ proto.NotificationEventChannelItem = function(opt_data) {
85
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
86
+ };
87
+ goog.inherits(proto.NotificationEventChannelItem, jspb.Message);
88
+ if (goog.DEBUG && !COMPILED) {
89
+ /**
90
+ * @public
91
+ * @override
92
+ */
93
+ proto.NotificationEventChannelItem.displayName = 'proto.NotificationEventChannelItem';
94
+ }
95
+ /**
96
+ * Generated by JsPbCodeGenerator.
97
+ * @param {Array=} opt_data Optional initial data array, typically from a
98
+ * server response, or constructed directly in Javascript. The array is used
99
+ * in place and becomes part of the constructed object. It is not cloned.
100
+ * If no data is provided, the constructed object will be empty, but still
101
+ * valid.
102
+ * @extends {jspb.Message}
103
+ * @constructor
104
+ */
105
+ proto.CreateNotificationEventReq = function(opt_data) {
106
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.CreateNotificationEventReq.repeatedFields_, null);
107
+ };
108
+ goog.inherits(proto.CreateNotificationEventReq, jspb.Message);
109
+ if (goog.DEBUG && !COMPILED) {
110
+ /**
111
+ * @public
112
+ * @override
113
+ */
114
+ proto.CreateNotificationEventReq.displayName = 'proto.CreateNotificationEventReq';
115
+ }
116
+ /**
117
+ * Generated by JsPbCodeGenerator.
118
+ * @param {Array=} opt_data Optional initial data array, typically from a
119
+ * server response, or constructed directly in Javascript. The array is used
120
+ * in place and becomes part of the constructed object. It is not cloned.
121
+ * If no data is provided, the constructed object will be empty, but still
122
+ * valid.
123
+ * @extends {jspb.Message}
124
+ * @constructor
125
+ */
126
+ proto.UpdateNotificationEventReq = function(opt_data) {
127
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.UpdateNotificationEventReq.repeatedFields_, null);
128
+ };
129
+ goog.inherits(proto.UpdateNotificationEventReq, jspb.Message);
130
+ if (goog.DEBUG && !COMPILED) {
131
+ /**
132
+ * @public
133
+ * @override
134
+ */
135
+ proto.UpdateNotificationEventReq.displayName = 'proto.UpdateNotificationEventReq';
136
+ }
137
+ /**
138
+ * Generated by JsPbCodeGenerator.
139
+ * @param {Array=} opt_data Optional initial data array, typically from a
140
+ * server response, or constructed directly in Javascript. The array is used
141
+ * in place and becomes part of the constructed object. It is not cloned.
142
+ * If no data is provided, the constructed object will be empty, but still
143
+ * valid.
144
+ * @extends {jspb.Message}
145
+ * @constructor
146
+ */
147
+ proto.NotificationEventChannelReqItem = function(opt_data) {
148
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
149
+ };
150
+ goog.inherits(proto.NotificationEventChannelReqItem, jspb.Message);
151
+ if (goog.DEBUG && !COMPILED) {
152
+ /**
153
+ * @public
154
+ * @override
155
+ */
156
+ proto.NotificationEventChannelReqItem.displayName = 'proto.NotificationEventChannelReqItem';
157
+ }
158
+ /**
159
+ * Generated by JsPbCodeGenerator.
160
+ * @param {Array=} opt_data Optional initial data array, typically from a
161
+ * server response, or constructed directly in Javascript. The array is used
162
+ * in place and becomes part of the constructed object. It is not cloned.
163
+ * If no data is provided, the constructed object will be empty, but still
164
+ * valid.
165
+ * @extends {jspb.Message}
166
+ * @constructor
167
+ */
168
+ proto.GetListNotificationEventsReq = function(opt_data) {
169
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
170
+ };
171
+ goog.inherits(proto.GetListNotificationEventsReq, jspb.Message);
172
+ if (goog.DEBUG && !COMPILED) {
173
+ /**
174
+ * @public
175
+ * @override
176
+ */
177
+ proto.GetListNotificationEventsReq.displayName = 'proto.GetListNotificationEventsReq';
178
+ }
179
+ /**
180
+ * Generated by JsPbCodeGenerator.
181
+ * @param {Array=} opt_data Optional initial data array, typically from a
182
+ * server response, or constructed directly in Javascript. The array is used
183
+ * in place and becomes part of the constructed object. It is not cloned.
184
+ * If no data is provided, the constructed object will be empty, but still
185
+ * valid.
186
+ * @extends {jspb.Message}
187
+ * @constructor
188
+ */
189
+ proto.GetListNotificationEventsRes = function(opt_data) {
190
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.GetListNotificationEventsRes.repeatedFields_, null);
191
+ };
192
+ goog.inherits(proto.GetListNotificationEventsRes, jspb.Message);
193
+ if (goog.DEBUG && !COMPILED) {
194
+ /**
195
+ * @public
196
+ * @override
197
+ */
198
+ proto.GetListNotificationEventsRes.displayName = 'proto.GetListNotificationEventsRes';
199
+ }
200
+ /**
201
+ * Generated by JsPbCodeGenerator.
202
+ * @param {Array=} opt_data Optional initial data array, typically from a
203
+ * server response, or constructed directly in Javascript. The array is used
204
+ * in place and becomes part of the constructed object. It is not cloned.
205
+ * If no data is provided, the constructed object will be empty, but still
206
+ * valid.
207
+ * @extends {jspb.Message}
208
+ * @constructor
209
+ */
210
+ proto.GetEventByCodeReq = function(opt_data) {
211
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
212
+ };
213
+ goog.inherits(proto.GetEventByCodeReq, jspb.Message);
214
+ if (goog.DEBUG && !COMPILED) {
215
+ /**
216
+ * @public
217
+ * @override
218
+ */
219
+ proto.GetEventByCodeReq.displayName = 'proto.GetEventByCodeReq';
220
+ }
221
+ /**
222
+ * Generated by JsPbCodeGenerator.
223
+ * @param {Array=} opt_data Optional initial data array, typically from a
224
+ * server response, or constructed directly in Javascript. The array is used
225
+ * in place and becomes part of the constructed object. It is not cloned.
226
+ * If no data is provided, the constructed object will be empty, but still
227
+ * valid.
228
+ * @extends {jspb.Message}
229
+ * @constructor
230
+ */
231
+ proto.UpsertEventChannelReq = function(opt_data) {
232
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
233
+ };
234
+ goog.inherits(proto.UpsertEventChannelReq, jspb.Message);
235
+ if (goog.DEBUG && !COMPILED) {
236
+ /**
237
+ * @public
238
+ * @override
239
+ */
240
+ proto.UpsertEventChannelReq.displayName = 'proto.UpsertEventChannelReq';
241
+ }
242
+
243
+
244
+
245
+ if (jspb.Message.GENERATE_TO_OBJECT) {
246
+ /**
247
+ * Creates an object representation of this proto.
248
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
249
+ * Optional fields that are not set will be set to undefined.
250
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
251
+ * For the list of reserved names please see:
252
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
253
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
254
+ * JSPB instance for transitional soy proto support:
255
+ * http://goto/soy-param-migration
256
+ * @return {!Object}
257
+ */
258
+ proto.NotificationEventItem.prototype.toObject = function(opt_includeInstance) {
259
+ return proto.NotificationEventItem.toObject(opt_includeInstance, this);
260
+ };
261
+
262
+
263
+ /**
264
+ * Static version of the {@see toObject} method.
265
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
266
+ * the JSPB instance for transitional soy proto support:
267
+ * http://goto/soy-param-migration
268
+ * @param {!proto.NotificationEventItem} msg The msg instance to transform.
269
+ * @return {!Object}
270
+ * @suppress {unusedLocalVariables} f is only used for nested messages
271
+ */
272
+ proto.NotificationEventItem.toObject = function(includeInstance, msg) {
273
+ var f, obj = {
274
+ referenceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
275
+ eventCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
276
+ eventName: jspb.Message.getFieldWithDefault(msg, 3, ""),
277
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
278
+ isActive: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
279
+ payloadSchema: jspb.Message.getFieldWithDefault(msg, 6, ""),
280
+ createdAt: jspb.Message.getFieldWithDefault(msg, 7, ""),
281
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 8, "")
282
+ };
283
+
284
+ if (includeInstance) {
285
+ obj.$jspbMessageInstance = msg;
286
+ }
287
+ return obj;
288
+ };
289
+ }
290
+
291
+
292
+ /**
293
+ * Deserializes binary data (in protobuf wire format).
294
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
295
+ * @return {!proto.NotificationEventItem}
296
+ */
297
+ proto.NotificationEventItem.deserializeBinary = function(bytes) {
298
+ var reader = new jspb.BinaryReader(bytes);
299
+ var msg = new proto.NotificationEventItem;
300
+ return proto.NotificationEventItem.deserializeBinaryFromReader(msg, reader);
301
+ };
302
+
303
+
304
+ /**
305
+ * Deserializes binary data (in protobuf wire format) from the
306
+ * given reader into the given message object.
307
+ * @param {!proto.NotificationEventItem} msg The message object to deserialize into.
308
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
309
+ * @return {!proto.NotificationEventItem}
310
+ */
311
+ proto.NotificationEventItem.deserializeBinaryFromReader = function(msg, reader) {
312
+ while (reader.nextField()) {
313
+ if (reader.isEndGroup()) {
314
+ break;
315
+ }
316
+ var field = reader.getFieldNumber();
317
+ switch (field) {
318
+ case 1:
319
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
320
+ msg.setReferenceId(value);
321
+ break;
322
+ case 2:
323
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
324
+ msg.setEventCode(value);
325
+ break;
326
+ case 3:
327
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
328
+ msg.setEventName(value);
329
+ break;
330
+ case 4:
331
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
332
+ msg.setDescription(value);
333
+ break;
334
+ case 5:
335
+ var value = /** @type {boolean} */ (reader.readBool());
336
+ msg.setIsActive(value);
337
+ break;
338
+ case 6:
339
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
340
+ msg.setPayloadSchema(value);
341
+ break;
342
+ case 7:
343
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
344
+ msg.setCreatedAt(value);
345
+ break;
346
+ case 8:
347
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
348
+ msg.setUpdatedAt(value);
349
+ break;
350
+ default:
351
+ reader.skipField();
352
+ break;
353
+ }
354
+ }
355
+ return msg;
356
+ };
357
+
358
+
359
+ /**
360
+ * Serializes the message to binary data (in protobuf wire format).
361
+ * @return {!Uint8Array}
362
+ */
363
+ proto.NotificationEventItem.prototype.serializeBinary = function() {
364
+ var writer = new jspb.BinaryWriter();
365
+ proto.NotificationEventItem.serializeBinaryToWriter(this, writer);
366
+ return writer.getResultBuffer();
367
+ };
368
+
369
+
370
+ /**
371
+ * Serializes the given message to binary data (in protobuf wire
372
+ * format), writing to the given BinaryWriter.
373
+ * @param {!proto.NotificationEventItem} message
374
+ * @param {!jspb.BinaryWriter} writer
375
+ * @suppress {unusedLocalVariables} f is only used for nested messages
376
+ */
377
+ proto.NotificationEventItem.serializeBinaryToWriter = function(message, writer) {
378
+ var f = undefined;
379
+ f = message.getReferenceId();
380
+ if (f.length > 0) {
381
+ writer.writeString(
382
+ 1,
383
+ f
384
+ );
385
+ }
386
+ f = message.getEventCode();
387
+ if (f.length > 0) {
388
+ writer.writeString(
389
+ 2,
390
+ f
391
+ );
392
+ }
393
+ f = message.getEventName();
394
+ if (f.length > 0) {
395
+ writer.writeString(
396
+ 3,
397
+ f
398
+ );
399
+ }
400
+ f = message.getDescription();
401
+ if (f.length > 0) {
402
+ writer.writeString(
403
+ 4,
404
+ f
405
+ );
406
+ }
407
+ f = message.getIsActive();
408
+ if (f) {
409
+ writer.writeBool(
410
+ 5,
411
+ f
412
+ );
413
+ }
414
+ f = message.getPayloadSchema();
415
+ if (f.length > 0) {
416
+ writer.writeString(
417
+ 6,
418
+ f
419
+ );
420
+ }
421
+ f = message.getCreatedAt();
422
+ if (f.length > 0) {
423
+ writer.writeString(
424
+ 7,
425
+ f
426
+ );
427
+ }
428
+ f = message.getUpdatedAt();
429
+ if (f.length > 0) {
430
+ writer.writeString(
431
+ 8,
432
+ f
433
+ );
434
+ }
435
+ };
436
+
437
+
438
+ /**
439
+ * optional string reference_id = 1;
440
+ * @return {string}
441
+ */
442
+ proto.NotificationEventItem.prototype.getReferenceId = function() {
443
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
444
+ };
445
+
446
+
447
+ /**
448
+ * @param {string} value
449
+ * @return {!proto.NotificationEventItem} returns this
450
+ */
451
+ proto.NotificationEventItem.prototype.setReferenceId = function(value) {
452
+ return jspb.Message.setProto3StringField(this, 1, value);
453
+ };
454
+
455
+
456
+ /**
457
+ * optional string event_code = 2;
458
+ * @return {string}
459
+ */
460
+ proto.NotificationEventItem.prototype.getEventCode = function() {
461
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
462
+ };
463
+
464
+
465
+ /**
466
+ * @param {string} value
467
+ * @return {!proto.NotificationEventItem} returns this
468
+ */
469
+ proto.NotificationEventItem.prototype.setEventCode = function(value) {
470
+ return jspb.Message.setProto3StringField(this, 2, value);
471
+ };
472
+
473
+
474
+ /**
475
+ * optional string event_name = 3;
476
+ * @return {string}
477
+ */
478
+ proto.NotificationEventItem.prototype.getEventName = function() {
479
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
480
+ };
481
+
482
+
483
+ /**
484
+ * @param {string} value
485
+ * @return {!proto.NotificationEventItem} returns this
486
+ */
487
+ proto.NotificationEventItem.prototype.setEventName = function(value) {
488
+ return jspb.Message.setProto3StringField(this, 3, value);
489
+ };
490
+
491
+
492
+ /**
493
+ * optional string description = 4;
494
+ * @return {string}
495
+ */
496
+ proto.NotificationEventItem.prototype.getDescription = function() {
497
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
498
+ };
499
+
500
+
501
+ /**
502
+ * @param {string} value
503
+ * @return {!proto.NotificationEventItem} returns this
504
+ */
505
+ proto.NotificationEventItem.prototype.setDescription = function(value) {
506
+ return jspb.Message.setProto3StringField(this, 4, value);
507
+ };
508
+
509
+
510
+ /**
511
+ * optional bool is_active = 5;
512
+ * @return {boolean}
513
+ */
514
+ proto.NotificationEventItem.prototype.getIsActive = function() {
515
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
516
+ };
517
+
518
+
519
+ /**
520
+ * @param {boolean} value
521
+ * @return {!proto.NotificationEventItem} returns this
522
+ */
523
+ proto.NotificationEventItem.prototype.setIsActive = function(value) {
524
+ return jspb.Message.setProto3BooleanField(this, 5, value);
525
+ };
526
+
527
+
528
+ /**
529
+ * optional string payload_schema = 6;
530
+ * @return {string}
531
+ */
532
+ proto.NotificationEventItem.prototype.getPayloadSchema = function() {
533
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
534
+ };
535
+
536
+
537
+ /**
538
+ * @param {string} value
539
+ * @return {!proto.NotificationEventItem} returns this
540
+ */
541
+ proto.NotificationEventItem.prototype.setPayloadSchema = function(value) {
542
+ return jspb.Message.setProto3StringField(this, 6, value);
543
+ };
544
+
545
+
546
+ /**
547
+ * optional string created_at = 7;
548
+ * @return {string}
549
+ */
550
+ proto.NotificationEventItem.prototype.getCreatedAt = function() {
551
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
552
+ };
553
+
554
+
555
+ /**
556
+ * @param {string} value
557
+ * @return {!proto.NotificationEventItem} returns this
558
+ */
559
+ proto.NotificationEventItem.prototype.setCreatedAt = function(value) {
560
+ return jspb.Message.setProto3StringField(this, 7, value);
561
+ };
562
+
563
+
564
+ /**
565
+ * optional string updated_at = 8;
566
+ * @return {string}
567
+ */
568
+ proto.NotificationEventItem.prototype.getUpdatedAt = function() {
569
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
570
+ };
571
+
572
+
573
+ /**
574
+ * @param {string} value
575
+ * @return {!proto.NotificationEventItem} returns this
576
+ */
577
+ proto.NotificationEventItem.prototype.setUpdatedAt = function(value) {
578
+ return jspb.Message.setProto3StringField(this, 8, value);
579
+ };
580
+
581
+
582
+
583
+ /**
584
+ * List of repeated fields within this message type.
585
+ * @private {!Array<number>}
586
+ * @const
587
+ */
588
+ proto.NotificationEventDetailItem.repeatedFields_ = [9];
589
+
590
+
591
+
592
+ if (jspb.Message.GENERATE_TO_OBJECT) {
593
+ /**
594
+ * Creates an object representation of this proto.
595
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
596
+ * Optional fields that are not set will be set to undefined.
597
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
598
+ * For the list of reserved names please see:
599
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
600
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
601
+ * JSPB instance for transitional soy proto support:
602
+ * http://goto/soy-param-migration
603
+ * @return {!Object}
604
+ */
605
+ proto.NotificationEventDetailItem.prototype.toObject = function(opt_includeInstance) {
606
+ return proto.NotificationEventDetailItem.toObject(opt_includeInstance, this);
607
+ };
608
+
609
+
610
+ /**
611
+ * Static version of the {@see toObject} method.
612
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
613
+ * the JSPB instance for transitional soy proto support:
614
+ * http://goto/soy-param-migration
615
+ * @param {!proto.NotificationEventDetailItem} msg The msg instance to transform.
616
+ * @return {!Object}
617
+ * @suppress {unusedLocalVariables} f is only used for nested messages
618
+ */
619
+ proto.NotificationEventDetailItem.toObject = function(includeInstance, msg) {
620
+ var f, obj = {
621
+ referenceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
622
+ eventCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
623
+ eventName: jspb.Message.getFieldWithDefault(msg, 3, ""),
624
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
625
+ isActive: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
626
+ payloadSchema: jspb.Message.getFieldWithDefault(msg, 6, ""),
627
+ createdAt: jspb.Message.getFieldWithDefault(msg, 7, ""),
628
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 8, ""),
629
+ channelsList: jspb.Message.toObjectList(msg.getChannelsList(),
630
+ proto.NotificationEventChannelItem.toObject, includeInstance)
631
+ };
632
+
633
+ if (includeInstance) {
634
+ obj.$jspbMessageInstance = msg;
635
+ }
636
+ return obj;
637
+ };
638
+ }
639
+
640
+
641
+ /**
642
+ * Deserializes binary data (in protobuf wire format).
643
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
644
+ * @return {!proto.NotificationEventDetailItem}
645
+ */
646
+ proto.NotificationEventDetailItem.deserializeBinary = function(bytes) {
647
+ var reader = new jspb.BinaryReader(bytes);
648
+ var msg = new proto.NotificationEventDetailItem;
649
+ return proto.NotificationEventDetailItem.deserializeBinaryFromReader(msg, reader);
650
+ };
651
+
652
+
653
+ /**
654
+ * Deserializes binary data (in protobuf wire format) from the
655
+ * given reader into the given message object.
656
+ * @param {!proto.NotificationEventDetailItem} msg The message object to deserialize into.
657
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
658
+ * @return {!proto.NotificationEventDetailItem}
659
+ */
660
+ proto.NotificationEventDetailItem.deserializeBinaryFromReader = function(msg, reader) {
661
+ while (reader.nextField()) {
662
+ if (reader.isEndGroup()) {
663
+ break;
664
+ }
665
+ var field = reader.getFieldNumber();
666
+ switch (field) {
667
+ case 1:
668
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
669
+ msg.setReferenceId(value);
670
+ break;
671
+ case 2:
672
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
673
+ msg.setEventCode(value);
674
+ break;
675
+ case 3:
676
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
677
+ msg.setEventName(value);
678
+ break;
679
+ case 4:
680
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
681
+ msg.setDescription(value);
682
+ break;
683
+ case 5:
684
+ var value = /** @type {boolean} */ (reader.readBool());
685
+ msg.setIsActive(value);
686
+ break;
687
+ case 6:
688
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
689
+ msg.setPayloadSchema(value);
690
+ break;
691
+ case 7:
692
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
693
+ msg.setCreatedAt(value);
694
+ break;
695
+ case 8:
696
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
697
+ msg.setUpdatedAt(value);
698
+ break;
699
+ case 9:
700
+ var value = new proto.NotificationEventChannelItem;
701
+ reader.readMessage(value,proto.NotificationEventChannelItem.deserializeBinaryFromReader);
702
+ msg.addChannels(value);
703
+ break;
704
+ default:
705
+ reader.skipField();
706
+ break;
707
+ }
708
+ }
709
+ return msg;
710
+ };
711
+
712
+
713
+ /**
714
+ * Serializes the message to binary data (in protobuf wire format).
715
+ * @return {!Uint8Array}
716
+ */
717
+ proto.NotificationEventDetailItem.prototype.serializeBinary = function() {
718
+ var writer = new jspb.BinaryWriter();
719
+ proto.NotificationEventDetailItem.serializeBinaryToWriter(this, writer);
720
+ return writer.getResultBuffer();
721
+ };
722
+
723
+
724
+ /**
725
+ * Serializes the given message to binary data (in protobuf wire
726
+ * format), writing to the given BinaryWriter.
727
+ * @param {!proto.NotificationEventDetailItem} message
728
+ * @param {!jspb.BinaryWriter} writer
729
+ * @suppress {unusedLocalVariables} f is only used for nested messages
730
+ */
731
+ proto.NotificationEventDetailItem.serializeBinaryToWriter = function(message, writer) {
732
+ var f = undefined;
733
+ f = message.getReferenceId();
734
+ if (f.length > 0) {
735
+ writer.writeString(
736
+ 1,
737
+ f
738
+ );
739
+ }
740
+ f = message.getEventCode();
741
+ if (f.length > 0) {
742
+ writer.writeString(
743
+ 2,
744
+ f
745
+ );
746
+ }
747
+ f = message.getEventName();
748
+ if (f.length > 0) {
749
+ writer.writeString(
750
+ 3,
751
+ f
752
+ );
753
+ }
754
+ f = message.getDescription();
755
+ if (f.length > 0) {
756
+ writer.writeString(
757
+ 4,
758
+ f
759
+ );
760
+ }
761
+ f = message.getIsActive();
762
+ if (f) {
763
+ writer.writeBool(
764
+ 5,
765
+ f
766
+ );
767
+ }
768
+ f = message.getPayloadSchema();
769
+ if (f.length > 0) {
770
+ writer.writeString(
771
+ 6,
772
+ f
773
+ );
774
+ }
775
+ f = message.getCreatedAt();
776
+ if (f.length > 0) {
777
+ writer.writeString(
778
+ 7,
779
+ f
780
+ );
781
+ }
782
+ f = message.getUpdatedAt();
783
+ if (f.length > 0) {
784
+ writer.writeString(
785
+ 8,
786
+ f
787
+ );
788
+ }
789
+ f = message.getChannelsList();
790
+ if (f.length > 0) {
791
+ writer.writeRepeatedMessage(
792
+ 9,
793
+ f,
794
+ proto.NotificationEventChannelItem.serializeBinaryToWriter
795
+ );
796
+ }
797
+ };
798
+
799
+
800
+ /**
801
+ * optional string reference_id = 1;
802
+ * @return {string}
803
+ */
804
+ proto.NotificationEventDetailItem.prototype.getReferenceId = function() {
805
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
806
+ };
807
+
808
+
809
+ /**
810
+ * @param {string} value
811
+ * @return {!proto.NotificationEventDetailItem} returns this
812
+ */
813
+ proto.NotificationEventDetailItem.prototype.setReferenceId = function(value) {
814
+ return jspb.Message.setProto3StringField(this, 1, value);
815
+ };
816
+
817
+
818
+ /**
819
+ * optional string event_code = 2;
820
+ * @return {string}
821
+ */
822
+ proto.NotificationEventDetailItem.prototype.getEventCode = function() {
823
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
824
+ };
825
+
826
+
827
+ /**
828
+ * @param {string} value
829
+ * @return {!proto.NotificationEventDetailItem} returns this
830
+ */
831
+ proto.NotificationEventDetailItem.prototype.setEventCode = function(value) {
832
+ return jspb.Message.setProto3StringField(this, 2, value);
833
+ };
834
+
835
+
836
+ /**
837
+ * optional string event_name = 3;
838
+ * @return {string}
839
+ */
840
+ proto.NotificationEventDetailItem.prototype.getEventName = function() {
841
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
842
+ };
843
+
844
+
845
+ /**
846
+ * @param {string} value
847
+ * @return {!proto.NotificationEventDetailItem} returns this
848
+ */
849
+ proto.NotificationEventDetailItem.prototype.setEventName = function(value) {
850
+ return jspb.Message.setProto3StringField(this, 3, value);
851
+ };
852
+
853
+
854
+ /**
855
+ * optional string description = 4;
856
+ * @return {string}
857
+ */
858
+ proto.NotificationEventDetailItem.prototype.getDescription = function() {
859
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
860
+ };
861
+
862
+
863
+ /**
864
+ * @param {string} value
865
+ * @return {!proto.NotificationEventDetailItem} returns this
866
+ */
867
+ proto.NotificationEventDetailItem.prototype.setDescription = function(value) {
868
+ return jspb.Message.setProto3StringField(this, 4, value);
869
+ };
870
+
871
+
872
+ /**
873
+ * optional bool is_active = 5;
874
+ * @return {boolean}
875
+ */
876
+ proto.NotificationEventDetailItem.prototype.getIsActive = function() {
877
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
878
+ };
879
+
880
+
881
+ /**
882
+ * @param {boolean} value
883
+ * @return {!proto.NotificationEventDetailItem} returns this
884
+ */
885
+ proto.NotificationEventDetailItem.prototype.setIsActive = function(value) {
886
+ return jspb.Message.setProto3BooleanField(this, 5, value);
887
+ };
888
+
889
+
890
+ /**
891
+ * optional string payload_schema = 6;
892
+ * @return {string}
893
+ */
894
+ proto.NotificationEventDetailItem.prototype.getPayloadSchema = function() {
895
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
896
+ };
897
+
898
+
899
+ /**
900
+ * @param {string} value
901
+ * @return {!proto.NotificationEventDetailItem} returns this
902
+ */
903
+ proto.NotificationEventDetailItem.prototype.setPayloadSchema = function(value) {
904
+ return jspb.Message.setProto3StringField(this, 6, value);
905
+ };
906
+
907
+
908
+ /**
909
+ * optional string created_at = 7;
910
+ * @return {string}
911
+ */
912
+ proto.NotificationEventDetailItem.prototype.getCreatedAt = function() {
913
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
914
+ };
915
+
916
+
917
+ /**
918
+ * @param {string} value
919
+ * @return {!proto.NotificationEventDetailItem} returns this
920
+ */
921
+ proto.NotificationEventDetailItem.prototype.setCreatedAt = function(value) {
922
+ return jspb.Message.setProto3StringField(this, 7, value);
923
+ };
924
+
925
+
926
+ /**
927
+ * optional string updated_at = 8;
928
+ * @return {string}
929
+ */
930
+ proto.NotificationEventDetailItem.prototype.getUpdatedAt = function() {
931
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
932
+ };
933
+
934
+
935
+ /**
936
+ * @param {string} value
937
+ * @return {!proto.NotificationEventDetailItem} returns this
938
+ */
939
+ proto.NotificationEventDetailItem.prototype.setUpdatedAt = function(value) {
940
+ return jspb.Message.setProto3StringField(this, 8, value);
941
+ };
942
+
943
+
944
+ /**
945
+ * repeated NotificationEventChannelItem channels = 9;
946
+ * @return {!Array<!proto.NotificationEventChannelItem>}
947
+ */
948
+ proto.NotificationEventDetailItem.prototype.getChannelsList = function() {
949
+ return /** @type{!Array<!proto.NotificationEventChannelItem>} */ (
950
+ jspb.Message.getRepeatedWrapperField(this, proto.NotificationEventChannelItem, 9));
951
+ };
952
+
953
+
954
+ /**
955
+ * @param {!Array<!proto.NotificationEventChannelItem>} value
956
+ * @return {!proto.NotificationEventDetailItem} returns this
957
+ */
958
+ proto.NotificationEventDetailItem.prototype.setChannelsList = function(value) {
959
+ return jspb.Message.setRepeatedWrapperField(this, 9, value);
960
+ };
961
+
962
+
963
+ /**
964
+ * @param {!proto.NotificationEventChannelItem=} opt_value
965
+ * @param {number=} opt_index
966
+ * @return {!proto.NotificationEventChannelItem}
967
+ */
968
+ proto.NotificationEventDetailItem.prototype.addChannels = function(opt_value, opt_index) {
969
+ return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.NotificationEventChannelItem, opt_index);
970
+ };
971
+
972
+
973
+ /**
974
+ * Clears the list making it empty but non-null.
975
+ * @return {!proto.NotificationEventDetailItem} returns this
976
+ */
977
+ proto.NotificationEventDetailItem.prototype.clearChannelsList = function() {
978
+ return this.setChannelsList([]);
979
+ };
980
+
981
+
982
+
983
+
984
+
985
+ if (jspb.Message.GENERATE_TO_OBJECT) {
986
+ /**
987
+ * Creates an object representation of this proto.
988
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
989
+ * Optional fields that are not set will be set to undefined.
990
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
991
+ * For the list of reserved names please see:
992
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
993
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
994
+ * JSPB instance for transitional soy proto support:
995
+ * http://goto/soy-param-migration
996
+ * @return {!Object}
997
+ */
998
+ proto.NotificationEventChannelItem.prototype.toObject = function(opt_includeInstance) {
999
+ return proto.NotificationEventChannelItem.toObject(opt_includeInstance, this);
1000
+ };
1001
+
1002
+
1003
+ /**
1004
+ * Static version of the {@see toObject} method.
1005
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1006
+ * the JSPB instance for transitional soy proto support:
1007
+ * http://goto/soy-param-migration
1008
+ * @param {!proto.NotificationEventChannelItem} msg The msg instance to transform.
1009
+ * @return {!Object}
1010
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1011
+ */
1012
+ proto.NotificationEventChannelItem.toObject = function(includeInstance, msg) {
1013
+ var f, obj = {
1014
+ referenceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1015
+ notificationEventId: jspb.Message.getFieldWithDefault(msg, 2, 0),
1016
+ channel: jspb.Message.getFieldWithDefault(msg, 3, ""),
1017
+ isEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
1018
+ titleTemplate: jspb.Message.getFieldWithDefault(msg, 5, ""),
1019
+ bodyTemplate: jspb.Message.getFieldWithDefault(msg, 6, ""),
1020
+ payloadTemplate: jspb.Message.getFieldWithDefault(msg, 7, "")
1021
+ };
1022
+
1023
+ if (includeInstance) {
1024
+ obj.$jspbMessageInstance = msg;
1025
+ }
1026
+ return obj;
1027
+ };
1028
+ }
1029
+
1030
+
1031
+ /**
1032
+ * Deserializes binary data (in protobuf wire format).
1033
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1034
+ * @return {!proto.NotificationEventChannelItem}
1035
+ */
1036
+ proto.NotificationEventChannelItem.deserializeBinary = function(bytes) {
1037
+ var reader = new jspb.BinaryReader(bytes);
1038
+ var msg = new proto.NotificationEventChannelItem;
1039
+ return proto.NotificationEventChannelItem.deserializeBinaryFromReader(msg, reader);
1040
+ };
1041
+
1042
+
1043
+ /**
1044
+ * Deserializes binary data (in protobuf wire format) from the
1045
+ * given reader into the given message object.
1046
+ * @param {!proto.NotificationEventChannelItem} msg The message object to deserialize into.
1047
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1048
+ * @return {!proto.NotificationEventChannelItem}
1049
+ */
1050
+ proto.NotificationEventChannelItem.deserializeBinaryFromReader = function(msg, reader) {
1051
+ while (reader.nextField()) {
1052
+ if (reader.isEndGroup()) {
1053
+ break;
1054
+ }
1055
+ var field = reader.getFieldNumber();
1056
+ switch (field) {
1057
+ case 1:
1058
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1059
+ msg.setReferenceId(value);
1060
+ break;
1061
+ case 2:
1062
+ var value = /** @type {number} */ (reader.readInt64());
1063
+ msg.setNotificationEventId(value);
1064
+ break;
1065
+ case 3:
1066
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1067
+ msg.setChannel(value);
1068
+ break;
1069
+ case 4:
1070
+ var value = /** @type {boolean} */ (reader.readBool());
1071
+ msg.setIsEnabled(value);
1072
+ break;
1073
+ case 5:
1074
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1075
+ msg.setTitleTemplate(value);
1076
+ break;
1077
+ case 6:
1078
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1079
+ msg.setBodyTemplate(value);
1080
+ break;
1081
+ case 7:
1082
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1083
+ msg.setPayloadTemplate(value);
1084
+ break;
1085
+ default:
1086
+ reader.skipField();
1087
+ break;
1088
+ }
1089
+ }
1090
+ return msg;
1091
+ };
1092
+
1093
+
1094
+ /**
1095
+ * Serializes the message to binary data (in protobuf wire format).
1096
+ * @return {!Uint8Array}
1097
+ */
1098
+ proto.NotificationEventChannelItem.prototype.serializeBinary = function() {
1099
+ var writer = new jspb.BinaryWriter();
1100
+ proto.NotificationEventChannelItem.serializeBinaryToWriter(this, writer);
1101
+ return writer.getResultBuffer();
1102
+ };
1103
+
1104
+
1105
+ /**
1106
+ * Serializes the given message to binary data (in protobuf wire
1107
+ * format), writing to the given BinaryWriter.
1108
+ * @param {!proto.NotificationEventChannelItem} message
1109
+ * @param {!jspb.BinaryWriter} writer
1110
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1111
+ */
1112
+ proto.NotificationEventChannelItem.serializeBinaryToWriter = function(message, writer) {
1113
+ var f = undefined;
1114
+ f = message.getReferenceId();
1115
+ if (f.length > 0) {
1116
+ writer.writeString(
1117
+ 1,
1118
+ f
1119
+ );
1120
+ }
1121
+ f = message.getNotificationEventId();
1122
+ if (f !== 0) {
1123
+ writer.writeInt64(
1124
+ 2,
1125
+ f
1126
+ );
1127
+ }
1128
+ f = message.getChannel();
1129
+ if (f.length > 0) {
1130
+ writer.writeString(
1131
+ 3,
1132
+ f
1133
+ );
1134
+ }
1135
+ f = message.getIsEnabled();
1136
+ if (f) {
1137
+ writer.writeBool(
1138
+ 4,
1139
+ f
1140
+ );
1141
+ }
1142
+ f = message.getTitleTemplate();
1143
+ if (f.length > 0) {
1144
+ writer.writeString(
1145
+ 5,
1146
+ f
1147
+ );
1148
+ }
1149
+ f = message.getBodyTemplate();
1150
+ if (f.length > 0) {
1151
+ writer.writeString(
1152
+ 6,
1153
+ f
1154
+ );
1155
+ }
1156
+ f = message.getPayloadTemplate();
1157
+ if (f.length > 0) {
1158
+ writer.writeString(
1159
+ 7,
1160
+ f
1161
+ );
1162
+ }
1163
+ };
1164
+
1165
+
1166
+ /**
1167
+ * optional string reference_id = 1;
1168
+ * @return {string}
1169
+ */
1170
+ proto.NotificationEventChannelItem.prototype.getReferenceId = function() {
1171
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1172
+ };
1173
+
1174
+
1175
+ /**
1176
+ * @param {string} value
1177
+ * @return {!proto.NotificationEventChannelItem} returns this
1178
+ */
1179
+ proto.NotificationEventChannelItem.prototype.setReferenceId = function(value) {
1180
+ return jspb.Message.setProto3StringField(this, 1, value);
1181
+ };
1182
+
1183
+
1184
+ /**
1185
+ * optional int64 notification_event_id = 2;
1186
+ * @return {number}
1187
+ */
1188
+ proto.NotificationEventChannelItem.prototype.getNotificationEventId = function() {
1189
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1190
+ };
1191
+
1192
+
1193
+ /**
1194
+ * @param {number} value
1195
+ * @return {!proto.NotificationEventChannelItem} returns this
1196
+ */
1197
+ proto.NotificationEventChannelItem.prototype.setNotificationEventId = function(value) {
1198
+ return jspb.Message.setProto3IntField(this, 2, value);
1199
+ };
1200
+
1201
+
1202
+ /**
1203
+ * optional string channel = 3;
1204
+ * @return {string}
1205
+ */
1206
+ proto.NotificationEventChannelItem.prototype.getChannel = function() {
1207
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1208
+ };
1209
+
1210
+
1211
+ /**
1212
+ * @param {string} value
1213
+ * @return {!proto.NotificationEventChannelItem} returns this
1214
+ */
1215
+ proto.NotificationEventChannelItem.prototype.setChannel = function(value) {
1216
+ return jspb.Message.setProto3StringField(this, 3, value);
1217
+ };
1218
+
1219
+
1220
+ /**
1221
+ * optional bool is_enabled = 4;
1222
+ * @return {boolean}
1223
+ */
1224
+ proto.NotificationEventChannelItem.prototype.getIsEnabled = function() {
1225
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
1226
+ };
1227
+
1228
+
1229
+ /**
1230
+ * @param {boolean} value
1231
+ * @return {!proto.NotificationEventChannelItem} returns this
1232
+ */
1233
+ proto.NotificationEventChannelItem.prototype.setIsEnabled = function(value) {
1234
+ return jspb.Message.setProto3BooleanField(this, 4, value);
1235
+ };
1236
+
1237
+
1238
+ /**
1239
+ * optional string title_template = 5;
1240
+ * @return {string}
1241
+ */
1242
+ proto.NotificationEventChannelItem.prototype.getTitleTemplate = function() {
1243
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1244
+ };
1245
+
1246
+
1247
+ /**
1248
+ * @param {string} value
1249
+ * @return {!proto.NotificationEventChannelItem} returns this
1250
+ */
1251
+ proto.NotificationEventChannelItem.prototype.setTitleTemplate = function(value) {
1252
+ return jspb.Message.setProto3StringField(this, 5, value);
1253
+ };
1254
+
1255
+
1256
+ /**
1257
+ * optional string body_template = 6;
1258
+ * @return {string}
1259
+ */
1260
+ proto.NotificationEventChannelItem.prototype.getBodyTemplate = function() {
1261
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1262
+ };
1263
+
1264
+
1265
+ /**
1266
+ * @param {string} value
1267
+ * @return {!proto.NotificationEventChannelItem} returns this
1268
+ */
1269
+ proto.NotificationEventChannelItem.prototype.setBodyTemplate = function(value) {
1270
+ return jspb.Message.setProto3StringField(this, 6, value);
1271
+ };
1272
+
1273
+
1274
+ /**
1275
+ * optional string payload_template = 7;
1276
+ * @return {string}
1277
+ */
1278
+ proto.NotificationEventChannelItem.prototype.getPayloadTemplate = function() {
1279
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1280
+ };
1281
+
1282
+
1283
+ /**
1284
+ * @param {string} value
1285
+ * @return {!proto.NotificationEventChannelItem} returns this
1286
+ */
1287
+ proto.NotificationEventChannelItem.prototype.setPayloadTemplate = function(value) {
1288
+ return jspb.Message.setProto3StringField(this, 7, value);
1289
+ };
1290
+
1291
+
1292
+
1293
+ /**
1294
+ * List of repeated fields within this message type.
1295
+ * @private {!Array<number>}
1296
+ * @const
1297
+ */
1298
+ proto.CreateNotificationEventReq.repeatedFields_ = [6];
1299
+
1300
+
1301
+
1302
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1303
+ /**
1304
+ * Creates an object representation of this proto.
1305
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1306
+ * Optional fields that are not set will be set to undefined.
1307
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1308
+ * For the list of reserved names please see:
1309
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1310
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1311
+ * JSPB instance for transitional soy proto support:
1312
+ * http://goto/soy-param-migration
1313
+ * @return {!Object}
1314
+ */
1315
+ proto.CreateNotificationEventReq.prototype.toObject = function(opt_includeInstance) {
1316
+ return proto.CreateNotificationEventReq.toObject(opt_includeInstance, this);
1317
+ };
1318
+
1319
+
1320
+ /**
1321
+ * Static version of the {@see toObject} method.
1322
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1323
+ * the JSPB instance for transitional soy proto support:
1324
+ * http://goto/soy-param-migration
1325
+ * @param {!proto.CreateNotificationEventReq} msg The msg instance to transform.
1326
+ * @return {!Object}
1327
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1328
+ */
1329
+ proto.CreateNotificationEventReq.toObject = function(includeInstance, msg) {
1330
+ var f, obj = {
1331
+ eventCode: jspb.Message.getFieldWithDefault(msg, 1, ""),
1332
+ eventName: jspb.Message.getFieldWithDefault(msg, 2, ""),
1333
+ description: jspb.Message.getFieldWithDefault(msg, 3, ""),
1334
+ isActive: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
1335
+ payloadSchema: jspb.Message.getFieldWithDefault(msg, 5, ""),
1336
+ channelsList: jspb.Message.toObjectList(msg.getChannelsList(),
1337
+ proto.NotificationEventChannelReqItem.toObject, includeInstance)
1338
+ };
1339
+
1340
+ if (includeInstance) {
1341
+ obj.$jspbMessageInstance = msg;
1342
+ }
1343
+ return obj;
1344
+ };
1345
+ }
1346
+
1347
+
1348
+ /**
1349
+ * Deserializes binary data (in protobuf wire format).
1350
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1351
+ * @return {!proto.CreateNotificationEventReq}
1352
+ */
1353
+ proto.CreateNotificationEventReq.deserializeBinary = function(bytes) {
1354
+ var reader = new jspb.BinaryReader(bytes);
1355
+ var msg = new proto.CreateNotificationEventReq;
1356
+ return proto.CreateNotificationEventReq.deserializeBinaryFromReader(msg, reader);
1357
+ };
1358
+
1359
+
1360
+ /**
1361
+ * Deserializes binary data (in protobuf wire format) from the
1362
+ * given reader into the given message object.
1363
+ * @param {!proto.CreateNotificationEventReq} msg The message object to deserialize into.
1364
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1365
+ * @return {!proto.CreateNotificationEventReq}
1366
+ */
1367
+ proto.CreateNotificationEventReq.deserializeBinaryFromReader = function(msg, reader) {
1368
+ while (reader.nextField()) {
1369
+ if (reader.isEndGroup()) {
1370
+ break;
1371
+ }
1372
+ var field = reader.getFieldNumber();
1373
+ switch (field) {
1374
+ case 1:
1375
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1376
+ msg.setEventCode(value);
1377
+ break;
1378
+ case 2:
1379
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1380
+ msg.setEventName(value);
1381
+ break;
1382
+ case 3:
1383
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1384
+ msg.setDescription(value);
1385
+ break;
1386
+ case 4:
1387
+ var value = /** @type {boolean} */ (reader.readBool());
1388
+ msg.setIsActive(value);
1389
+ break;
1390
+ case 5:
1391
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1392
+ msg.setPayloadSchema(value);
1393
+ break;
1394
+ case 6:
1395
+ var value = new proto.NotificationEventChannelReqItem;
1396
+ reader.readMessage(value,proto.NotificationEventChannelReqItem.deserializeBinaryFromReader);
1397
+ msg.addChannels(value);
1398
+ break;
1399
+ default:
1400
+ reader.skipField();
1401
+ break;
1402
+ }
1403
+ }
1404
+ return msg;
1405
+ };
1406
+
1407
+
1408
+ /**
1409
+ * Serializes the message to binary data (in protobuf wire format).
1410
+ * @return {!Uint8Array}
1411
+ */
1412
+ proto.CreateNotificationEventReq.prototype.serializeBinary = function() {
1413
+ var writer = new jspb.BinaryWriter();
1414
+ proto.CreateNotificationEventReq.serializeBinaryToWriter(this, writer);
1415
+ return writer.getResultBuffer();
1416
+ };
1417
+
1418
+
1419
+ /**
1420
+ * Serializes the given message to binary data (in protobuf wire
1421
+ * format), writing to the given BinaryWriter.
1422
+ * @param {!proto.CreateNotificationEventReq} message
1423
+ * @param {!jspb.BinaryWriter} writer
1424
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1425
+ */
1426
+ proto.CreateNotificationEventReq.serializeBinaryToWriter = function(message, writer) {
1427
+ var f = undefined;
1428
+ f = message.getEventCode();
1429
+ if (f.length > 0) {
1430
+ writer.writeString(
1431
+ 1,
1432
+ f
1433
+ );
1434
+ }
1435
+ f = message.getEventName();
1436
+ if (f.length > 0) {
1437
+ writer.writeString(
1438
+ 2,
1439
+ f
1440
+ );
1441
+ }
1442
+ f = message.getDescription();
1443
+ if (f.length > 0) {
1444
+ writer.writeString(
1445
+ 3,
1446
+ f
1447
+ );
1448
+ }
1449
+ f = message.getIsActive();
1450
+ if (f) {
1451
+ writer.writeBool(
1452
+ 4,
1453
+ f
1454
+ );
1455
+ }
1456
+ f = message.getPayloadSchema();
1457
+ if (f.length > 0) {
1458
+ writer.writeString(
1459
+ 5,
1460
+ f
1461
+ );
1462
+ }
1463
+ f = message.getChannelsList();
1464
+ if (f.length > 0) {
1465
+ writer.writeRepeatedMessage(
1466
+ 6,
1467
+ f,
1468
+ proto.NotificationEventChannelReqItem.serializeBinaryToWriter
1469
+ );
1470
+ }
1471
+ };
1472
+
1473
+
1474
+ /**
1475
+ * optional string event_code = 1;
1476
+ * @return {string}
1477
+ */
1478
+ proto.CreateNotificationEventReq.prototype.getEventCode = function() {
1479
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1480
+ };
1481
+
1482
+
1483
+ /**
1484
+ * @param {string} value
1485
+ * @return {!proto.CreateNotificationEventReq} returns this
1486
+ */
1487
+ proto.CreateNotificationEventReq.prototype.setEventCode = function(value) {
1488
+ return jspb.Message.setProto3StringField(this, 1, value);
1489
+ };
1490
+
1491
+
1492
+ /**
1493
+ * optional string event_name = 2;
1494
+ * @return {string}
1495
+ */
1496
+ proto.CreateNotificationEventReq.prototype.getEventName = function() {
1497
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1498
+ };
1499
+
1500
+
1501
+ /**
1502
+ * @param {string} value
1503
+ * @return {!proto.CreateNotificationEventReq} returns this
1504
+ */
1505
+ proto.CreateNotificationEventReq.prototype.setEventName = function(value) {
1506
+ return jspb.Message.setProto3StringField(this, 2, value);
1507
+ };
1508
+
1509
+
1510
+ /**
1511
+ * optional string description = 3;
1512
+ * @return {string}
1513
+ */
1514
+ proto.CreateNotificationEventReq.prototype.getDescription = function() {
1515
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1516
+ };
1517
+
1518
+
1519
+ /**
1520
+ * @param {string} value
1521
+ * @return {!proto.CreateNotificationEventReq} returns this
1522
+ */
1523
+ proto.CreateNotificationEventReq.prototype.setDescription = function(value) {
1524
+ return jspb.Message.setProto3StringField(this, 3, value);
1525
+ };
1526
+
1527
+
1528
+ /**
1529
+ * optional bool is_active = 4;
1530
+ * @return {boolean}
1531
+ */
1532
+ proto.CreateNotificationEventReq.prototype.getIsActive = function() {
1533
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
1534
+ };
1535
+
1536
+
1537
+ /**
1538
+ * @param {boolean} value
1539
+ * @return {!proto.CreateNotificationEventReq} returns this
1540
+ */
1541
+ proto.CreateNotificationEventReq.prototype.setIsActive = function(value) {
1542
+ return jspb.Message.setProto3BooleanField(this, 4, value);
1543
+ };
1544
+
1545
+
1546
+ /**
1547
+ * optional string payload_schema = 5;
1548
+ * @return {string}
1549
+ */
1550
+ proto.CreateNotificationEventReq.prototype.getPayloadSchema = function() {
1551
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1552
+ };
1553
+
1554
+
1555
+ /**
1556
+ * @param {string} value
1557
+ * @return {!proto.CreateNotificationEventReq} returns this
1558
+ */
1559
+ proto.CreateNotificationEventReq.prototype.setPayloadSchema = function(value) {
1560
+ return jspb.Message.setProto3StringField(this, 5, value);
1561
+ };
1562
+
1563
+
1564
+ /**
1565
+ * repeated NotificationEventChannelReqItem channels = 6;
1566
+ * @return {!Array<!proto.NotificationEventChannelReqItem>}
1567
+ */
1568
+ proto.CreateNotificationEventReq.prototype.getChannelsList = function() {
1569
+ return /** @type{!Array<!proto.NotificationEventChannelReqItem>} */ (
1570
+ jspb.Message.getRepeatedWrapperField(this, proto.NotificationEventChannelReqItem, 6));
1571
+ };
1572
+
1573
+
1574
+ /**
1575
+ * @param {!Array<!proto.NotificationEventChannelReqItem>} value
1576
+ * @return {!proto.CreateNotificationEventReq} returns this
1577
+ */
1578
+ proto.CreateNotificationEventReq.prototype.setChannelsList = function(value) {
1579
+ return jspb.Message.setRepeatedWrapperField(this, 6, value);
1580
+ };
1581
+
1582
+
1583
+ /**
1584
+ * @param {!proto.NotificationEventChannelReqItem=} opt_value
1585
+ * @param {number=} opt_index
1586
+ * @return {!proto.NotificationEventChannelReqItem}
1587
+ */
1588
+ proto.CreateNotificationEventReq.prototype.addChannels = function(opt_value, opt_index) {
1589
+ return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.NotificationEventChannelReqItem, opt_index);
1590
+ };
1591
+
1592
+
1593
+ /**
1594
+ * Clears the list making it empty but non-null.
1595
+ * @return {!proto.CreateNotificationEventReq} returns this
1596
+ */
1597
+ proto.CreateNotificationEventReq.prototype.clearChannelsList = function() {
1598
+ return this.setChannelsList([]);
1599
+ };
1600
+
1601
+
1602
+
1603
+ /**
1604
+ * List of repeated fields within this message type.
1605
+ * @private {!Array<number>}
1606
+ * @const
1607
+ */
1608
+ proto.UpdateNotificationEventReq.repeatedFields_ = [7];
1609
+
1610
+
1611
+
1612
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1613
+ /**
1614
+ * Creates an object representation of this proto.
1615
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1616
+ * Optional fields that are not set will be set to undefined.
1617
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1618
+ * For the list of reserved names please see:
1619
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1620
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1621
+ * JSPB instance for transitional soy proto support:
1622
+ * http://goto/soy-param-migration
1623
+ * @return {!Object}
1624
+ */
1625
+ proto.UpdateNotificationEventReq.prototype.toObject = function(opt_includeInstance) {
1626
+ return proto.UpdateNotificationEventReq.toObject(opt_includeInstance, this);
1627
+ };
1628
+
1629
+
1630
+ /**
1631
+ * Static version of the {@see toObject} method.
1632
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1633
+ * the JSPB instance for transitional soy proto support:
1634
+ * http://goto/soy-param-migration
1635
+ * @param {!proto.UpdateNotificationEventReq} msg The msg instance to transform.
1636
+ * @return {!Object}
1637
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1638
+ */
1639
+ proto.UpdateNotificationEventReq.toObject = function(includeInstance, msg) {
1640
+ var f, obj = {
1641
+ referenceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1642
+ eventCode: jspb.Message.getFieldWithDefault(msg, 2, ""),
1643
+ eventName: jspb.Message.getFieldWithDefault(msg, 3, ""),
1644
+ description: jspb.Message.getFieldWithDefault(msg, 4, ""),
1645
+ isActive: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
1646
+ payloadSchema: jspb.Message.getFieldWithDefault(msg, 6, ""),
1647
+ channelsList: jspb.Message.toObjectList(msg.getChannelsList(),
1648
+ proto.NotificationEventChannelReqItem.toObject, includeInstance)
1649
+ };
1650
+
1651
+ if (includeInstance) {
1652
+ obj.$jspbMessageInstance = msg;
1653
+ }
1654
+ return obj;
1655
+ };
1656
+ }
1657
+
1658
+
1659
+ /**
1660
+ * Deserializes binary data (in protobuf wire format).
1661
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1662
+ * @return {!proto.UpdateNotificationEventReq}
1663
+ */
1664
+ proto.UpdateNotificationEventReq.deserializeBinary = function(bytes) {
1665
+ var reader = new jspb.BinaryReader(bytes);
1666
+ var msg = new proto.UpdateNotificationEventReq;
1667
+ return proto.UpdateNotificationEventReq.deserializeBinaryFromReader(msg, reader);
1668
+ };
1669
+
1670
+
1671
+ /**
1672
+ * Deserializes binary data (in protobuf wire format) from the
1673
+ * given reader into the given message object.
1674
+ * @param {!proto.UpdateNotificationEventReq} msg The message object to deserialize into.
1675
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1676
+ * @return {!proto.UpdateNotificationEventReq}
1677
+ */
1678
+ proto.UpdateNotificationEventReq.deserializeBinaryFromReader = function(msg, reader) {
1679
+ while (reader.nextField()) {
1680
+ if (reader.isEndGroup()) {
1681
+ break;
1682
+ }
1683
+ var field = reader.getFieldNumber();
1684
+ switch (field) {
1685
+ case 1:
1686
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1687
+ msg.setReferenceId(value);
1688
+ break;
1689
+ case 2:
1690
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1691
+ msg.setEventCode(value);
1692
+ break;
1693
+ case 3:
1694
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1695
+ msg.setEventName(value);
1696
+ break;
1697
+ case 4:
1698
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1699
+ msg.setDescription(value);
1700
+ break;
1701
+ case 5:
1702
+ var value = /** @type {boolean} */ (reader.readBool());
1703
+ msg.setIsActive(value);
1704
+ break;
1705
+ case 6:
1706
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1707
+ msg.setPayloadSchema(value);
1708
+ break;
1709
+ case 7:
1710
+ var value = new proto.NotificationEventChannelReqItem;
1711
+ reader.readMessage(value,proto.NotificationEventChannelReqItem.deserializeBinaryFromReader);
1712
+ msg.addChannels(value);
1713
+ break;
1714
+ default:
1715
+ reader.skipField();
1716
+ break;
1717
+ }
1718
+ }
1719
+ return msg;
1720
+ };
1721
+
1722
+
1723
+ /**
1724
+ * Serializes the message to binary data (in protobuf wire format).
1725
+ * @return {!Uint8Array}
1726
+ */
1727
+ proto.UpdateNotificationEventReq.prototype.serializeBinary = function() {
1728
+ var writer = new jspb.BinaryWriter();
1729
+ proto.UpdateNotificationEventReq.serializeBinaryToWriter(this, writer);
1730
+ return writer.getResultBuffer();
1731
+ };
1732
+
1733
+
1734
+ /**
1735
+ * Serializes the given message to binary data (in protobuf wire
1736
+ * format), writing to the given BinaryWriter.
1737
+ * @param {!proto.UpdateNotificationEventReq} message
1738
+ * @param {!jspb.BinaryWriter} writer
1739
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1740
+ */
1741
+ proto.UpdateNotificationEventReq.serializeBinaryToWriter = function(message, writer) {
1742
+ var f = undefined;
1743
+ f = message.getReferenceId();
1744
+ if (f.length > 0) {
1745
+ writer.writeString(
1746
+ 1,
1747
+ f
1748
+ );
1749
+ }
1750
+ f = message.getEventCode();
1751
+ if (f.length > 0) {
1752
+ writer.writeString(
1753
+ 2,
1754
+ f
1755
+ );
1756
+ }
1757
+ f = message.getEventName();
1758
+ if (f.length > 0) {
1759
+ writer.writeString(
1760
+ 3,
1761
+ f
1762
+ );
1763
+ }
1764
+ f = message.getDescription();
1765
+ if (f.length > 0) {
1766
+ writer.writeString(
1767
+ 4,
1768
+ f
1769
+ );
1770
+ }
1771
+ f = message.getIsActive();
1772
+ if (f) {
1773
+ writer.writeBool(
1774
+ 5,
1775
+ f
1776
+ );
1777
+ }
1778
+ f = message.getPayloadSchema();
1779
+ if (f.length > 0) {
1780
+ writer.writeString(
1781
+ 6,
1782
+ f
1783
+ );
1784
+ }
1785
+ f = message.getChannelsList();
1786
+ if (f.length > 0) {
1787
+ writer.writeRepeatedMessage(
1788
+ 7,
1789
+ f,
1790
+ proto.NotificationEventChannelReqItem.serializeBinaryToWriter
1791
+ );
1792
+ }
1793
+ };
1794
+
1795
+
1796
+ /**
1797
+ * optional string reference_id = 1;
1798
+ * @return {string}
1799
+ */
1800
+ proto.UpdateNotificationEventReq.prototype.getReferenceId = function() {
1801
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1802
+ };
1803
+
1804
+
1805
+ /**
1806
+ * @param {string} value
1807
+ * @return {!proto.UpdateNotificationEventReq} returns this
1808
+ */
1809
+ proto.UpdateNotificationEventReq.prototype.setReferenceId = function(value) {
1810
+ return jspb.Message.setProto3StringField(this, 1, value);
1811
+ };
1812
+
1813
+
1814
+ /**
1815
+ * optional string event_code = 2;
1816
+ * @return {string}
1817
+ */
1818
+ proto.UpdateNotificationEventReq.prototype.getEventCode = function() {
1819
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1820
+ };
1821
+
1822
+
1823
+ /**
1824
+ * @param {string} value
1825
+ * @return {!proto.UpdateNotificationEventReq} returns this
1826
+ */
1827
+ proto.UpdateNotificationEventReq.prototype.setEventCode = function(value) {
1828
+ return jspb.Message.setProto3StringField(this, 2, value);
1829
+ };
1830
+
1831
+
1832
+ /**
1833
+ * optional string event_name = 3;
1834
+ * @return {string}
1835
+ */
1836
+ proto.UpdateNotificationEventReq.prototype.getEventName = function() {
1837
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1838
+ };
1839
+
1840
+
1841
+ /**
1842
+ * @param {string} value
1843
+ * @return {!proto.UpdateNotificationEventReq} returns this
1844
+ */
1845
+ proto.UpdateNotificationEventReq.prototype.setEventName = function(value) {
1846
+ return jspb.Message.setProto3StringField(this, 3, value);
1847
+ };
1848
+
1849
+
1850
+ /**
1851
+ * optional string description = 4;
1852
+ * @return {string}
1853
+ */
1854
+ proto.UpdateNotificationEventReq.prototype.getDescription = function() {
1855
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1856
+ };
1857
+
1858
+
1859
+ /**
1860
+ * @param {string} value
1861
+ * @return {!proto.UpdateNotificationEventReq} returns this
1862
+ */
1863
+ proto.UpdateNotificationEventReq.prototype.setDescription = function(value) {
1864
+ return jspb.Message.setProto3StringField(this, 4, value);
1865
+ };
1866
+
1867
+
1868
+ /**
1869
+ * optional bool is_active = 5;
1870
+ * @return {boolean}
1871
+ */
1872
+ proto.UpdateNotificationEventReq.prototype.getIsActive = function() {
1873
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
1874
+ };
1875
+
1876
+
1877
+ /**
1878
+ * @param {boolean} value
1879
+ * @return {!proto.UpdateNotificationEventReq} returns this
1880
+ */
1881
+ proto.UpdateNotificationEventReq.prototype.setIsActive = function(value) {
1882
+ return jspb.Message.setProto3BooleanField(this, 5, value);
1883
+ };
1884
+
1885
+
1886
+ /**
1887
+ * optional string payload_schema = 6;
1888
+ * @return {string}
1889
+ */
1890
+ proto.UpdateNotificationEventReq.prototype.getPayloadSchema = function() {
1891
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1892
+ };
1893
+
1894
+
1895
+ /**
1896
+ * @param {string} value
1897
+ * @return {!proto.UpdateNotificationEventReq} returns this
1898
+ */
1899
+ proto.UpdateNotificationEventReq.prototype.setPayloadSchema = function(value) {
1900
+ return jspb.Message.setProto3StringField(this, 6, value);
1901
+ };
1902
+
1903
+
1904
+ /**
1905
+ * repeated NotificationEventChannelReqItem channels = 7;
1906
+ * @return {!Array<!proto.NotificationEventChannelReqItem>}
1907
+ */
1908
+ proto.UpdateNotificationEventReq.prototype.getChannelsList = function() {
1909
+ return /** @type{!Array<!proto.NotificationEventChannelReqItem>} */ (
1910
+ jspb.Message.getRepeatedWrapperField(this, proto.NotificationEventChannelReqItem, 7));
1911
+ };
1912
+
1913
+
1914
+ /**
1915
+ * @param {!Array<!proto.NotificationEventChannelReqItem>} value
1916
+ * @return {!proto.UpdateNotificationEventReq} returns this
1917
+ */
1918
+ proto.UpdateNotificationEventReq.prototype.setChannelsList = function(value) {
1919
+ return jspb.Message.setRepeatedWrapperField(this, 7, value);
1920
+ };
1921
+
1922
+
1923
+ /**
1924
+ * @param {!proto.NotificationEventChannelReqItem=} opt_value
1925
+ * @param {number=} opt_index
1926
+ * @return {!proto.NotificationEventChannelReqItem}
1927
+ */
1928
+ proto.UpdateNotificationEventReq.prototype.addChannels = function(opt_value, opt_index) {
1929
+ return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.NotificationEventChannelReqItem, opt_index);
1930
+ };
1931
+
1932
+
1933
+ /**
1934
+ * Clears the list making it empty but non-null.
1935
+ * @return {!proto.UpdateNotificationEventReq} returns this
1936
+ */
1937
+ proto.UpdateNotificationEventReq.prototype.clearChannelsList = function() {
1938
+ return this.setChannelsList([]);
1939
+ };
1940
+
1941
+
1942
+
1943
+
1944
+
1945
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1946
+ /**
1947
+ * Creates an object representation of this proto.
1948
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1949
+ * Optional fields that are not set will be set to undefined.
1950
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1951
+ * For the list of reserved names please see:
1952
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1953
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1954
+ * JSPB instance for transitional soy proto support:
1955
+ * http://goto/soy-param-migration
1956
+ * @return {!Object}
1957
+ */
1958
+ proto.NotificationEventChannelReqItem.prototype.toObject = function(opt_includeInstance) {
1959
+ return proto.NotificationEventChannelReqItem.toObject(opt_includeInstance, this);
1960
+ };
1961
+
1962
+
1963
+ /**
1964
+ * Static version of the {@see toObject} method.
1965
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1966
+ * the JSPB instance for transitional soy proto support:
1967
+ * http://goto/soy-param-migration
1968
+ * @param {!proto.NotificationEventChannelReqItem} msg The msg instance to transform.
1969
+ * @return {!Object}
1970
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1971
+ */
1972
+ proto.NotificationEventChannelReqItem.toObject = function(includeInstance, msg) {
1973
+ var f, obj = {
1974
+ channel: jspb.Message.getFieldWithDefault(msg, 1, ""),
1975
+ isEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1976
+ titleTemplate: jspb.Message.getFieldWithDefault(msg, 3, ""),
1977
+ bodyTemplate: jspb.Message.getFieldWithDefault(msg, 4, ""),
1978
+ payloadTemplate: jspb.Message.getFieldWithDefault(msg, 5, "")
1979
+ };
1980
+
1981
+ if (includeInstance) {
1982
+ obj.$jspbMessageInstance = msg;
1983
+ }
1984
+ return obj;
1985
+ };
1986
+ }
1987
+
1988
+
1989
+ /**
1990
+ * Deserializes binary data (in protobuf wire format).
1991
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1992
+ * @return {!proto.NotificationEventChannelReqItem}
1993
+ */
1994
+ proto.NotificationEventChannelReqItem.deserializeBinary = function(bytes) {
1995
+ var reader = new jspb.BinaryReader(bytes);
1996
+ var msg = new proto.NotificationEventChannelReqItem;
1997
+ return proto.NotificationEventChannelReqItem.deserializeBinaryFromReader(msg, reader);
1998
+ };
1999
+
2000
+
2001
+ /**
2002
+ * Deserializes binary data (in protobuf wire format) from the
2003
+ * given reader into the given message object.
2004
+ * @param {!proto.NotificationEventChannelReqItem} msg The message object to deserialize into.
2005
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2006
+ * @return {!proto.NotificationEventChannelReqItem}
2007
+ */
2008
+ proto.NotificationEventChannelReqItem.deserializeBinaryFromReader = function(msg, reader) {
2009
+ while (reader.nextField()) {
2010
+ if (reader.isEndGroup()) {
2011
+ break;
2012
+ }
2013
+ var field = reader.getFieldNumber();
2014
+ switch (field) {
2015
+ case 1:
2016
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2017
+ msg.setChannel(value);
2018
+ break;
2019
+ case 2:
2020
+ var value = /** @type {boolean} */ (reader.readBool());
2021
+ msg.setIsEnabled(value);
2022
+ break;
2023
+ case 3:
2024
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2025
+ msg.setTitleTemplate(value);
2026
+ break;
2027
+ case 4:
2028
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2029
+ msg.setBodyTemplate(value);
2030
+ break;
2031
+ case 5:
2032
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2033
+ msg.setPayloadTemplate(value);
2034
+ break;
2035
+ default:
2036
+ reader.skipField();
2037
+ break;
2038
+ }
2039
+ }
2040
+ return msg;
2041
+ };
2042
+
2043
+
2044
+ /**
2045
+ * Serializes the message to binary data (in protobuf wire format).
2046
+ * @return {!Uint8Array}
2047
+ */
2048
+ proto.NotificationEventChannelReqItem.prototype.serializeBinary = function() {
2049
+ var writer = new jspb.BinaryWriter();
2050
+ proto.NotificationEventChannelReqItem.serializeBinaryToWriter(this, writer);
2051
+ return writer.getResultBuffer();
2052
+ };
2053
+
2054
+
2055
+ /**
2056
+ * Serializes the given message to binary data (in protobuf wire
2057
+ * format), writing to the given BinaryWriter.
2058
+ * @param {!proto.NotificationEventChannelReqItem} message
2059
+ * @param {!jspb.BinaryWriter} writer
2060
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2061
+ */
2062
+ proto.NotificationEventChannelReqItem.serializeBinaryToWriter = function(message, writer) {
2063
+ var f = undefined;
2064
+ f = message.getChannel();
2065
+ if (f.length > 0) {
2066
+ writer.writeString(
2067
+ 1,
2068
+ f
2069
+ );
2070
+ }
2071
+ f = message.getIsEnabled();
2072
+ if (f) {
2073
+ writer.writeBool(
2074
+ 2,
2075
+ f
2076
+ );
2077
+ }
2078
+ f = message.getTitleTemplate();
2079
+ if (f.length > 0) {
2080
+ writer.writeString(
2081
+ 3,
2082
+ f
2083
+ );
2084
+ }
2085
+ f = message.getBodyTemplate();
2086
+ if (f.length > 0) {
2087
+ writer.writeString(
2088
+ 4,
2089
+ f
2090
+ );
2091
+ }
2092
+ f = message.getPayloadTemplate();
2093
+ if (f.length > 0) {
2094
+ writer.writeString(
2095
+ 5,
2096
+ f
2097
+ );
2098
+ }
2099
+ };
2100
+
2101
+
2102
+ /**
2103
+ * optional string channel = 1;
2104
+ * @return {string}
2105
+ */
2106
+ proto.NotificationEventChannelReqItem.prototype.getChannel = function() {
2107
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2108
+ };
2109
+
2110
+
2111
+ /**
2112
+ * @param {string} value
2113
+ * @return {!proto.NotificationEventChannelReqItem} returns this
2114
+ */
2115
+ proto.NotificationEventChannelReqItem.prototype.setChannel = function(value) {
2116
+ return jspb.Message.setProto3StringField(this, 1, value);
2117
+ };
2118
+
2119
+
2120
+ /**
2121
+ * optional bool is_enabled = 2;
2122
+ * @return {boolean}
2123
+ */
2124
+ proto.NotificationEventChannelReqItem.prototype.getIsEnabled = function() {
2125
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
2126
+ };
2127
+
2128
+
2129
+ /**
2130
+ * @param {boolean} value
2131
+ * @return {!proto.NotificationEventChannelReqItem} returns this
2132
+ */
2133
+ proto.NotificationEventChannelReqItem.prototype.setIsEnabled = function(value) {
2134
+ return jspb.Message.setProto3BooleanField(this, 2, value);
2135
+ };
2136
+
2137
+
2138
+ /**
2139
+ * optional string title_template = 3;
2140
+ * @return {string}
2141
+ */
2142
+ proto.NotificationEventChannelReqItem.prototype.getTitleTemplate = function() {
2143
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2144
+ };
2145
+
2146
+
2147
+ /**
2148
+ * @param {string} value
2149
+ * @return {!proto.NotificationEventChannelReqItem} returns this
2150
+ */
2151
+ proto.NotificationEventChannelReqItem.prototype.setTitleTemplate = function(value) {
2152
+ return jspb.Message.setProto3StringField(this, 3, value);
2153
+ };
2154
+
2155
+
2156
+ /**
2157
+ * optional string body_template = 4;
2158
+ * @return {string}
2159
+ */
2160
+ proto.NotificationEventChannelReqItem.prototype.getBodyTemplate = function() {
2161
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2162
+ };
2163
+
2164
+
2165
+ /**
2166
+ * @param {string} value
2167
+ * @return {!proto.NotificationEventChannelReqItem} returns this
2168
+ */
2169
+ proto.NotificationEventChannelReqItem.prototype.setBodyTemplate = function(value) {
2170
+ return jspb.Message.setProto3StringField(this, 4, value);
2171
+ };
2172
+
2173
+
2174
+ /**
2175
+ * optional string payload_template = 5;
2176
+ * @return {string}
2177
+ */
2178
+ proto.NotificationEventChannelReqItem.prototype.getPayloadTemplate = function() {
2179
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2180
+ };
2181
+
2182
+
2183
+ /**
2184
+ * @param {string} value
2185
+ * @return {!proto.NotificationEventChannelReqItem} returns this
2186
+ */
2187
+ proto.NotificationEventChannelReqItem.prototype.setPayloadTemplate = function(value) {
2188
+ return jspb.Message.setProto3StringField(this, 5, value);
2189
+ };
2190
+
2191
+
2192
+
2193
+
2194
+
2195
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2196
+ /**
2197
+ * Creates an object representation of this proto.
2198
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2199
+ * Optional fields that are not set will be set to undefined.
2200
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2201
+ * For the list of reserved names please see:
2202
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2203
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2204
+ * JSPB instance for transitional soy proto support:
2205
+ * http://goto/soy-param-migration
2206
+ * @return {!Object}
2207
+ */
2208
+ proto.GetListNotificationEventsReq.prototype.toObject = function(opt_includeInstance) {
2209
+ return proto.GetListNotificationEventsReq.toObject(opt_includeInstance, this);
2210
+ };
2211
+
2212
+
2213
+ /**
2214
+ * Static version of the {@see toObject} method.
2215
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2216
+ * the JSPB instance for transitional soy proto support:
2217
+ * http://goto/soy-param-migration
2218
+ * @param {!proto.GetListNotificationEventsReq} msg The msg instance to transform.
2219
+ * @return {!Object}
2220
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2221
+ */
2222
+ proto.GetListNotificationEventsReq.toObject = function(includeInstance, msg) {
2223
+ var f, obj = {
2224
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
2225
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
2226
+ };
2227
+
2228
+ if (includeInstance) {
2229
+ obj.$jspbMessageInstance = msg;
2230
+ }
2231
+ return obj;
2232
+ };
2233
+ }
2234
+
2235
+
2236
+ /**
2237
+ * Deserializes binary data (in protobuf wire format).
2238
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2239
+ * @return {!proto.GetListNotificationEventsReq}
2240
+ */
2241
+ proto.GetListNotificationEventsReq.deserializeBinary = function(bytes) {
2242
+ var reader = new jspb.BinaryReader(bytes);
2243
+ var msg = new proto.GetListNotificationEventsReq;
2244
+ return proto.GetListNotificationEventsReq.deserializeBinaryFromReader(msg, reader);
2245
+ };
2246
+
2247
+
2248
+ /**
2249
+ * Deserializes binary data (in protobuf wire format) from the
2250
+ * given reader into the given message object.
2251
+ * @param {!proto.GetListNotificationEventsReq} msg The message object to deserialize into.
2252
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2253
+ * @return {!proto.GetListNotificationEventsReq}
2254
+ */
2255
+ proto.GetListNotificationEventsReq.deserializeBinaryFromReader = function(msg, reader) {
2256
+ while (reader.nextField()) {
2257
+ if (reader.isEndGroup()) {
2258
+ break;
2259
+ }
2260
+ var field = reader.getFieldNumber();
2261
+ switch (field) {
2262
+ case 1:
2263
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
2264
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
2265
+ msg.setPagination(value);
2266
+ break;
2267
+ case 2:
2268
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
2269
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
2270
+ msg.setQuery(value);
2271
+ break;
2272
+ default:
2273
+ reader.skipField();
2274
+ break;
2275
+ }
2276
+ }
2277
+ return msg;
2278
+ };
2279
+
2280
+
2281
+ /**
2282
+ * Serializes the message to binary data (in protobuf wire format).
2283
+ * @return {!Uint8Array}
2284
+ */
2285
+ proto.GetListNotificationEventsReq.prototype.serializeBinary = function() {
2286
+ var writer = new jspb.BinaryWriter();
2287
+ proto.GetListNotificationEventsReq.serializeBinaryToWriter(this, writer);
2288
+ return writer.getResultBuffer();
2289
+ };
2290
+
2291
+
2292
+ /**
2293
+ * Serializes the given message to binary data (in protobuf wire
2294
+ * format), writing to the given BinaryWriter.
2295
+ * @param {!proto.GetListNotificationEventsReq} message
2296
+ * @param {!jspb.BinaryWriter} writer
2297
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2298
+ */
2299
+ proto.GetListNotificationEventsReq.serializeBinaryToWriter = function(message, writer) {
2300
+ var f = undefined;
2301
+ f = message.getPagination();
2302
+ if (f != null) {
2303
+ writer.writeMessage(
2304
+ 1,
2305
+ f,
2306
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
2307
+ );
2308
+ }
2309
+ f = message.getQuery();
2310
+ if (f != null) {
2311
+ writer.writeMessage(
2312
+ 2,
2313
+ f,
2314
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
2315
+ );
2316
+ }
2317
+ };
2318
+
2319
+
2320
+ /**
2321
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
2322
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
2323
+ */
2324
+ proto.GetListNotificationEventsReq.prototype.getPagination = function() {
2325
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
2326
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
2327
+ };
2328
+
2329
+
2330
+ /**
2331
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
2332
+ * @return {!proto.GetListNotificationEventsReq} returns this
2333
+ */
2334
+ proto.GetListNotificationEventsReq.prototype.setPagination = function(value) {
2335
+ return jspb.Message.setWrapperField(this, 1, value);
2336
+ };
2337
+
2338
+
2339
+ /**
2340
+ * Clears the message field making it undefined.
2341
+ * @return {!proto.GetListNotificationEventsReq} returns this
2342
+ */
2343
+ proto.GetListNotificationEventsReq.prototype.clearPagination = function() {
2344
+ return this.setPagination(undefined);
2345
+ };
2346
+
2347
+
2348
+ /**
2349
+ * Returns whether this field is set.
2350
+ * @return {boolean}
2351
+ */
2352
+ proto.GetListNotificationEventsReq.prototype.hasPagination = function() {
2353
+ return jspb.Message.getField(this, 1) != null;
2354
+ };
2355
+
2356
+
2357
+ /**
2358
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
2359
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
2360
+ */
2361
+ proto.GetListNotificationEventsReq.prototype.getQuery = function() {
2362
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
2363
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
2364
+ };
2365
+
2366
+
2367
+ /**
2368
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
2369
+ * @return {!proto.GetListNotificationEventsReq} returns this
2370
+ */
2371
+ proto.GetListNotificationEventsReq.prototype.setQuery = function(value) {
2372
+ return jspb.Message.setWrapperField(this, 2, value);
2373
+ };
2374
+
2375
+
2376
+ /**
2377
+ * Clears the message field making it undefined.
2378
+ * @return {!proto.GetListNotificationEventsReq} returns this
2379
+ */
2380
+ proto.GetListNotificationEventsReq.prototype.clearQuery = function() {
2381
+ return this.setQuery(undefined);
2382
+ };
2383
+
2384
+
2385
+ /**
2386
+ * Returns whether this field is set.
2387
+ * @return {boolean}
2388
+ */
2389
+ proto.GetListNotificationEventsReq.prototype.hasQuery = function() {
2390
+ return jspb.Message.getField(this, 2) != null;
2391
+ };
2392
+
2393
+
2394
+
2395
+ /**
2396
+ * List of repeated fields within this message type.
2397
+ * @private {!Array<number>}
2398
+ * @const
2399
+ */
2400
+ proto.GetListNotificationEventsRes.repeatedFields_ = [1];
2401
+
2402
+
2403
+
2404
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2405
+ /**
2406
+ * Creates an object representation of this proto.
2407
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2408
+ * Optional fields that are not set will be set to undefined.
2409
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2410
+ * For the list of reserved names please see:
2411
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2412
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2413
+ * JSPB instance for transitional soy proto support:
2414
+ * http://goto/soy-param-migration
2415
+ * @return {!Object}
2416
+ */
2417
+ proto.GetListNotificationEventsRes.prototype.toObject = function(opt_includeInstance) {
2418
+ return proto.GetListNotificationEventsRes.toObject(opt_includeInstance, this);
2419
+ };
2420
+
2421
+
2422
+ /**
2423
+ * Static version of the {@see toObject} method.
2424
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2425
+ * the JSPB instance for transitional soy proto support:
2426
+ * http://goto/soy-param-migration
2427
+ * @param {!proto.GetListNotificationEventsRes} msg The msg instance to transform.
2428
+ * @return {!Object}
2429
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2430
+ */
2431
+ proto.GetListNotificationEventsRes.toObject = function(includeInstance, msg) {
2432
+ var f, obj = {
2433
+ dataList: jspb.Message.toObjectList(msg.getDataList(),
2434
+ proto.NotificationEventItem.toObject, includeInstance),
2435
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f)
2436
+ };
2437
+
2438
+ if (includeInstance) {
2439
+ obj.$jspbMessageInstance = msg;
2440
+ }
2441
+ return obj;
2442
+ };
2443
+ }
2444
+
2445
+
2446
+ /**
2447
+ * Deserializes binary data (in protobuf wire format).
2448
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2449
+ * @return {!proto.GetListNotificationEventsRes}
2450
+ */
2451
+ proto.GetListNotificationEventsRes.deserializeBinary = function(bytes) {
2452
+ var reader = new jspb.BinaryReader(bytes);
2453
+ var msg = new proto.GetListNotificationEventsRes;
2454
+ return proto.GetListNotificationEventsRes.deserializeBinaryFromReader(msg, reader);
2455
+ };
2456
+
2457
+
2458
+ /**
2459
+ * Deserializes binary data (in protobuf wire format) from the
2460
+ * given reader into the given message object.
2461
+ * @param {!proto.GetListNotificationEventsRes} msg The message object to deserialize into.
2462
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2463
+ * @return {!proto.GetListNotificationEventsRes}
2464
+ */
2465
+ proto.GetListNotificationEventsRes.deserializeBinaryFromReader = function(msg, reader) {
2466
+ while (reader.nextField()) {
2467
+ if (reader.isEndGroup()) {
2468
+ break;
2469
+ }
2470
+ var field = reader.getFieldNumber();
2471
+ switch (field) {
2472
+ case 1:
2473
+ var value = new proto.NotificationEventItem;
2474
+ reader.readMessage(value,proto.NotificationEventItem.deserializeBinaryFromReader);
2475
+ msg.addData(value);
2476
+ break;
2477
+ case 2:
2478
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
2479
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
2480
+ msg.setMeta(value);
2481
+ break;
2482
+ default:
2483
+ reader.skipField();
2484
+ break;
2485
+ }
2486
+ }
2487
+ return msg;
2488
+ };
2489
+
2490
+
2491
+ /**
2492
+ * Serializes the message to binary data (in protobuf wire format).
2493
+ * @return {!Uint8Array}
2494
+ */
2495
+ proto.GetListNotificationEventsRes.prototype.serializeBinary = function() {
2496
+ var writer = new jspb.BinaryWriter();
2497
+ proto.GetListNotificationEventsRes.serializeBinaryToWriter(this, writer);
2498
+ return writer.getResultBuffer();
2499
+ };
2500
+
2501
+
2502
+ /**
2503
+ * Serializes the given message to binary data (in protobuf wire
2504
+ * format), writing to the given BinaryWriter.
2505
+ * @param {!proto.GetListNotificationEventsRes} message
2506
+ * @param {!jspb.BinaryWriter} writer
2507
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2508
+ */
2509
+ proto.GetListNotificationEventsRes.serializeBinaryToWriter = function(message, writer) {
2510
+ var f = undefined;
2511
+ f = message.getDataList();
2512
+ if (f.length > 0) {
2513
+ writer.writeRepeatedMessage(
2514
+ 1,
2515
+ f,
2516
+ proto.NotificationEventItem.serializeBinaryToWriter
2517
+ );
2518
+ }
2519
+ f = message.getMeta();
2520
+ if (f != null) {
2521
+ writer.writeMessage(
2522
+ 2,
2523
+ f,
2524
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
2525
+ );
2526
+ }
2527
+ };
2528
+
2529
+
2530
+ /**
2531
+ * repeated NotificationEventItem data = 1;
2532
+ * @return {!Array<!proto.NotificationEventItem>}
2533
+ */
2534
+ proto.GetListNotificationEventsRes.prototype.getDataList = function() {
2535
+ return /** @type{!Array<!proto.NotificationEventItem>} */ (
2536
+ jspb.Message.getRepeatedWrapperField(this, proto.NotificationEventItem, 1));
2537
+ };
2538
+
2539
+
2540
+ /**
2541
+ * @param {!Array<!proto.NotificationEventItem>} value
2542
+ * @return {!proto.GetListNotificationEventsRes} returns this
2543
+ */
2544
+ proto.GetListNotificationEventsRes.prototype.setDataList = function(value) {
2545
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2546
+ };
2547
+
2548
+
2549
+ /**
2550
+ * @param {!proto.NotificationEventItem=} opt_value
2551
+ * @param {number=} opt_index
2552
+ * @return {!proto.NotificationEventItem}
2553
+ */
2554
+ proto.GetListNotificationEventsRes.prototype.addData = function(opt_value, opt_index) {
2555
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.NotificationEventItem, opt_index);
2556
+ };
2557
+
2558
+
2559
+ /**
2560
+ * Clears the list making it empty but non-null.
2561
+ * @return {!proto.GetListNotificationEventsRes} returns this
2562
+ */
2563
+ proto.GetListNotificationEventsRes.prototype.clearDataList = function() {
2564
+ return this.setDataList([]);
2565
+ };
2566
+
2567
+
2568
+ /**
2569
+ * optional prisca.v1.global.meta.Meta meta = 2;
2570
+ * @return {?proto.prisca.v1.global.meta.Meta}
2571
+ */
2572
+ proto.GetListNotificationEventsRes.prototype.getMeta = function() {
2573
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
2574
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 2));
2575
+ };
2576
+
2577
+
2578
+ /**
2579
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
2580
+ * @return {!proto.GetListNotificationEventsRes} returns this
2581
+ */
2582
+ proto.GetListNotificationEventsRes.prototype.setMeta = function(value) {
2583
+ return jspb.Message.setWrapperField(this, 2, value);
2584
+ };
2585
+
2586
+
2587
+ /**
2588
+ * Clears the message field making it undefined.
2589
+ * @return {!proto.GetListNotificationEventsRes} returns this
2590
+ */
2591
+ proto.GetListNotificationEventsRes.prototype.clearMeta = function() {
2592
+ return this.setMeta(undefined);
2593
+ };
2594
+
2595
+
2596
+ /**
2597
+ * Returns whether this field is set.
2598
+ * @return {boolean}
2599
+ */
2600
+ proto.GetListNotificationEventsRes.prototype.hasMeta = function() {
2601
+ return jspb.Message.getField(this, 2) != null;
2602
+ };
2603
+
2604
+
2605
+
2606
+
2607
+
2608
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2609
+ /**
2610
+ * Creates an object representation of this proto.
2611
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2612
+ * Optional fields that are not set will be set to undefined.
2613
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2614
+ * For the list of reserved names please see:
2615
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2616
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2617
+ * JSPB instance for transitional soy proto support:
2618
+ * http://goto/soy-param-migration
2619
+ * @return {!Object}
2620
+ */
2621
+ proto.GetEventByCodeReq.prototype.toObject = function(opt_includeInstance) {
2622
+ return proto.GetEventByCodeReq.toObject(opt_includeInstance, this);
2623
+ };
2624
+
2625
+
2626
+ /**
2627
+ * Static version of the {@see toObject} method.
2628
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2629
+ * the JSPB instance for transitional soy proto support:
2630
+ * http://goto/soy-param-migration
2631
+ * @param {!proto.GetEventByCodeReq} msg The msg instance to transform.
2632
+ * @return {!Object}
2633
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2634
+ */
2635
+ proto.GetEventByCodeReq.toObject = function(includeInstance, msg) {
2636
+ var f, obj = {
2637
+ eventCode: jspb.Message.getFieldWithDefault(msg, 1, "")
2638
+ };
2639
+
2640
+ if (includeInstance) {
2641
+ obj.$jspbMessageInstance = msg;
2642
+ }
2643
+ return obj;
2644
+ };
2645
+ }
2646
+
2647
+
2648
+ /**
2649
+ * Deserializes binary data (in protobuf wire format).
2650
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2651
+ * @return {!proto.GetEventByCodeReq}
2652
+ */
2653
+ proto.GetEventByCodeReq.deserializeBinary = function(bytes) {
2654
+ var reader = new jspb.BinaryReader(bytes);
2655
+ var msg = new proto.GetEventByCodeReq;
2656
+ return proto.GetEventByCodeReq.deserializeBinaryFromReader(msg, reader);
2657
+ };
2658
+
2659
+
2660
+ /**
2661
+ * Deserializes binary data (in protobuf wire format) from the
2662
+ * given reader into the given message object.
2663
+ * @param {!proto.GetEventByCodeReq} msg The message object to deserialize into.
2664
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2665
+ * @return {!proto.GetEventByCodeReq}
2666
+ */
2667
+ proto.GetEventByCodeReq.deserializeBinaryFromReader = function(msg, reader) {
2668
+ while (reader.nextField()) {
2669
+ if (reader.isEndGroup()) {
2670
+ break;
2671
+ }
2672
+ var field = reader.getFieldNumber();
2673
+ switch (field) {
2674
+ case 1:
2675
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2676
+ msg.setEventCode(value);
2677
+ break;
2678
+ default:
2679
+ reader.skipField();
2680
+ break;
2681
+ }
2682
+ }
2683
+ return msg;
2684
+ };
2685
+
2686
+
2687
+ /**
2688
+ * Serializes the message to binary data (in protobuf wire format).
2689
+ * @return {!Uint8Array}
2690
+ */
2691
+ proto.GetEventByCodeReq.prototype.serializeBinary = function() {
2692
+ var writer = new jspb.BinaryWriter();
2693
+ proto.GetEventByCodeReq.serializeBinaryToWriter(this, writer);
2694
+ return writer.getResultBuffer();
2695
+ };
2696
+
2697
+
2698
+ /**
2699
+ * Serializes the given message to binary data (in protobuf wire
2700
+ * format), writing to the given BinaryWriter.
2701
+ * @param {!proto.GetEventByCodeReq} message
2702
+ * @param {!jspb.BinaryWriter} writer
2703
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2704
+ */
2705
+ proto.GetEventByCodeReq.serializeBinaryToWriter = function(message, writer) {
2706
+ var f = undefined;
2707
+ f = message.getEventCode();
2708
+ if (f.length > 0) {
2709
+ writer.writeString(
2710
+ 1,
2711
+ f
2712
+ );
2713
+ }
2714
+ };
2715
+
2716
+
2717
+ /**
2718
+ * optional string event_code = 1;
2719
+ * @return {string}
2720
+ */
2721
+ proto.GetEventByCodeReq.prototype.getEventCode = function() {
2722
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2723
+ };
2724
+
2725
+
2726
+ /**
2727
+ * @param {string} value
2728
+ * @return {!proto.GetEventByCodeReq} returns this
2729
+ */
2730
+ proto.GetEventByCodeReq.prototype.setEventCode = function(value) {
2731
+ return jspb.Message.setProto3StringField(this, 1, value);
2732
+ };
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2739
+ /**
2740
+ * Creates an object representation of this proto.
2741
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2742
+ * Optional fields that are not set will be set to undefined.
2743
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2744
+ * For the list of reserved names please see:
2745
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2746
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2747
+ * JSPB instance for transitional soy proto support:
2748
+ * http://goto/soy-param-migration
2749
+ * @return {!Object}
2750
+ */
2751
+ proto.UpsertEventChannelReq.prototype.toObject = function(opt_includeInstance) {
2752
+ return proto.UpsertEventChannelReq.toObject(opt_includeInstance, this);
2753
+ };
2754
+
2755
+
2756
+ /**
2757
+ * Static version of the {@see toObject} method.
2758
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2759
+ * the JSPB instance for transitional soy proto support:
2760
+ * http://goto/soy-param-migration
2761
+ * @param {!proto.UpsertEventChannelReq} msg The msg instance to transform.
2762
+ * @return {!Object}
2763
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2764
+ */
2765
+ proto.UpsertEventChannelReq.toObject = function(includeInstance, msg) {
2766
+ var f, obj = {
2767
+ notificationEventId: jspb.Message.getFieldWithDefault(msg, 1, 0),
2768
+ channel: jspb.Message.getFieldWithDefault(msg, 2, ""),
2769
+ isEnabled: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
2770
+ titleTemplate: jspb.Message.getFieldWithDefault(msg, 4, ""),
2771
+ bodyTemplate: jspb.Message.getFieldWithDefault(msg, 5, ""),
2772
+ payloadTemplate: jspb.Message.getFieldWithDefault(msg, 6, "")
2773
+ };
2774
+
2775
+ if (includeInstance) {
2776
+ obj.$jspbMessageInstance = msg;
2777
+ }
2778
+ return obj;
2779
+ };
2780
+ }
2781
+
2782
+
2783
+ /**
2784
+ * Deserializes binary data (in protobuf wire format).
2785
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2786
+ * @return {!proto.UpsertEventChannelReq}
2787
+ */
2788
+ proto.UpsertEventChannelReq.deserializeBinary = function(bytes) {
2789
+ var reader = new jspb.BinaryReader(bytes);
2790
+ var msg = new proto.UpsertEventChannelReq;
2791
+ return proto.UpsertEventChannelReq.deserializeBinaryFromReader(msg, reader);
2792
+ };
2793
+
2794
+
2795
+ /**
2796
+ * Deserializes binary data (in protobuf wire format) from the
2797
+ * given reader into the given message object.
2798
+ * @param {!proto.UpsertEventChannelReq} msg The message object to deserialize into.
2799
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2800
+ * @return {!proto.UpsertEventChannelReq}
2801
+ */
2802
+ proto.UpsertEventChannelReq.deserializeBinaryFromReader = function(msg, reader) {
2803
+ while (reader.nextField()) {
2804
+ if (reader.isEndGroup()) {
2805
+ break;
2806
+ }
2807
+ var field = reader.getFieldNumber();
2808
+ switch (field) {
2809
+ case 1:
2810
+ var value = /** @type {number} */ (reader.readInt64());
2811
+ msg.setNotificationEventId(value);
2812
+ break;
2813
+ case 2:
2814
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2815
+ msg.setChannel(value);
2816
+ break;
2817
+ case 3:
2818
+ var value = /** @type {boolean} */ (reader.readBool());
2819
+ msg.setIsEnabled(value);
2820
+ break;
2821
+ case 4:
2822
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2823
+ msg.setTitleTemplate(value);
2824
+ break;
2825
+ case 5:
2826
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2827
+ msg.setBodyTemplate(value);
2828
+ break;
2829
+ case 6:
2830
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
2831
+ msg.setPayloadTemplate(value);
2832
+ break;
2833
+ default:
2834
+ reader.skipField();
2835
+ break;
2836
+ }
2837
+ }
2838
+ return msg;
2839
+ };
2840
+
2841
+
2842
+ /**
2843
+ * Serializes the message to binary data (in protobuf wire format).
2844
+ * @return {!Uint8Array}
2845
+ */
2846
+ proto.UpsertEventChannelReq.prototype.serializeBinary = function() {
2847
+ var writer = new jspb.BinaryWriter();
2848
+ proto.UpsertEventChannelReq.serializeBinaryToWriter(this, writer);
2849
+ return writer.getResultBuffer();
2850
+ };
2851
+
2852
+
2853
+ /**
2854
+ * Serializes the given message to binary data (in protobuf wire
2855
+ * format), writing to the given BinaryWriter.
2856
+ * @param {!proto.UpsertEventChannelReq} message
2857
+ * @param {!jspb.BinaryWriter} writer
2858
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2859
+ */
2860
+ proto.UpsertEventChannelReq.serializeBinaryToWriter = function(message, writer) {
2861
+ var f = undefined;
2862
+ f = message.getNotificationEventId();
2863
+ if (f !== 0) {
2864
+ writer.writeInt64(
2865
+ 1,
2866
+ f
2867
+ );
2868
+ }
2869
+ f = message.getChannel();
2870
+ if (f.length > 0) {
2871
+ writer.writeString(
2872
+ 2,
2873
+ f
2874
+ );
2875
+ }
2876
+ f = message.getIsEnabled();
2877
+ if (f) {
2878
+ writer.writeBool(
2879
+ 3,
2880
+ f
2881
+ );
2882
+ }
2883
+ f = message.getTitleTemplate();
2884
+ if (f.length > 0) {
2885
+ writer.writeString(
2886
+ 4,
2887
+ f
2888
+ );
2889
+ }
2890
+ f = message.getBodyTemplate();
2891
+ if (f.length > 0) {
2892
+ writer.writeString(
2893
+ 5,
2894
+ f
2895
+ );
2896
+ }
2897
+ f = message.getPayloadTemplate();
2898
+ if (f.length > 0) {
2899
+ writer.writeString(
2900
+ 6,
2901
+ f
2902
+ );
2903
+ }
2904
+ };
2905
+
2906
+
2907
+ /**
2908
+ * optional int64 notification_event_id = 1;
2909
+ * @return {number}
2910
+ */
2911
+ proto.UpsertEventChannelReq.prototype.getNotificationEventId = function() {
2912
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2913
+ };
2914
+
2915
+
2916
+ /**
2917
+ * @param {number} value
2918
+ * @return {!proto.UpsertEventChannelReq} returns this
2919
+ */
2920
+ proto.UpsertEventChannelReq.prototype.setNotificationEventId = function(value) {
2921
+ return jspb.Message.setProto3IntField(this, 1, value);
2922
+ };
2923
+
2924
+
2925
+ /**
2926
+ * optional string channel = 2;
2927
+ * @return {string}
2928
+ */
2929
+ proto.UpsertEventChannelReq.prototype.getChannel = function() {
2930
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2931
+ };
2932
+
2933
+
2934
+ /**
2935
+ * @param {string} value
2936
+ * @return {!proto.UpsertEventChannelReq} returns this
2937
+ */
2938
+ proto.UpsertEventChannelReq.prototype.setChannel = function(value) {
2939
+ return jspb.Message.setProto3StringField(this, 2, value);
2940
+ };
2941
+
2942
+
2943
+ /**
2944
+ * optional bool is_enabled = 3;
2945
+ * @return {boolean}
2946
+ */
2947
+ proto.UpsertEventChannelReq.prototype.getIsEnabled = function() {
2948
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
2949
+ };
2950
+
2951
+
2952
+ /**
2953
+ * @param {boolean} value
2954
+ * @return {!proto.UpsertEventChannelReq} returns this
2955
+ */
2956
+ proto.UpsertEventChannelReq.prototype.setIsEnabled = function(value) {
2957
+ return jspb.Message.setProto3BooleanField(this, 3, value);
2958
+ };
2959
+
2960
+
2961
+ /**
2962
+ * optional string title_template = 4;
2963
+ * @return {string}
2964
+ */
2965
+ proto.UpsertEventChannelReq.prototype.getTitleTemplate = function() {
2966
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2967
+ };
2968
+
2969
+
2970
+ /**
2971
+ * @param {string} value
2972
+ * @return {!proto.UpsertEventChannelReq} returns this
2973
+ */
2974
+ proto.UpsertEventChannelReq.prototype.setTitleTemplate = function(value) {
2975
+ return jspb.Message.setProto3StringField(this, 4, value);
2976
+ };
2977
+
2978
+
2979
+ /**
2980
+ * optional string body_template = 5;
2981
+ * @return {string}
2982
+ */
2983
+ proto.UpsertEventChannelReq.prototype.getBodyTemplate = function() {
2984
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2985
+ };
2986
+
2987
+
2988
+ /**
2989
+ * @param {string} value
2990
+ * @return {!proto.UpsertEventChannelReq} returns this
2991
+ */
2992
+ proto.UpsertEventChannelReq.prototype.setBodyTemplate = function(value) {
2993
+ return jspb.Message.setProto3StringField(this, 5, value);
2994
+ };
2995
+
2996
+
2997
+ /**
2998
+ * optional string payload_template = 6;
2999
+ * @return {string}
3000
+ */
3001
+ proto.UpsertEventChannelReq.prototype.getPayloadTemplate = function() {
3002
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
3003
+ };
3004
+
3005
+
3006
+ /**
3007
+ * @param {string} value
3008
+ * @return {!proto.UpsertEventChannelReq} returns this
3009
+ */
3010
+ proto.UpsertEventChannelReq.prototype.setPayloadTemplate = function(value) {
3011
+ return jspb.Message.setProto3StringField(this, 6, value);
3012
+ };
3013
+
3014
+
3015
+ goog.object.extend(exports, proto);