@miradorlabs/web-grpc 3.48.0 → 3.49.0

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,1323 @@
1
+ // source: proto/gateway/web/v1/notification_gateway.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 google_api_field_behavior_pb = require('../../../../google/api/field_behavior_pb.js');
19
+ goog.object.extend(proto, google_api_field_behavior_pb);
20
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
21
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
22
+ var proto_gateway_common_v1_status_pb = require('../../../../proto/gateway/common/v1/status_pb.js');
23
+ goog.object.extend(proto, proto_gateway_common_v1_status_pb);
24
+ goog.exportSymbol('proto.gateway.web.v1.ListAlertsRequest', null, global);
25
+ goog.exportSymbol('proto.gateway.web.v1.ListAlertsResponse', null, global);
26
+ goog.exportSymbol('proto.gateway.web.v1.MarkAlertsReadRequest', null, global);
27
+ goog.exportSymbol('proto.gateway.web.v1.MarkAlertsReadResponse', null, global);
28
+ goog.exportSymbol('proto.gateway.web.v1.NotificationAlert', null, global);
29
+ /**
30
+ * Generated by JsPbCodeGenerator.
31
+ * @param {Array=} opt_data Optional initial data array, typically from a
32
+ * server response, or constructed directly in Javascript. The array is used
33
+ * in place and becomes part of the constructed object. It is not cloned.
34
+ * If no data is provided, the constructed object will be empty, but still
35
+ * valid.
36
+ * @extends {jspb.Message}
37
+ * @constructor
38
+ */
39
+ proto.gateway.web.v1.ListAlertsRequest = function(opt_data) {
40
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
41
+ };
42
+ goog.inherits(proto.gateway.web.v1.ListAlertsRequest, jspb.Message);
43
+ if (goog.DEBUG && !COMPILED) {
44
+ /**
45
+ * @public
46
+ * @override
47
+ */
48
+ proto.gateway.web.v1.ListAlertsRequest.displayName = 'proto.gateway.web.v1.ListAlertsRequest';
49
+ }
50
+ /**
51
+ * Generated by JsPbCodeGenerator.
52
+ * @param {Array=} opt_data Optional initial data array, typically from a
53
+ * server response, or constructed directly in Javascript. The array is used
54
+ * in place and becomes part of the constructed object. It is not cloned.
55
+ * If no data is provided, the constructed object will be empty, but still
56
+ * valid.
57
+ * @extends {jspb.Message}
58
+ * @constructor
59
+ */
60
+ proto.gateway.web.v1.ListAlertsResponse = function(opt_data) {
61
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.ListAlertsResponse.repeatedFields_, null);
62
+ };
63
+ goog.inherits(proto.gateway.web.v1.ListAlertsResponse, jspb.Message);
64
+ if (goog.DEBUG && !COMPILED) {
65
+ /**
66
+ * @public
67
+ * @override
68
+ */
69
+ proto.gateway.web.v1.ListAlertsResponse.displayName = 'proto.gateway.web.v1.ListAlertsResponse';
70
+ }
71
+ /**
72
+ * Generated by JsPbCodeGenerator.
73
+ * @param {Array=} opt_data Optional initial data array, typically from a
74
+ * server response, or constructed directly in Javascript. The array is used
75
+ * in place and becomes part of the constructed object. It is not cloned.
76
+ * If no data is provided, the constructed object will be empty, but still
77
+ * valid.
78
+ * @extends {jspb.Message}
79
+ * @constructor
80
+ */
81
+ proto.gateway.web.v1.NotificationAlert = function(opt_data) {
82
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
83
+ };
84
+ goog.inherits(proto.gateway.web.v1.NotificationAlert, jspb.Message);
85
+ if (goog.DEBUG && !COMPILED) {
86
+ /**
87
+ * @public
88
+ * @override
89
+ */
90
+ proto.gateway.web.v1.NotificationAlert.displayName = 'proto.gateway.web.v1.NotificationAlert';
91
+ }
92
+ /**
93
+ * Generated by JsPbCodeGenerator.
94
+ * @param {Array=} opt_data Optional initial data array, typically from a
95
+ * server response, or constructed directly in Javascript. The array is used
96
+ * in place and becomes part of the constructed object. It is not cloned.
97
+ * If no data is provided, the constructed object will be empty, but still
98
+ * valid.
99
+ * @extends {jspb.Message}
100
+ * @constructor
101
+ */
102
+ proto.gateway.web.v1.MarkAlertsReadRequest = function(opt_data) {
103
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.MarkAlertsReadRequest.repeatedFields_, null);
104
+ };
105
+ goog.inherits(proto.gateway.web.v1.MarkAlertsReadRequest, jspb.Message);
106
+ if (goog.DEBUG && !COMPILED) {
107
+ /**
108
+ * @public
109
+ * @override
110
+ */
111
+ proto.gateway.web.v1.MarkAlertsReadRequest.displayName = 'proto.gateway.web.v1.MarkAlertsReadRequest';
112
+ }
113
+ /**
114
+ * Generated by JsPbCodeGenerator.
115
+ * @param {Array=} opt_data Optional initial data array, typically from a
116
+ * server response, or constructed directly in Javascript. The array is used
117
+ * in place and becomes part of the constructed object. It is not cloned.
118
+ * If no data is provided, the constructed object will be empty, but still
119
+ * valid.
120
+ * @extends {jspb.Message}
121
+ * @constructor
122
+ */
123
+ proto.gateway.web.v1.MarkAlertsReadResponse = function(opt_data) {
124
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
125
+ };
126
+ goog.inherits(proto.gateway.web.v1.MarkAlertsReadResponse, jspb.Message);
127
+ if (goog.DEBUG && !COMPILED) {
128
+ /**
129
+ * @public
130
+ * @override
131
+ */
132
+ proto.gateway.web.v1.MarkAlertsReadResponse.displayName = 'proto.gateway.web.v1.MarkAlertsReadResponse';
133
+ }
134
+
135
+
136
+
137
+ if (jspb.Message.GENERATE_TO_OBJECT) {
138
+ /**
139
+ * Creates an object representation of this proto.
140
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
141
+ * Optional fields that are not set will be set to undefined.
142
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
143
+ * For the list of reserved names please see:
144
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
145
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
146
+ * JSPB instance for transitional soy proto support:
147
+ * http://goto/soy-param-migration
148
+ * @return {!Object}
149
+ */
150
+ proto.gateway.web.v1.ListAlertsRequest.prototype.toObject = function(opt_includeInstance) {
151
+ return proto.gateway.web.v1.ListAlertsRequest.toObject(opt_includeInstance, this);
152
+ };
153
+
154
+
155
+ /**
156
+ * Static version of the {@see toObject} method.
157
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
158
+ * the JSPB instance for transitional soy proto support:
159
+ * http://goto/soy-param-migration
160
+ * @param {!proto.gateway.web.v1.ListAlertsRequest} msg The msg instance to transform.
161
+ * @return {!Object}
162
+ * @suppress {unusedLocalVariables} f is only used for nested messages
163
+ */
164
+ proto.gateway.web.v1.ListAlertsRequest.toObject = function(includeInstance, msg) {
165
+ var f, obj = {
166
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
167
+ pageSize: jspb.Message.getFieldWithDefault(msg, 2, 0),
168
+ pageToken: jspb.Message.getFieldWithDefault(msg, 3, "")
169
+ };
170
+
171
+ if (includeInstance) {
172
+ obj.$jspbMessageInstance = msg;
173
+ }
174
+ return obj;
175
+ };
176
+ }
177
+
178
+
179
+ /**
180
+ * Deserializes binary data (in protobuf wire format).
181
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
182
+ * @return {!proto.gateway.web.v1.ListAlertsRequest}
183
+ */
184
+ proto.gateway.web.v1.ListAlertsRequest.deserializeBinary = function(bytes) {
185
+ var reader = new jspb.BinaryReader(bytes);
186
+ var msg = new proto.gateway.web.v1.ListAlertsRequest;
187
+ return proto.gateway.web.v1.ListAlertsRequest.deserializeBinaryFromReader(msg, reader);
188
+ };
189
+
190
+
191
+ /**
192
+ * Deserializes binary data (in protobuf wire format) from the
193
+ * given reader into the given message object.
194
+ * @param {!proto.gateway.web.v1.ListAlertsRequest} msg The message object to deserialize into.
195
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
196
+ * @return {!proto.gateway.web.v1.ListAlertsRequest}
197
+ */
198
+ proto.gateway.web.v1.ListAlertsRequest.deserializeBinaryFromReader = function(msg, reader) {
199
+ while (reader.nextField()) {
200
+ if (reader.isEndGroup()) {
201
+ break;
202
+ }
203
+ var field = reader.getFieldNumber();
204
+ switch (field) {
205
+ case 1:
206
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
207
+ msg.setOrganizationId(value);
208
+ break;
209
+ case 2:
210
+ var value = /** @type {number} */ (reader.readInt32());
211
+ msg.setPageSize(value);
212
+ break;
213
+ case 3:
214
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
215
+ msg.setPageToken(value);
216
+ break;
217
+ default:
218
+ reader.skipField();
219
+ break;
220
+ }
221
+ }
222
+ return msg;
223
+ };
224
+
225
+
226
+ /**
227
+ * Serializes the message to binary data (in protobuf wire format).
228
+ * @return {!Uint8Array}
229
+ */
230
+ proto.gateway.web.v1.ListAlertsRequest.prototype.serializeBinary = function() {
231
+ var writer = new jspb.BinaryWriter();
232
+ proto.gateway.web.v1.ListAlertsRequest.serializeBinaryToWriter(this, writer);
233
+ return writer.getResultBuffer();
234
+ };
235
+
236
+
237
+ /**
238
+ * Serializes the given message to binary data (in protobuf wire
239
+ * format), writing to the given BinaryWriter.
240
+ * @param {!proto.gateway.web.v1.ListAlertsRequest} message
241
+ * @param {!jspb.BinaryWriter} writer
242
+ * @suppress {unusedLocalVariables} f is only used for nested messages
243
+ */
244
+ proto.gateway.web.v1.ListAlertsRequest.serializeBinaryToWriter = function(message, writer) {
245
+ var f = undefined;
246
+ f = message.getOrganizationId();
247
+ if (f.length > 0) {
248
+ writer.writeString(
249
+ 1,
250
+ f
251
+ );
252
+ }
253
+ f = message.getPageSize();
254
+ if (f !== 0) {
255
+ writer.writeInt32(
256
+ 2,
257
+ f
258
+ );
259
+ }
260
+ f = message.getPageToken();
261
+ if (f.length > 0) {
262
+ writer.writeString(
263
+ 3,
264
+ f
265
+ );
266
+ }
267
+ };
268
+
269
+
270
+ /**
271
+ * optional string organization_id = 1;
272
+ * @return {string}
273
+ */
274
+ proto.gateway.web.v1.ListAlertsRequest.prototype.getOrganizationId = function() {
275
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
276
+ };
277
+
278
+
279
+ /**
280
+ * @param {string} value
281
+ * @return {!proto.gateway.web.v1.ListAlertsRequest} returns this
282
+ */
283
+ proto.gateway.web.v1.ListAlertsRequest.prototype.setOrganizationId = function(value) {
284
+ return jspb.Message.setProto3StringField(this, 1, value);
285
+ };
286
+
287
+
288
+ /**
289
+ * optional int32 page_size = 2;
290
+ * @return {number}
291
+ */
292
+ proto.gateway.web.v1.ListAlertsRequest.prototype.getPageSize = function() {
293
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
294
+ };
295
+
296
+
297
+ /**
298
+ * @param {number} value
299
+ * @return {!proto.gateway.web.v1.ListAlertsRequest} returns this
300
+ */
301
+ proto.gateway.web.v1.ListAlertsRequest.prototype.setPageSize = function(value) {
302
+ return jspb.Message.setProto3IntField(this, 2, value);
303
+ };
304
+
305
+
306
+ /**
307
+ * optional string page_token = 3;
308
+ * @return {string}
309
+ */
310
+ proto.gateway.web.v1.ListAlertsRequest.prototype.getPageToken = function() {
311
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
312
+ };
313
+
314
+
315
+ /**
316
+ * @param {string} value
317
+ * @return {!proto.gateway.web.v1.ListAlertsRequest} returns this
318
+ */
319
+ proto.gateway.web.v1.ListAlertsRequest.prototype.setPageToken = function(value) {
320
+ return jspb.Message.setProto3StringField(this, 3, value);
321
+ };
322
+
323
+
324
+
325
+ /**
326
+ * List of repeated fields within this message type.
327
+ * @private {!Array<number>}
328
+ * @const
329
+ */
330
+ proto.gateway.web.v1.ListAlertsResponse.repeatedFields_ = [2];
331
+
332
+
333
+
334
+ if (jspb.Message.GENERATE_TO_OBJECT) {
335
+ /**
336
+ * Creates an object representation of this proto.
337
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
338
+ * Optional fields that are not set will be set to undefined.
339
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
340
+ * For the list of reserved names please see:
341
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
342
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
343
+ * JSPB instance for transitional soy proto support:
344
+ * http://goto/soy-param-migration
345
+ * @return {!Object}
346
+ */
347
+ proto.gateway.web.v1.ListAlertsResponse.prototype.toObject = function(opt_includeInstance) {
348
+ return proto.gateway.web.v1.ListAlertsResponse.toObject(opt_includeInstance, this);
349
+ };
350
+
351
+
352
+ /**
353
+ * Static version of the {@see toObject} method.
354
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
355
+ * the JSPB instance for transitional soy proto support:
356
+ * http://goto/soy-param-migration
357
+ * @param {!proto.gateway.web.v1.ListAlertsResponse} msg The msg instance to transform.
358
+ * @return {!Object}
359
+ * @suppress {unusedLocalVariables} f is only used for nested messages
360
+ */
361
+ proto.gateway.web.v1.ListAlertsResponse.toObject = function(includeInstance, msg) {
362
+ var f, obj = {
363
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
364
+ alertsList: jspb.Message.toObjectList(msg.getAlertsList(),
365
+ proto.gateway.web.v1.NotificationAlert.toObject, includeInstance),
366
+ nextPageToken: jspb.Message.getFieldWithDefault(msg, 3, ""),
367
+ unreadCount: jspb.Message.getFieldWithDefault(msg, 4, 0)
368
+ };
369
+
370
+ if (includeInstance) {
371
+ obj.$jspbMessageInstance = msg;
372
+ }
373
+ return obj;
374
+ };
375
+ }
376
+
377
+
378
+ /**
379
+ * Deserializes binary data (in protobuf wire format).
380
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
381
+ * @return {!proto.gateway.web.v1.ListAlertsResponse}
382
+ */
383
+ proto.gateway.web.v1.ListAlertsResponse.deserializeBinary = function(bytes) {
384
+ var reader = new jspb.BinaryReader(bytes);
385
+ var msg = new proto.gateway.web.v1.ListAlertsResponse;
386
+ return proto.gateway.web.v1.ListAlertsResponse.deserializeBinaryFromReader(msg, reader);
387
+ };
388
+
389
+
390
+ /**
391
+ * Deserializes binary data (in protobuf wire format) from the
392
+ * given reader into the given message object.
393
+ * @param {!proto.gateway.web.v1.ListAlertsResponse} msg The message object to deserialize into.
394
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
395
+ * @return {!proto.gateway.web.v1.ListAlertsResponse}
396
+ */
397
+ proto.gateway.web.v1.ListAlertsResponse.deserializeBinaryFromReader = function(msg, reader) {
398
+ while (reader.nextField()) {
399
+ if (reader.isEndGroup()) {
400
+ break;
401
+ }
402
+ var field = reader.getFieldNumber();
403
+ switch (field) {
404
+ case 1:
405
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
406
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
407
+ msg.setStatus(value);
408
+ break;
409
+ case 2:
410
+ var value = new proto.gateway.web.v1.NotificationAlert;
411
+ reader.readMessage(value,proto.gateway.web.v1.NotificationAlert.deserializeBinaryFromReader);
412
+ msg.addAlerts(value);
413
+ break;
414
+ case 3:
415
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
416
+ msg.setNextPageToken(value);
417
+ break;
418
+ case 4:
419
+ var value = /** @type {number} */ (reader.readInt32());
420
+ msg.setUnreadCount(value);
421
+ break;
422
+ default:
423
+ reader.skipField();
424
+ break;
425
+ }
426
+ }
427
+ return msg;
428
+ };
429
+
430
+
431
+ /**
432
+ * Serializes the message to binary data (in protobuf wire format).
433
+ * @return {!Uint8Array}
434
+ */
435
+ proto.gateway.web.v1.ListAlertsResponse.prototype.serializeBinary = function() {
436
+ var writer = new jspb.BinaryWriter();
437
+ proto.gateway.web.v1.ListAlertsResponse.serializeBinaryToWriter(this, writer);
438
+ return writer.getResultBuffer();
439
+ };
440
+
441
+
442
+ /**
443
+ * Serializes the given message to binary data (in protobuf wire
444
+ * format), writing to the given BinaryWriter.
445
+ * @param {!proto.gateway.web.v1.ListAlertsResponse} message
446
+ * @param {!jspb.BinaryWriter} writer
447
+ * @suppress {unusedLocalVariables} f is only used for nested messages
448
+ */
449
+ proto.gateway.web.v1.ListAlertsResponse.serializeBinaryToWriter = function(message, writer) {
450
+ var f = undefined;
451
+ f = message.getStatus();
452
+ if (f != null) {
453
+ writer.writeMessage(
454
+ 1,
455
+ f,
456
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
457
+ );
458
+ }
459
+ f = message.getAlertsList();
460
+ if (f.length > 0) {
461
+ writer.writeRepeatedMessage(
462
+ 2,
463
+ f,
464
+ proto.gateway.web.v1.NotificationAlert.serializeBinaryToWriter
465
+ );
466
+ }
467
+ f = message.getNextPageToken();
468
+ if (f.length > 0) {
469
+ writer.writeString(
470
+ 3,
471
+ f
472
+ );
473
+ }
474
+ f = message.getUnreadCount();
475
+ if (f !== 0) {
476
+ writer.writeInt32(
477
+ 4,
478
+ f
479
+ );
480
+ }
481
+ };
482
+
483
+
484
+ /**
485
+ * optional gateway.common.v1.ResponseStatus status = 1;
486
+ * @return {?proto.gateway.common.v1.ResponseStatus}
487
+ */
488
+ proto.gateway.web.v1.ListAlertsResponse.prototype.getStatus = function() {
489
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
490
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
491
+ };
492
+
493
+
494
+ /**
495
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
496
+ * @return {!proto.gateway.web.v1.ListAlertsResponse} returns this
497
+ */
498
+ proto.gateway.web.v1.ListAlertsResponse.prototype.setStatus = function(value) {
499
+ return jspb.Message.setWrapperField(this, 1, value);
500
+ };
501
+
502
+
503
+ /**
504
+ * Clears the message field making it undefined.
505
+ * @return {!proto.gateway.web.v1.ListAlertsResponse} returns this
506
+ */
507
+ proto.gateway.web.v1.ListAlertsResponse.prototype.clearStatus = function() {
508
+ return this.setStatus(undefined);
509
+ };
510
+
511
+
512
+ /**
513
+ * Returns whether this field is set.
514
+ * @return {boolean}
515
+ */
516
+ proto.gateway.web.v1.ListAlertsResponse.prototype.hasStatus = function() {
517
+ return jspb.Message.getField(this, 1) != null;
518
+ };
519
+
520
+
521
+ /**
522
+ * repeated NotificationAlert alerts = 2;
523
+ * @return {!Array<!proto.gateway.web.v1.NotificationAlert>}
524
+ */
525
+ proto.gateway.web.v1.ListAlertsResponse.prototype.getAlertsList = function() {
526
+ return /** @type{!Array<!proto.gateway.web.v1.NotificationAlert>} */ (
527
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.NotificationAlert, 2));
528
+ };
529
+
530
+
531
+ /**
532
+ * @param {!Array<!proto.gateway.web.v1.NotificationAlert>} value
533
+ * @return {!proto.gateway.web.v1.ListAlertsResponse} returns this
534
+ */
535
+ proto.gateway.web.v1.ListAlertsResponse.prototype.setAlertsList = function(value) {
536
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
537
+ };
538
+
539
+
540
+ /**
541
+ * @param {!proto.gateway.web.v1.NotificationAlert=} opt_value
542
+ * @param {number=} opt_index
543
+ * @return {!proto.gateway.web.v1.NotificationAlert}
544
+ */
545
+ proto.gateway.web.v1.ListAlertsResponse.prototype.addAlerts = function(opt_value, opt_index) {
546
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.gateway.web.v1.NotificationAlert, opt_index);
547
+ };
548
+
549
+
550
+ /**
551
+ * Clears the list making it empty but non-null.
552
+ * @return {!proto.gateway.web.v1.ListAlertsResponse} returns this
553
+ */
554
+ proto.gateway.web.v1.ListAlertsResponse.prototype.clearAlertsList = function() {
555
+ return this.setAlertsList([]);
556
+ };
557
+
558
+
559
+ /**
560
+ * optional string next_page_token = 3;
561
+ * @return {string}
562
+ */
563
+ proto.gateway.web.v1.ListAlertsResponse.prototype.getNextPageToken = function() {
564
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
565
+ };
566
+
567
+
568
+ /**
569
+ * @param {string} value
570
+ * @return {!proto.gateway.web.v1.ListAlertsResponse} returns this
571
+ */
572
+ proto.gateway.web.v1.ListAlertsResponse.prototype.setNextPageToken = function(value) {
573
+ return jspb.Message.setProto3StringField(this, 3, value);
574
+ };
575
+
576
+
577
+ /**
578
+ * optional int32 unread_count = 4;
579
+ * @return {number}
580
+ */
581
+ proto.gateway.web.v1.ListAlertsResponse.prototype.getUnreadCount = function() {
582
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
583
+ };
584
+
585
+
586
+ /**
587
+ * @param {number} value
588
+ * @return {!proto.gateway.web.v1.ListAlertsResponse} returns this
589
+ */
590
+ proto.gateway.web.v1.ListAlertsResponse.prototype.setUnreadCount = function(value) {
591
+ return jspb.Message.setProto3IntField(this, 4, value);
592
+ };
593
+
594
+
595
+
596
+
597
+
598
+ if (jspb.Message.GENERATE_TO_OBJECT) {
599
+ /**
600
+ * Creates an object representation of this proto.
601
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
602
+ * Optional fields that are not set will be set to undefined.
603
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
604
+ * For the list of reserved names please see:
605
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
606
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
607
+ * JSPB instance for transitional soy proto support:
608
+ * http://goto/soy-param-migration
609
+ * @return {!Object}
610
+ */
611
+ proto.gateway.web.v1.NotificationAlert.prototype.toObject = function(opt_includeInstance) {
612
+ return proto.gateway.web.v1.NotificationAlert.toObject(opt_includeInstance, this);
613
+ };
614
+
615
+
616
+ /**
617
+ * Static version of the {@see toObject} method.
618
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
619
+ * the JSPB instance for transitional soy proto support:
620
+ * http://goto/soy-param-migration
621
+ * @param {!proto.gateway.web.v1.NotificationAlert} msg The msg instance to transform.
622
+ * @return {!Object}
623
+ * @suppress {unusedLocalVariables} f is only used for nested messages
624
+ */
625
+ proto.gateway.web.v1.NotificationAlert.toObject = function(includeInstance, msg) {
626
+ var f, obj = {
627
+ alertId: jspb.Message.getFieldWithDefault(msg, 1, ""),
628
+ kind: jspb.Message.getFieldWithDefault(msg, 2, ""),
629
+ title: jspb.Message.getFieldWithDefault(msg, 3, ""),
630
+ body: jspb.Message.getFieldWithDefault(msg, 4, ""),
631
+ linkPath: jspb.Message.getFieldWithDefault(msg, 5, ""),
632
+ occurredAt: (f = msg.getOccurredAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
633
+ read: jspb.Message.getBooleanFieldWithDefault(msg, 7, false)
634
+ };
635
+
636
+ if (includeInstance) {
637
+ obj.$jspbMessageInstance = msg;
638
+ }
639
+ return obj;
640
+ };
641
+ }
642
+
643
+
644
+ /**
645
+ * Deserializes binary data (in protobuf wire format).
646
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
647
+ * @return {!proto.gateway.web.v1.NotificationAlert}
648
+ */
649
+ proto.gateway.web.v1.NotificationAlert.deserializeBinary = function(bytes) {
650
+ var reader = new jspb.BinaryReader(bytes);
651
+ var msg = new proto.gateway.web.v1.NotificationAlert;
652
+ return proto.gateway.web.v1.NotificationAlert.deserializeBinaryFromReader(msg, reader);
653
+ };
654
+
655
+
656
+ /**
657
+ * Deserializes binary data (in protobuf wire format) from the
658
+ * given reader into the given message object.
659
+ * @param {!proto.gateway.web.v1.NotificationAlert} msg The message object to deserialize into.
660
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
661
+ * @return {!proto.gateway.web.v1.NotificationAlert}
662
+ */
663
+ proto.gateway.web.v1.NotificationAlert.deserializeBinaryFromReader = function(msg, reader) {
664
+ while (reader.nextField()) {
665
+ if (reader.isEndGroup()) {
666
+ break;
667
+ }
668
+ var field = reader.getFieldNumber();
669
+ switch (field) {
670
+ case 1:
671
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
672
+ msg.setAlertId(value);
673
+ break;
674
+ case 2:
675
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
676
+ msg.setKind(value);
677
+ break;
678
+ case 3:
679
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
680
+ msg.setTitle(value);
681
+ break;
682
+ case 4:
683
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
684
+ msg.setBody(value);
685
+ break;
686
+ case 5:
687
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
688
+ msg.setLinkPath(value);
689
+ break;
690
+ case 6:
691
+ var value = new google_protobuf_timestamp_pb.Timestamp;
692
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
693
+ msg.setOccurredAt(value);
694
+ break;
695
+ case 7:
696
+ var value = /** @type {boolean} */ (reader.readBool());
697
+ msg.setRead(value);
698
+ break;
699
+ default:
700
+ reader.skipField();
701
+ break;
702
+ }
703
+ }
704
+ return msg;
705
+ };
706
+
707
+
708
+ /**
709
+ * Serializes the message to binary data (in protobuf wire format).
710
+ * @return {!Uint8Array}
711
+ */
712
+ proto.gateway.web.v1.NotificationAlert.prototype.serializeBinary = function() {
713
+ var writer = new jspb.BinaryWriter();
714
+ proto.gateway.web.v1.NotificationAlert.serializeBinaryToWriter(this, writer);
715
+ return writer.getResultBuffer();
716
+ };
717
+
718
+
719
+ /**
720
+ * Serializes the given message to binary data (in protobuf wire
721
+ * format), writing to the given BinaryWriter.
722
+ * @param {!proto.gateway.web.v1.NotificationAlert} message
723
+ * @param {!jspb.BinaryWriter} writer
724
+ * @suppress {unusedLocalVariables} f is only used for nested messages
725
+ */
726
+ proto.gateway.web.v1.NotificationAlert.serializeBinaryToWriter = function(message, writer) {
727
+ var f = undefined;
728
+ f = message.getAlertId();
729
+ if (f.length > 0) {
730
+ writer.writeString(
731
+ 1,
732
+ f
733
+ );
734
+ }
735
+ f = message.getKind();
736
+ if (f.length > 0) {
737
+ writer.writeString(
738
+ 2,
739
+ f
740
+ );
741
+ }
742
+ f = message.getTitle();
743
+ if (f.length > 0) {
744
+ writer.writeString(
745
+ 3,
746
+ f
747
+ );
748
+ }
749
+ f = message.getBody();
750
+ if (f.length > 0) {
751
+ writer.writeString(
752
+ 4,
753
+ f
754
+ );
755
+ }
756
+ f = message.getLinkPath();
757
+ if (f.length > 0) {
758
+ writer.writeString(
759
+ 5,
760
+ f
761
+ );
762
+ }
763
+ f = message.getOccurredAt();
764
+ if (f != null) {
765
+ writer.writeMessage(
766
+ 6,
767
+ f,
768
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
769
+ );
770
+ }
771
+ f = message.getRead();
772
+ if (f) {
773
+ writer.writeBool(
774
+ 7,
775
+ f
776
+ );
777
+ }
778
+ };
779
+
780
+
781
+ /**
782
+ * optional string alert_id = 1;
783
+ * @return {string}
784
+ */
785
+ proto.gateway.web.v1.NotificationAlert.prototype.getAlertId = function() {
786
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
787
+ };
788
+
789
+
790
+ /**
791
+ * @param {string} value
792
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
793
+ */
794
+ proto.gateway.web.v1.NotificationAlert.prototype.setAlertId = function(value) {
795
+ return jspb.Message.setProto3StringField(this, 1, value);
796
+ };
797
+
798
+
799
+ /**
800
+ * optional string kind = 2;
801
+ * @return {string}
802
+ */
803
+ proto.gateway.web.v1.NotificationAlert.prototype.getKind = function() {
804
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
805
+ };
806
+
807
+
808
+ /**
809
+ * @param {string} value
810
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
811
+ */
812
+ proto.gateway.web.v1.NotificationAlert.prototype.setKind = function(value) {
813
+ return jspb.Message.setProto3StringField(this, 2, value);
814
+ };
815
+
816
+
817
+ /**
818
+ * optional string title = 3;
819
+ * @return {string}
820
+ */
821
+ proto.gateway.web.v1.NotificationAlert.prototype.getTitle = function() {
822
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
823
+ };
824
+
825
+
826
+ /**
827
+ * @param {string} value
828
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
829
+ */
830
+ proto.gateway.web.v1.NotificationAlert.prototype.setTitle = function(value) {
831
+ return jspb.Message.setProto3StringField(this, 3, value);
832
+ };
833
+
834
+
835
+ /**
836
+ * optional string body = 4;
837
+ * @return {string}
838
+ */
839
+ proto.gateway.web.v1.NotificationAlert.prototype.getBody = function() {
840
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
841
+ };
842
+
843
+
844
+ /**
845
+ * @param {string} value
846
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
847
+ */
848
+ proto.gateway.web.v1.NotificationAlert.prototype.setBody = function(value) {
849
+ return jspb.Message.setProto3StringField(this, 4, value);
850
+ };
851
+
852
+
853
+ /**
854
+ * optional string link_path = 5;
855
+ * @return {string}
856
+ */
857
+ proto.gateway.web.v1.NotificationAlert.prototype.getLinkPath = function() {
858
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
859
+ };
860
+
861
+
862
+ /**
863
+ * @param {string} value
864
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
865
+ */
866
+ proto.gateway.web.v1.NotificationAlert.prototype.setLinkPath = function(value) {
867
+ return jspb.Message.setProto3StringField(this, 5, value);
868
+ };
869
+
870
+
871
+ /**
872
+ * optional google.protobuf.Timestamp occurred_at = 6;
873
+ * @return {?proto.google.protobuf.Timestamp}
874
+ */
875
+ proto.gateway.web.v1.NotificationAlert.prototype.getOccurredAt = function() {
876
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
877
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
878
+ };
879
+
880
+
881
+ /**
882
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
883
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
884
+ */
885
+ proto.gateway.web.v1.NotificationAlert.prototype.setOccurredAt = function(value) {
886
+ return jspb.Message.setWrapperField(this, 6, value);
887
+ };
888
+
889
+
890
+ /**
891
+ * Clears the message field making it undefined.
892
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
893
+ */
894
+ proto.gateway.web.v1.NotificationAlert.prototype.clearOccurredAt = function() {
895
+ return this.setOccurredAt(undefined);
896
+ };
897
+
898
+
899
+ /**
900
+ * Returns whether this field is set.
901
+ * @return {boolean}
902
+ */
903
+ proto.gateway.web.v1.NotificationAlert.prototype.hasOccurredAt = function() {
904
+ return jspb.Message.getField(this, 6) != null;
905
+ };
906
+
907
+
908
+ /**
909
+ * optional bool read = 7;
910
+ * @return {boolean}
911
+ */
912
+ proto.gateway.web.v1.NotificationAlert.prototype.getRead = function() {
913
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
914
+ };
915
+
916
+
917
+ /**
918
+ * @param {boolean} value
919
+ * @return {!proto.gateway.web.v1.NotificationAlert} returns this
920
+ */
921
+ proto.gateway.web.v1.NotificationAlert.prototype.setRead = function(value) {
922
+ return jspb.Message.setProto3BooleanField(this, 7, value);
923
+ };
924
+
925
+
926
+
927
+ /**
928
+ * List of repeated fields within this message type.
929
+ * @private {!Array<number>}
930
+ * @const
931
+ */
932
+ proto.gateway.web.v1.MarkAlertsReadRequest.repeatedFields_ = [2];
933
+
934
+
935
+
936
+ if (jspb.Message.GENERATE_TO_OBJECT) {
937
+ /**
938
+ * Creates an object representation of this proto.
939
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
940
+ * Optional fields that are not set will be set to undefined.
941
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
942
+ * For the list of reserved names please see:
943
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
944
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
945
+ * JSPB instance for transitional soy proto support:
946
+ * http://goto/soy-param-migration
947
+ * @return {!Object}
948
+ */
949
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.toObject = function(opt_includeInstance) {
950
+ return proto.gateway.web.v1.MarkAlertsReadRequest.toObject(opt_includeInstance, this);
951
+ };
952
+
953
+
954
+ /**
955
+ * Static version of the {@see toObject} method.
956
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
957
+ * the JSPB instance for transitional soy proto support:
958
+ * http://goto/soy-param-migration
959
+ * @param {!proto.gateway.web.v1.MarkAlertsReadRequest} msg The msg instance to transform.
960
+ * @return {!Object}
961
+ * @suppress {unusedLocalVariables} f is only used for nested messages
962
+ */
963
+ proto.gateway.web.v1.MarkAlertsReadRequest.toObject = function(includeInstance, msg) {
964
+ var f, obj = {
965
+ organizationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
966
+ alertIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
967
+ all: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
968
+ };
969
+
970
+ if (includeInstance) {
971
+ obj.$jspbMessageInstance = msg;
972
+ }
973
+ return obj;
974
+ };
975
+ }
976
+
977
+
978
+ /**
979
+ * Deserializes binary data (in protobuf wire format).
980
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
981
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest}
982
+ */
983
+ proto.gateway.web.v1.MarkAlertsReadRequest.deserializeBinary = function(bytes) {
984
+ var reader = new jspb.BinaryReader(bytes);
985
+ var msg = new proto.gateway.web.v1.MarkAlertsReadRequest;
986
+ return proto.gateway.web.v1.MarkAlertsReadRequest.deserializeBinaryFromReader(msg, reader);
987
+ };
988
+
989
+
990
+ /**
991
+ * Deserializes binary data (in protobuf wire format) from the
992
+ * given reader into the given message object.
993
+ * @param {!proto.gateway.web.v1.MarkAlertsReadRequest} msg The message object to deserialize into.
994
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
995
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest}
996
+ */
997
+ proto.gateway.web.v1.MarkAlertsReadRequest.deserializeBinaryFromReader = function(msg, reader) {
998
+ while (reader.nextField()) {
999
+ if (reader.isEndGroup()) {
1000
+ break;
1001
+ }
1002
+ var field = reader.getFieldNumber();
1003
+ switch (field) {
1004
+ case 1:
1005
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1006
+ msg.setOrganizationId(value);
1007
+ break;
1008
+ case 2:
1009
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1010
+ msg.addAlertIds(value);
1011
+ break;
1012
+ case 3:
1013
+ var value = /** @type {boolean} */ (reader.readBool());
1014
+ msg.setAll(value);
1015
+ break;
1016
+ default:
1017
+ reader.skipField();
1018
+ break;
1019
+ }
1020
+ }
1021
+ return msg;
1022
+ };
1023
+
1024
+
1025
+ /**
1026
+ * Serializes the message to binary data (in protobuf wire format).
1027
+ * @return {!Uint8Array}
1028
+ */
1029
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.serializeBinary = function() {
1030
+ var writer = new jspb.BinaryWriter();
1031
+ proto.gateway.web.v1.MarkAlertsReadRequest.serializeBinaryToWriter(this, writer);
1032
+ return writer.getResultBuffer();
1033
+ };
1034
+
1035
+
1036
+ /**
1037
+ * Serializes the given message to binary data (in protobuf wire
1038
+ * format), writing to the given BinaryWriter.
1039
+ * @param {!proto.gateway.web.v1.MarkAlertsReadRequest} message
1040
+ * @param {!jspb.BinaryWriter} writer
1041
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1042
+ */
1043
+ proto.gateway.web.v1.MarkAlertsReadRequest.serializeBinaryToWriter = function(message, writer) {
1044
+ var f = undefined;
1045
+ f = message.getOrganizationId();
1046
+ if (f.length > 0) {
1047
+ writer.writeString(
1048
+ 1,
1049
+ f
1050
+ );
1051
+ }
1052
+ f = message.getAlertIdsList();
1053
+ if (f.length > 0) {
1054
+ writer.writeRepeatedString(
1055
+ 2,
1056
+ f
1057
+ );
1058
+ }
1059
+ f = message.getAll();
1060
+ if (f) {
1061
+ writer.writeBool(
1062
+ 3,
1063
+ f
1064
+ );
1065
+ }
1066
+ };
1067
+
1068
+
1069
+ /**
1070
+ * optional string organization_id = 1;
1071
+ * @return {string}
1072
+ */
1073
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.getOrganizationId = function() {
1074
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1075
+ };
1076
+
1077
+
1078
+ /**
1079
+ * @param {string} value
1080
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest} returns this
1081
+ */
1082
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.setOrganizationId = function(value) {
1083
+ return jspb.Message.setProto3StringField(this, 1, value);
1084
+ };
1085
+
1086
+
1087
+ /**
1088
+ * repeated string alert_ids = 2;
1089
+ * @return {!Array<string>}
1090
+ */
1091
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.getAlertIdsList = function() {
1092
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
1093
+ };
1094
+
1095
+
1096
+ /**
1097
+ * @param {!Array<string>} value
1098
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest} returns this
1099
+ */
1100
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.setAlertIdsList = function(value) {
1101
+ return jspb.Message.setField(this, 2, value || []);
1102
+ };
1103
+
1104
+
1105
+ /**
1106
+ * @param {string} value
1107
+ * @param {number=} opt_index
1108
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest} returns this
1109
+ */
1110
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.addAlertIds = function(value, opt_index) {
1111
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1112
+ };
1113
+
1114
+
1115
+ /**
1116
+ * Clears the list making it empty but non-null.
1117
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest} returns this
1118
+ */
1119
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.clearAlertIdsList = function() {
1120
+ return this.setAlertIdsList([]);
1121
+ };
1122
+
1123
+
1124
+ /**
1125
+ * optional bool all = 3;
1126
+ * @return {boolean}
1127
+ */
1128
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.getAll = function() {
1129
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
1130
+ };
1131
+
1132
+
1133
+ /**
1134
+ * @param {boolean} value
1135
+ * @return {!proto.gateway.web.v1.MarkAlertsReadRequest} returns this
1136
+ */
1137
+ proto.gateway.web.v1.MarkAlertsReadRequest.prototype.setAll = function(value) {
1138
+ return jspb.Message.setProto3BooleanField(this, 3, value);
1139
+ };
1140
+
1141
+
1142
+
1143
+
1144
+
1145
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1146
+ /**
1147
+ * Creates an object representation of this proto.
1148
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1149
+ * Optional fields that are not set will be set to undefined.
1150
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1151
+ * For the list of reserved names please see:
1152
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1153
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1154
+ * JSPB instance for transitional soy proto support:
1155
+ * http://goto/soy-param-migration
1156
+ * @return {!Object}
1157
+ */
1158
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.toObject = function(opt_includeInstance) {
1159
+ return proto.gateway.web.v1.MarkAlertsReadResponse.toObject(opt_includeInstance, this);
1160
+ };
1161
+
1162
+
1163
+ /**
1164
+ * Static version of the {@see toObject} method.
1165
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1166
+ * the JSPB instance for transitional soy proto support:
1167
+ * http://goto/soy-param-migration
1168
+ * @param {!proto.gateway.web.v1.MarkAlertsReadResponse} msg The msg instance to transform.
1169
+ * @return {!Object}
1170
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1171
+ */
1172
+ proto.gateway.web.v1.MarkAlertsReadResponse.toObject = function(includeInstance, msg) {
1173
+ var f, obj = {
1174
+ status: (f = msg.getStatus()) && proto_gateway_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1175
+ unreadCount: jspb.Message.getFieldWithDefault(msg, 2, 0)
1176
+ };
1177
+
1178
+ if (includeInstance) {
1179
+ obj.$jspbMessageInstance = msg;
1180
+ }
1181
+ return obj;
1182
+ };
1183
+ }
1184
+
1185
+
1186
+ /**
1187
+ * Deserializes binary data (in protobuf wire format).
1188
+ * @param {jspb.binary.bytesource.ByteSource} bytes The bytes to deserialize.
1189
+ * @return {!proto.gateway.web.v1.MarkAlertsReadResponse}
1190
+ */
1191
+ proto.gateway.web.v1.MarkAlertsReadResponse.deserializeBinary = function(bytes) {
1192
+ var reader = new jspb.BinaryReader(bytes);
1193
+ var msg = new proto.gateway.web.v1.MarkAlertsReadResponse;
1194
+ return proto.gateway.web.v1.MarkAlertsReadResponse.deserializeBinaryFromReader(msg, reader);
1195
+ };
1196
+
1197
+
1198
+ /**
1199
+ * Deserializes binary data (in protobuf wire format) from the
1200
+ * given reader into the given message object.
1201
+ * @param {!proto.gateway.web.v1.MarkAlertsReadResponse} msg The message object to deserialize into.
1202
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1203
+ * @return {!proto.gateway.web.v1.MarkAlertsReadResponse}
1204
+ */
1205
+ proto.gateway.web.v1.MarkAlertsReadResponse.deserializeBinaryFromReader = function(msg, reader) {
1206
+ while (reader.nextField()) {
1207
+ if (reader.isEndGroup()) {
1208
+ break;
1209
+ }
1210
+ var field = reader.getFieldNumber();
1211
+ switch (field) {
1212
+ case 1:
1213
+ var value = new proto_gateway_common_v1_status_pb.ResponseStatus;
1214
+ reader.readMessage(value,proto_gateway_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1215
+ msg.setStatus(value);
1216
+ break;
1217
+ case 2:
1218
+ var value = /** @type {number} */ (reader.readInt32());
1219
+ msg.setUnreadCount(value);
1220
+ break;
1221
+ default:
1222
+ reader.skipField();
1223
+ break;
1224
+ }
1225
+ }
1226
+ return msg;
1227
+ };
1228
+
1229
+
1230
+ /**
1231
+ * Serializes the message to binary data (in protobuf wire format).
1232
+ * @return {!Uint8Array}
1233
+ */
1234
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.serializeBinary = function() {
1235
+ var writer = new jspb.BinaryWriter();
1236
+ proto.gateway.web.v1.MarkAlertsReadResponse.serializeBinaryToWriter(this, writer);
1237
+ return writer.getResultBuffer();
1238
+ };
1239
+
1240
+
1241
+ /**
1242
+ * Serializes the given message to binary data (in protobuf wire
1243
+ * format), writing to the given BinaryWriter.
1244
+ * @param {!proto.gateway.web.v1.MarkAlertsReadResponse} message
1245
+ * @param {!jspb.BinaryWriter} writer
1246
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1247
+ */
1248
+ proto.gateway.web.v1.MarkAlertsReadResponse.serializeBinaryToWriter = function(message, writer) {
1249
+ var f = undefined;
1250
+ f = message.getStatus();
1251
+ if (f != null) {
1252
+ writer.writeMessage(
1253
+ 1,
1254
+ f,
1255
+ proto_gateway_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1256
+ );
1257
+ }
1258
+ f = message.getUnreadCount();
1259
+ if (f !== 0) {
1260
+ writer.writeInt32(
1261
+ 2,
1262
+ f
1263
+ );
1264
+ }
1265
+ };
1266
+
1267
+
1268
+ /**
1269
+ * optional gateway.common.v1.ResponseStatus status = 1;
1270
+ * @return {?proto.gateway.common.v1.ResponseStatus}
1271
+ */
1272
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.getStatus = function() {
1273
+ return /** @type{?proto.gateway.common.v1.ResponseStatus} */ (
1274
+ jspb.Message.getWrapperField(this, proto_gateway_common_v1_status_pb.ResponseStatus, 1));
1275
+ };
1276
+
1277
+
1278
+ /**
1279
+ * @param {?proto.gateway.common.v1.ResponseStatus|undefined} value
1280
+ * @return {!proto.gateway.web.v1.MarkAlertsReadResponse} returns this
1281
+ */
1282
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.setStatus = function(value) {
1283
+ return jspb.Message.setWrapperField(this, 1, value);
1284
+ };
1285
+
1286
+
1287
+ /**
1288
+ * Clears the message field making it undefined.
1289
+ * @return {!proto.gateway.web.v1.MarkAlertsReadResponse} returns this
1290
+ */
1291
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.clearStatus = function() {
1292
+ return this.setStatus(undefined);
1293
+ };
1294
+
1295
+
1296
+ /**
1297
+ * Returns whether this field is set.
1298
+ * @return {boolean}
1299
+ */
1300
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.hasStatus = function() {
1301
+ return jspb.Message.getField(this, 1) != null;
1302
+ };
1303
+
1304
+
1305
+ /**
1306
+ * optional int32 unread_count = 2;
1307
+ * @return {number}
1308
+ */
1309
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.getUnreadCount = function() {
1310
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1311
+ };
1312
+
1313
+
1314
+ /**
1315
+ * @param {number} value
1316
+ * @return {!proto.gateway.web.v1.MarkAlertsReadResponse} returns this
1317
+ */
1318
+ proto.gateway.web.v1.MarkAlertsReadResponse.prototype.setUnreadCount = function(value) {
1319
+ return jspb.Message.setProto3IntField(this, 2, value);
1320
+ };
1321
+
1322
+
1323
+ goog.object.extend(exports, proto.gateway.web.v1);