protobuf-platform 1.0.183 → 1.0.184
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.
@@ -10,7 +10,7 @@ service Notification {
|
|
10
10
|
//rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
|
11
11
|
//rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
|
12
12
|
//rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
|
13
|
-
|
13
|
+
rpc readListNotifications(PaginationRequest) returns (NotificationItemsResponse);
|
14
14
|
rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
|
15
15
|
rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
|
16
16
|
}
|
@@ -56,4 +56,17 @@ message UserNotificationItemsResponse {
|
|
56
56
|
repeated UserNotificationItem items = 1;
|
57
57
|
optional int32 total_pages = 2;
|
58
58
|
optional int32 total_items = 3;
|
59
|
+
}
|
60
|
+
message NotificationItem {
|
61
|
+
int32 id = 1;
|
62
|
+
string title = 2;
|
63
|
+
string content = 3;
|
64
|
+
bool is_active = 4;
|
65
|
+
string type = 5;
|
66
|
+
optional string created = 6;
|
67
|
+
}
|
68
|
+
message NotificationItemsResponse {
|
69
|
+
repeated NotificationItem items = 1;
|
70
|
+
optional int32 total_pages = 2;
|
71
|
+
optional int32 total_items = 3;
|
59
72
|
}
|
@@ -26,6 +26,17 @@ function deserialize_notification_GetFileRequest(buffer_arg) {
|
|
26
26
|
return notification_pb.GetFileRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
27
27
|
}
|
28
28
|
|
29
|
+
function serialize_notification_NotificationItemsResponse(arg) {
|
30
|
+
if (!(arg instanceof notification_pb.NotificationItemsResponse)) {
|
31
|
+
throw new Error('Expected argument of type notification.NotificationItemsResponse');
|
32
|
+
}
|
33
|
+
return Buffer.from(arg.serializeBinary());
|
34
|
+
}
|
35
|
+
|
36
|
+
function deserialize_notification_NotificationItemsResponse(buffer_arg) {
|
37
|
+
return notification_pb.NotificationItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
38
|
+
}
|
39
|
+
|
29
40
|
function serialize_notification_NotificationStatusResponse(arg) {
|
30
41
|
if (!(arg instanceof notification_pb.NotificationStatusResponse)) {
|
31
42
|
throw new Error('Expected argument of type notification.NotificationStatusResponse');
|
@@ -121,8 +132,18 @@ var NotificationService = exports.NotificationService = {
|
|
121
132
|
// rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
|
122
133
|
// rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
|
123
134
|
// rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
|
124
|
-
|
125
|
-
|
135
|
+
readListNotifications: {
|
136
|
+
path: '/notification.Notification/readListNotifications',
|
137
|
+
requestStream: false,
|
138
|
+
responseStream: false,
|
139
|
+
requestType: notification_pb.PaginationRequest,
|
140
|
+
responseType: notification_pb.NotificationItemsResponse,
|
141
|
+
requestSerialize: serialize_notification_PaginationRequest,
|
142
|
+
requestDeserialize: deserialize_notification_PaginationRequest,
|
143
|
+
responseSerialize: serialize_notification_NotificationItemsResponse,
|
144
|
+
responseDeserialize: deserialize_notification_NotificationItemsResponse,
|
145
|
+
},
|
146
|
+
sendNotificationToUsers: {
|
126
147
|
path: '/notification.Notification/sendNotificationToUsers',
|
127
148
|
requestStream: false,
|
128
149
|
responseStream: false,
|
@@ -23,6 +23,8 @@ var global = (function() {
|
|
23
23
|
|
24
24
|
goog.exportSymbol('proto.notification.File', null, global);
|
25
25
|
goog.exportSymbol('proto.notification.GetFileRequest', null, global);
|
26
|
+
goog.exportSymbol('proto.notification.NotificationItem', null, global);
|
27
|
+
goog.exportSymbol('proto.notification.NotificationItemsResponse', null, global);
|
26
28
|
goog.exportSymbol('proto.notification.NotificationSearchRequest', null, global);
|
27
29
|
goog.exportSymbol('proto.notification.NotificationStatusResponse', null, global);
|
28
30
|
goog.exportSymbol('proto.notification.PaginationRequest', null, global);
|
@@ -263,6 +265,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
263
265
|
*/
|
264
266
|
proto.notification.UserNotificationItemsResponse.displayName = 'proto.notification.UserNotificationItemsResponse';
|
265
267
|
}
|
268
|
+
/**
|
269
|
+
* Generated by JsPbCodeGenerator.
|
270
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
271
|
+
* server response, or constructed directly in Javascript. The array is used
|
272
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
273
|
+
* If no data is provided, the constructed object will be empty, but still
|
274
|
+
* valid.
|
275
|
+
* @extends {jspb.Message}
|
276
|
+
* @constructor
|
277
|
+
*/
|
278
|
+
proto.notification.NotificationItem = function(opt_data) {
|
279
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
280
|
+
};
|
281
|
+
goog.inherits(proto.notification.NotificationItem, jspb.Message);
|
282
|
+
if (goog.DEBUG && !COMPILED) {
|
283
|
+
/**
|
284
|
+
* @public
|
285
|
+
* @override
|
286
|
+
*/
|
287
|
+
proto.notification.NotificationItem.displayName = 'proto.notification.NotificationItem';
|
288
|
+
}
|
289
|
+
/**
|
290
|
+
* Generated by JsPbCodeGenerator.
|
291
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
292
|
+
* server response, or constructed directly in Javascript. The array is used
|
293
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
294
|
+
* If no data is provided, the constructed object will be empty, but still
|
295
|
+
* valid.
|
296
|
+
* @extends {jspb.Message}
|
297
|
+
* @constructor
|
298
|
+
*/
|
299
|
+
proto.notification.NotificationItemsResponse = function(opt_data) {
|
300
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.notification.NotificationItemsResponse.repeatedFields_, null);
|
301
|
+
};
|
302
|
+
goog.inherits(proto.notification.NotificationItemsResponse, jspb.Message);
|
303
|
+
if (goog.DEBUG && !COMPILED) {
|
304
|
+
/**
|
305
|
+
* @public
|
306
|
+
* @override
|
307
|
+
*/
|
308
|
+
proto.notification.NotificationItemsResponse.displayName = 'proto.notification.NotificationItemsResponse';
|
309
|
+
}
|
266
310
|
|
267
311
|
|
268
312
|
|
@@ -2429,4 +2473,558 @@ proto.notification.UserNotificationItemsResponse.prototype.hasTotalItems = funct
|
|
2429
2473
|
};
|
2430
2474
|
|
2431
2475
|
|
2476
|
+
|
2477
|
+
|
2478
|
+
|
2479
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
2480
|
+
/**
|
2481
|
+
* Creates an object representation of this proto.
|
2482
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
2483
|
+
* Optional fields that are not set will be set to undefined.
|
2484
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
2485
|
+
* For the list of reserved names please see:
|
2486
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
2487
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
2488
|
+
* JSPB instance for transitional soy proto support:
|
2489
|
+
* http://goto/soy-param-migration
|
2490
|
+
* @return {!Object}
|
2491
|
+
*/
|
2492
|
+
proto.notification.NotificationItem.prototype.toObject = function(opt_includeInstance) {
|
2493
|
+
return proto.notification.NotificationItem.toObject(opt_includeInstance, this);
|
2494
|
+
};
|
2495
|
+
|
2496
|
+
|
2497
|
+
/**
|
2498
|
+
* Static version of the {@see toObject} method.
|
2499
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
2500
|
+
* the JSPB instance for transitional soy proto support:
|
2501
|
+
* http://goto/soy-param-migration
|
2502
|
+
* @param {!proto.notification.NotificationItem} msg The msg instance to transform.
|
2503
|
+
* @return {!Object}
|
2504
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2505
|
+
*/
|
2506
|
+
proto.notification.NotificationItem.toObject = function(includeInstance, msg) {
|
2507
|
+
var f, obj = {
|
2508
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
2509
|
+
title: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
2510
|
+
content: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
2511
|
+
isActive: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
|
2512
|
+
type: jspb.Message.getFieldWithDefault(msg, 5, ""),
|
2513
|
+
created: jspb.Message.getFieldWithDefault(msg, 6, "")
|
2514
|
+
};
|
2515
|
+
|
2516
|
+
if (includeInstance) {
|
2517
|
+
obj.$jspbMessageInstance = msg;
|
2518
|
+
}
|
2519
|
+
return obj;
|
2520
|
+
};
|
2521
|
+
}
|
2522
|
+
|
2523
|
+
|
2524
|
+
/**
|
2525
|
+
* Deserializes binary data (in protobuf wire format).
|
2526
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2527
|
+
* @return {!proto.notification.NotificationItem}
|
2528
|
+
*/
|
2529
|
+
proto.notification.NotificationItem.deserializeBinary = function(bytes) {
|
2530
|
+
var reader = new jspb.BinaryReader(bytes);
|
2531
|
+
var msg = new proto.notification.NotificationItem;
|
2532
|
+
return proto.notification.NotificationItem.deserializeBinaryFromReader(msg, reader);
|
2533
|
+
};
|
2534
|
+
|
2535
|
+
|
2536
|
+
/**
|
2537
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2538
|
+
* given reader into the given message object.
|
2539
|
+
* @param {!proto.notification.NotificationItem} msg The message object to deserialize into.
|
2540
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2541
|
+
* @return {!proto.notification.NotificationItem}
|
2542
|
+
*/
|
2543
|
+
proto.notification.NotificationItem.deserializeBinaryFromReader = function(msg, reader) {
|
2544
|
+
while (reader.nextField()) {
|
2545
|
+
if (reader.isEndGroup()) {
|
2546
|
+
break;
|
2547
|
+
}
|
2548
|
+
var field = reader.getFieldNumber();
|
2549
|
+
switch (field) {
|
2550
|
+
case 1:
|
2551
|
+
var value = /** @type {number} */ (reader.readInt32());
|
2552
|
+
msg.setId(value);
|
2553
|
+
break;
|
2554
|
+
case 2:
|
2555
|
+
var value = /** @type {string} */ (reader.readString());
|
2556
|
+
msg.setTitle(value);
|
2557
|
+
break;
|
2558
|
+
case 3:
|
2559
|
+
var value = /** @type {string} */ (reader.readString());
|
2560
|
+
msg.setContent(value);
|
2561
|
+
break;
|
2562
|
+
case 4:
|
2563
|
+
var value = /** @type {boolean} */ (reader.readBool());
|
2564
|
+
msg.setIsActive(value);
|
2565
|
+
break;
|
2566
|
+
case 5:
|
2567
|
+
var value = /** @type {string} */ (reader.readString());
|
2568
|
+
msg.setType(value);
|
2569
|
+
break;
|
2570
|
+
case 6:
|
2571
|
+
var value = /** @type {string} */ (reader.readString());
|
2572
|
+
msg.setCreated(value);
|
2573
|
+
break;
|
2574
|
+
default:
|
2575
|
+
reader.skipField();
|
2576
|
+
break;
|
2577
|
+
}
|
2578
|
+
}
|
2579
|
+
return msg;
|
2580
|
+
};
|
2581
|
+
|
2582
|
+
|
2583
|
+
/**
|
2584
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2585
|
+
* @return {!Uint8Array}
|
2586
|
+
*/
|
2587
|
+
proto.notification.NotificationItem.prototype.serializeBinary = function() {
|
2588
|
+
var writer = new jspb.BinaryWriter();
|
2589
|
+
proto.notification.NotificationItem.serializeBinaryToWriter(this, writer);
|
2590
|
+
return writer.getResultBuffer();
|
2591
|
+
};
|
2592
|
+
|
2593
|
+
|
2594
|
+
/**
|
2595
|
+
* Serializes the given message to binary data (in protobuf wire
|
2596
|
+
* format), writing to the given BinaryWriter.
|
2597
|
+
* @param {!proto.notification.NotificationItem} message
|
2598
|
+
* @param {!jspb.BinaryWriter} writer
|
2599
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2600
|
+
*/
|
2601
|
+
proto.notification.NotificationItem.serializeBinaryToWriter = function(message, writer) {
|
2602
|
+
var f = undefined;
|
2603
|
+
f = message.getId();
|
2604
|
+
if (f !== 0) {
|
2605
|
+
writer.writeInt32(
|
2606
|
+
1,
|
2607
|
+
f
|
2608
|
+
);
|
2609
|
+
}
|
2610
|
+
f = message.getTitle();
|
2611
|
+
if (f.length > 0) {
|
2612
|
+
writer.writeString(
|
2613
|
+
2,
|
2614
|
+
f
|
2615
|
+
);
|
2616
|
+
}
|
2617
|
+
f = message.getContent();
|
2618
|
+
if (f.length > 0) {
|
2619
|
+
writer.writeString(
|
2620
|
+
3,
|
2621
|
+
f
|
2622
|
+
);
|
2623
|
+
}
|
2624
|
+
f = message.getIsActive();
|
2625
|
+
if (f) {
|
2626
|
+
writer.writeBool(
|
2627
|
+
4,
|
2628
|
+
f
|
2629
|
+
);
|
2630
|
+
}
|
2631
|
+
f = message.getType();
|
2632
|
+
if (f.length > 0) {
|
2633
|
+
writer.writeString(
|
2634
|
+
5,
|
2635
|
+
f
|
2636
|
+
);
|
2637
|
+
}
|
2638
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 6));
|
2639
|
+
if (f != null) {
|
2640
|
+
writer.writeString(
|
2641
|
+
6,
|
2642
|
+
f
|
2643
|
+
);
|
2644
|
+
}
|
2645
|
+
};
|
2646
|
+
|
2647
|
+
|
2648
|
+
/**
|
2649
|
+
* optional int32 id = 1;
|
2650
|
+
* @return {number}
|
2651
|
+
*/
|
2652
|
+
proto.notification.NotificationItem.prototype.getId = function() {
|
2653
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
2654
|
+
};
|
2655
|
+
|
2656
|
+
|
2657
|
+
/**
|
2658
|
+
* @param {number} value
|
2659
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2660
|
+
*/
|
2661
|
+
proto.notification.NotificationItem.prototype.setId = function(value) {
|
2662
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
2663
|
+
};
|
2664
|
+
|
2665
|
+
|
2666
|
+
/**
|
2667
|
+
* optional string title = 2;
|
2668
|
+
* @return {string}
|
2669
|
+
*/
|
2670
|
+
proto.notification.NotificationItem.prototype.getTitle = function() {
|
2671
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
2672
|
+
};
|
2673
|
+
|
2674
|
+
|
2675
|
+
/**
|
2676
|
+
* @param {string} value
|
2677
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2678
|
+
*/
|
2679
|
+
proto.notification.NotificationItem.prototype.setTitle = function(value) {
|
2680
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
2681
|
+
};
|
2682
|
+
|
2683
|
+
|
2684
|
+
/**
|
2685
|
+
* optional string content = 3;
|
2686
|
+
* @return {string}
|
2687
|
+
*/
|
2688
|
+
proto.notification.NotificationItem.prototype.getContent = function() {
|
2689
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
2690
|
+
};
|
2691
|
+
|
2692
|
+
|
2693
|
+
/**
|
2694
|
+
* @param {string} value
|
2695
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2696
|
+
*/
|
2697
|
+
proto.notification.NotificationItem.prototype.setContent = function(value) {
|
2698
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
2699
|
+
};
|
2700
|
+
|
2701
|
+
|
2702
|
+
/**
|
2703
|
+
* optional bool is_active = 4;
|
2704
|
+
* @return {boolean}
|
2705
|
+
*/
|
2706
|
+
proto.notification.NotificationItem.prototype.getIsActive = function() {
|
2707
|
+
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
|
2708
|
+
};
|
2709
|
+
|
2710
|
+
|
2711
|
+
/**
|
2712
|
+
* @param {boolean} value
|
2713
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2714
|
+
*/
|
2715
|
+
proto.notification.NotificationItem.prototype.setIsActive = function(value) {
|
2716
|
+
return jspb.Message.setProto3BooleanField(this, 4, value);
|
2717
|
+
};
|
2718
|
+
|
2719
|
+
|
2720
|
+
/**
|
2721
|
+
* optional string type = 5;
|
2722
|
+
* @return {string}
|
2723
|
+
*/
|
2724
|
+
proto.notification.NotificationItem.prototype.getType = function() {
|
2725
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
2726
|
+
};
|
2727
|
+
|
2728
|
+
|
2729
|
+
/**
|
2730
|
+
* @param {string} value
|
2731
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2732
|
+
*/
|
2733
|
+
proto.notification.NotificationItem.prototype.setType = function(value) {
|
2734
|
+
return jspb.Message.setProto3StringField(this, 5, value);
|
2735
|
+
};
|
2736
|
+
|
2737
|
+
|
2738
|
+
/**
|
2739
|
+
* optional string created = 6;
|
2740
|
+
* @return {string}
|
2741
|
+
*/
|
2742
|
+
proto.notification.NotificationItem.prototype.getCreated = function() {
|
2743
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
|
2744
|
+
};
|
2745
|
+
|
2746
|
+
|
2747
|
+
/**
|
2748
|
+
* @param {string} value
|
2749
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2750
|
+
*/
|
2751
|
+
proto.notification.NotificationItem.prototype.setCreated = function(value) {
|
2752
|
+
return jspb.Message.setField(this, 6, value);
|
2753
|
+
};
|
2754
|
+
|
2755
|
+
|
2756
|
+
/**
|
2757
|
+
* Clears the field making it undefined.
|
2758
|
+
* @return {!proto.notification.NotificationItem} returns this
|
2759
|
+
*/
|
2760
|
+
proto.notification.NotificationItem.prototype.clearCreated = function() {
|
2761
|
+
return jspb.Message.setField(this, 6, undefined);
|
2762
|
+
};
|
2763
|
+
|
2764
|
+
|
2765
|
+
/**
|
2766
|
+
* Returns whether this field is set.
|
2767
|
+
* @return {boolean}
|
2768
|
+
*/
|
2769
|
+
proto.notification.NotificationItem.prototype.hasCreated = function() {
|
2770
|
+
return jspb.Message.getField(this, 6) != null;
|
2771
|
+
};
|
2772
|
+
|
2773
|
+
|
2774
|
+
|
2775
|
+
/**
|
2776
|
+
* List of repeated fields within this message type.
|
2777
|
+
* @private {!Array<number>}
|
2778
|
+
* @const
|
2779
|
+
*/
|
2780
|
+
proto.notification.NotificationItemsResponse.repeatedFields_ = [1];
|
2781
|
+
|
2782
|
+
|
2783
|
+
|
2784
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
2785
|
+
/**
|
2786
|
+
* Creates an object representation of this proto.
|
2787
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
2788
|
+
* Optional fields that are not set will be set to undefined.
|
2789
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
2790
|
+
* For the list of reserved names please see:
|
2791
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
2792
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
2793
|
+
* JSPB instance for transitional soy proto support:
|
2794
|
+
* http://goto/soy-param-migration
|
2795
|
+
* @return {!Object}
|
2796
|
+
*/
|
2797
|
+
proto.notification.NotificationItemsResponse.prototype.toObject = function(opt_includeInstance) {
|
2798
|
+
return proto.notification.NotificationItemsResponse.toObject(opt_includeInstance, this);
|
2799
|
+
};
|
2800
|
+
|
2801
|
+
|
2802
|
+
/**
|
2803
|
+
* Static version of the {@see toObject} method.
|
2804
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
2805
|
+
* the JSPB instance for transitional soy proto support:
|
2806
|
+
* http://goto/soy-param-migration
|
2807
|
+
* @param {!proto.notification.NotificationItemsResponse} msg The msg instance to transform.
|
2808
|
+
* @return {!Object}
|
2809
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2810
|
+
*/
|
2811
|
+
proto.notification.NotificationItemsResponse.toObject = function(includeInstance, msg) {
|
2812
|
+
var f, obj = {
|
2813
|
+
itemsList: jspb.Message.toObjectList(msg.getItemsList(),
|
2814
|
+
proto.notification.NotificationItem.toObject, includeInstance),
|
2815
|
+
totalPages: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
2816
|
+
totalItems: jspb.Message.getFieldWithDefault(msg, 3, 0)
|
2817
|
+
};
|
2818
|
+
|
2819
|
+
if (includeInstance) {
|
2820
|
+
obj.$jspbMessageInstance = msg;
|
2821
|
+
}
|
2822
|
+
return obj;
|
2823
|
+
};
|
2824
|
+
}
|
2825
|
+
|
2826
|
+
|
2827
|
+
/**
|
2828
|
+
* Deserializes binary data (in protobuf wire format).
|
2829
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
2830
|
+
* @return {!proto.notification.NotificationItemsResponse}
|
2831
|
+
*/
|
2832
|
+
proto.notification.NotificationItemsResponse.deserializeBinary = function(bytes) {
|
2833
|
+
var reader = new jspb.BinaryReader(bytes);
|
2834
|
+
var msg = new proto.notification.NotificationItemsResponse;
|
2835
|
+
return proto.notification.NotificationItemsResponse.deserializeBinaryFromReader(msg, reader);
|
2836
|
+
};
|
2837
|
+
|
2838
|
+
|
2839
|
+
/**
|
2840
|
+
* Deserializes binary data (in protobuf wire format) from the
|
2841
|
+
* given reader into the given message object.
|
2842
|
+
* @param {!proto.notification.NotificationItemsResponse} msg The message object to deserialize into.
|
2843
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
2844
|
+
* @return {!proto.notification.NotificationItemsResponse}
|
2845
|
+
*/
|
2846
|
+
proto.notification.NotificationItemsResponse.deserializeBinaryFromReader = function(msg, reader) {
|
2847
|
+
while (reader.nextField()) {
|
2848
|
+
if (reader.isEndGroup()) {
|
2849
|
+
break;
|
2850
|
+
}
|
2851
|
+
var field = reader.getFieldNumber();
|
2852
|
+
switch (field) {
|
2853
|
+
case 1:
|
2854
|
+
var value = new proto.notification.NotificationItem;
|
2855
|
+
reader.readMessage(value,proto.notification.NotificationItem.deserializeBinaryFromReader);
|
2856
|
+
msg.addItems(value);
|
2857
|
+
break;
|
2858
|
+
case 2:
|
2859
|
+
var value = /** @type {number} */ (reader.readInt32());
|
2860
|
+
msg.setTotalPages(value);
|
2861
|
+
break;
|
2862
|
+
case 3:
|
2863
|
+
var value = /** @type {number} */ (reader.readInt32());
|
2864
|
+
msg.setTotalItems(value);
|
2865
|
+
break;
|
2866
|
+
default:
|
2867
|
+
reader.skipField();
|
2868
|
+
break;
|
2869
|
+
}
|
2870
|
+
}
|
2871
|
+
return msg;
|
2872
|
+
};
|
2873
|
+
|
2874
|
+
|
2875
|
+
/**
|
2876
|
+
* Serializes the message to binary data (in protobuf wire format).
|
2877
|
+
* @return {!Uint8Array}
|
2878
|
+
*/
|
2879
|
+
proto.notification.NotificationItemsResponse.prototype.serializeBinary = function() {
|
2880
|
+
var writer = new jspb.BinaryWriter();
|
2881
|
+
proto.notification.NotificationItemsResponse.serializeBinaryToWriter(this, writer);
|
2882
|
+
return writer.getResultBuffer();
|
2883
|
+
};
|
2884
|
+
|
2885
|
+
|
2886
|
+
/**
|
2887
|
+
* Serializes the given message to binary data (in protobuf wire
|
2888
|
+
* format), writing to the given BinaryWriter.
|
2889
|
+
* @param {!proto.notification.NotificationItemsResponse} message
|
2890
|
+
* @param {!jspb.BinaryWriter} writer
|
2891
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
2892
|
+
*/
|
2893
|
+
proto.notification.NotificationItemsResponse.serializeBinaryToWriter = function(message, writer) {
|
2894
|
+
var f = undefined;
|
2895
|
+
f = message.getItemsList();
|
2896
|
+
if (f.length > 0) {
|
2897
|
+
writer.writeRepeatedMessage(
|
2898
|
+
1,
|
2899
|
+
f,
|
2900
|
+
proto.notification.NotificationItem.serializeBinaryToWriter
|
2901
|
+
);
|
2902
|
+
}
|
2903
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 2));
|
2904
|
+
if (f != null) {
|
2905
|
+
writer.writeInt32(
|
2906
|
+
2,
|
2907
|
+
f
|
2908
|
+
);
|
2909
|
+
}
|
2910
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 3));
|
2911
|
+
if (f != null) {
|
2912
|
+
writer.writeInt32(
|
2913
|
+
3,
|
2914
|
+
f
|
2915
|
+
);
|
2916
|
+
}
|
2917
|
+
};
|
2918
|
+
|
2919
|
+
|
2920
|
+
/**
|
2921
|
+
* repeated NotificationItem items = 1;
|
2922
|
+
* @return {!Array<!proto.notification.NotificationItem>}
|
2923
|
+
*/
|
2924
|
+
proto.notification.NotificationItemsResponse.prototype.getItemsList = function() {
|
2925
|
+
return /** @type{!Array<!proto.notification.NotificationItem>} */ (
|
2926
|
+
jspb.Message.getRepeatedWrapperField(this, proto.notification.NotificationItem, 1));
|
2927
|
+
};
|
2928
|
+
|
2929
|
+
|
2930
|
+
/**
|
2931
|
+
* @param {!Array<!proto.notification.NotificationItem>} value
|
2932
|
+
* @return {!proto.notification.NotificationItemsResponse} returns this
|
2933
|
+
*/
|
2934
|
+
proto.notification.NotificationItemsResponse.prototype.setItemsList = function(value) {
|
2935
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
2936
|
+
};
|
2937
|
+
|
2938
|
+
|
2939
|
+
/**
|
2940
|
+
* @param {!proto.notification.NotificationItem=} opt_value
|
2941
|
+
* @param {number=} opt_index
|
2942
|
+
* @return {!proto.notification.NotificationItem}
|
2943
|
+
*/
|
2944
|
+
proto.notification.NotificationItemsResponse.prototype.addItems = function(opt_value, opt_index) {
|
2945
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.notification.NotificationItem, opt_index);
|
2946
|
+
};
|
2947
|
+
|
2948
|
+
|
2949
|
+
/**
|
2950
|
+
* Clears the list making it empty but non-null.
|
2951
|
+
* @return {!proto.notification.NotificationItemsResponse} returns this
|
2952
|
+
*/
|
2953
|
+
proto.notification.NotificationItemsResponse.prototype.clearItemsList = function() {
|
2954
|
+
return this.setItemsList([]);
|
2955
|
+
};
|
2956
|
+
|
2957
|
+
|
2958
|
+
/**
|
2959
|
+
* optional int32 total_pages = 2;
|
2960
|
+
* @return {number}
|
2961
|
+
*/
|
2962
|
+
proto.notification.NotificationItemsResponse.prototype.getTotalPages = function() {
|
2963
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
2964
|
+
};
|
2965
|
+
|
2966
|
+
|
2967
|
+
/**
|
2968
|
+
* @param {number} value
|
2969
|
+
* @return {!proto.notification.NotificationItemsResponse} returns this
|
2970
|
+
*/
|
2971
|
+
proto.notification.NotificationItemsResponse.prototype.setTotalPages = function(value) {
|
2972
|
+
return jspb.Message.setField(this, 2, value);
|
2973
|
+
};
|
2974
|
+
|
2975
|
+
|
2976
|
+
/**
|
2977
|
+
* Clears the field making it undefined.
|
2978
|
+
* @return {!proto.notification.NotificationItemsResponse} returns this
|
2979
|
+
*/
|
2980
|
+
proto.notification.NotificationItemsResponse.prototype.clearTotalPages = function() {
|
2981
|
+
return jspb.Message.setField(this, 2, undefined);
|
2982
|
+
};
|
2983
|
+
|
2984
|
+
|
2985
|
+
/**
|
2986
|
+
* Returns whether this field is set.
|
2987
|
+
* @return {boolean}
|
2988
|
+
*/
|
2989
|
+
proto.notification.NotificationItemsResponse.prototype.hasTotalPages = function() {
|
2990
|
+
return jspb.Message.getField(this, 2) != null;
|
2991
|
+
};
|
2992
|
+
|
2993
|
+
|
2994
|
+
/**
|
2995
|
+
* optional int32 total_items = 3;
|
2996
|
+
* @return {number}
|
2997
|
+
*/
|
2998
|
+
proto.notification.NotificationItemsResponse.prototype.getTotalItems = function() {
|
2999
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
3000
|
+
};
|
3001
|
+
|
3002
|
+
|
3003
|
+
/**
|
3004
|
+
* @param {number} value
|
3005
|
+
* @return {!proto.notification.NotificationItemsResponse} returns this
|
3006
|
+
*/
|
3007
|
+
proto.notification.NotificationItemsResponse.prototype.setTotalItems = function(value) {
|
3008
|
+
return jspb.Message.setField(this, 3, value);
|
3009
|
+
};
|
3010
|
+
|
3011
|
+
|
3012
|
+
/**
|
3013
|
+
* Clears the field making it undefined.
|
3014
|
+
* @return {!proto.notification.NotificationItemsResponse} returns this
|
3015
|
+
*/
|
3016
|
+
proto.notification.NotificationItemsResponse.prototype.clearTotalItems = function() {
|
3017
|
+
return jspb.Message.setField(this, 3, undefined);
|
3018
|
+
};
|
3019
|
+
|
3020
|
+
|
3021
|
+
/**
|
3022
|
+
* Returns whether this field is set.
|
3023
|
+
* @return {boolean}
|
3024
|
+
*/
|
3025
|
+
proto.notification.NotificationItemsResponse.prototype.hasTotalItems = function() {
|
3026
|
+
return jspb.Message.getField(this, 3) != null;
|
3027
|
+
};
|
3028
|
+
|
3029
|
+
|
2432
3030
|
goog.object.extend(exports, proto.notification);
|