protobuf-platform 1.0.184 → 1.0.185

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.
@@ -6,10 +6,10 @@ service Notification {
6
6
  rpc checkConnection(PingRequest) returns (PongResponse);
7
7
  rpc getMediaResource(GetFileRequest) returns (stream File);
8
8
  //Notifications
9
- //rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
10
- //rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
11
- //rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
12
- //rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
9
+ rpc createSingleNotification(NotificationRequest) returns (NotificationResponse);
10
+ rpc readSingleNotification(GetNotificationRequest) returns (NotificationResponse);
11
+ rpc updateSingleNotification(NotificationRequest) returns (NotificationResponse);
12
+ rpc deleteSingleNotification(GetNotificationRequest) returns (NotificationStatusResponse);
13
13
  rpc readListNotifications(PaginationRequest) returns (NotificationItemsResponse);
14
14
  rpc sendNotificationToUsers(SendNotificationRequest) returns (NotificationStatusResponse);
15
15
  rpc getNotificationForParticularUser(PaginationRequest) returns (UserNotificationItemsResponse);
@@ -39,6 +39,16 @@ message File { bytes media = 1; }
39
39
  message GetFileRequest { string file_name = 1; string instance_type = 2; }
40
40
 
41
41
  //Notification
42
+ message NotificationRequest {
43
+ optional int32 id = 1;
44
+ optional string title = 2;
45
+ optional string content = 3;
46
+ optional string type = 4;
47
+ optional int32 is_active = 5;
48
+ }
49
+ message GetNotificationRequest {
50
+ int32 id = 1;
51
+ }
42
52
  message SendNotificationRequest {
43
53
  int32 notification_id = 1;
44
54
  repeated int32 user_ids = 2;
@@ -65,6 +75,9 @@ message NotificationItem {
65
75
  string type = 5;
66
76
  optional string created = 6;
67
77
  }
78
+ message NotificationResponse {
79
+ NotificationItem data = 1;
80
+ }
68
81
  message NotificationItemsResponse {
69
82
  repeated NotificationItem items = 1;
70
83
  optional int32 total_pages = 2;
@@ -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_GetNotificationRequest(arg) {
30
+ if (!(arg instanceof notification_pb.GetNotificationRequest)) {
31
+ throw new Error('Expected argument of type notification.GetNotificationRequest');
32
+ }
33
+ return Buffer.from(arg.serializeBinary());
34
+ }
35
+
36
+ function deserialize_notification_GetNotificationRequest(buffer_arg) {
37
+ return notification_pb.GetNotificationRequest.deserializeBinary(new Uint8Array(buffer_arg));
38
+ }
39
+
29
40
  function serialize_notification_NotificationItemsResponse(arg) {
30
41
  if (!(arg instanceof notification_pb.NotificationItemsResponse)) {
31
42
  throw new Error('Expected argument of type notification.NotificationItemsResponse');
@@ -37,6 +48,28 @@ function deserialize_notification_NotificationItemsResponse(buffer_arg) {
37
48
  return notification_pb.NotificationItemsResponse.deserializeBinary(new Uint8Array(buffer_arg));
38
49
  }
39
50
 
51
+ function serialize_notification_NotificationRequest(arg) {
52
+ if (!(arg instanceof notification_pb.NotificationRequest)) {
53
+ throw new Error('Expected argument of type notification.NotificationRequest');
54
+ }
55
+ return Buffer.from(arg.serializeBinary());
56
+ }
57
+
58
+ function deserialize_notification_NotificationRequest(buffer_arg) {
59
+ return notification_pb.NotificationRequest.deserializeBinary(new Uint8Array(buffer_arg));
60
+ }
61
+
62
+ function serialize_notification_NotificationResponse(arg) {
63
+ if (!(arg instanceof notification_pb.NotificationResponse)) {
64
+ throw new Error('Expected argument of type notification.NotificationResponse');
65
+ }
66
+ return Buffer.from(arg.serializeBinary());
67
+ }
68
+
69
+ function deserialize_notification_NotificationResponse(buffer_arg) {
70
+ return notification_pb.NotificationResponse.deserializeBinary(new Uint8Array(buffer_arg));
71
+ }
72
+
40
73
  function serialize_notification_NotificationStatusResponse(arg) {
41
74
  if (!(arg instanceof notification_pb.NotificationStatusResponse)) {
42
75
  throw new Error('Expected argument of type notification.NotificationStatusResponse');
@@ -128,11 +161,51 @@ var NotificationService = exports.NotificationService = {
128
161
  responseDeserialize: deserialize_notification_File,
129
162
  },
130
163
  // Notifications
131
- // rpc createSingleNotification(stream LevelRequest) returns (LevelResponse);
132
- // rpc readSingleLevel(GetLevelRequest) returns (LevelResponse);
133
- // rpc updateSingleLevel(stream LevelRequest) returns (LevelResponse);
134
- // rpc deleteSingleLevel(GetLevelRequest) returns (LevelStatusResponse);
135
- readListNotifications: {
164
+ createSingleNotification: {
165
+ path: '/notification.Notification/createSingleNotification',
166
+ requestStream: false,
167
+ responseStream: false,
168
+ requestType: notification_pb.NotificationRequest,
169
+ responseType: notification_pb.NotificationResponse,
170
+ requestSerialize: serialize_notification_NotificationRequest,
171
+ requestDeserialize: deserialize_notification_NotificationRequest,
172
+ responseSerialize: serialize_notification_NotificationResponse,
173
+ responseDeserialize: deserialize_notification_NotificationResponse,
174
+ },
175
+ readSingleNotification: {
176
+ path: '/notification.Notification/readSingleNotification',
177
+ requestStream: false,
178
+ responseStream: false,
179
+ requestType: notification_pb.GetNotificationRequest,
180
+ responseType: notification_pb.NotificationResponse,
181
+ requestSerialize: serialize_notification_GetNotificationRequest,
182
+ requestDeserialize: deserialize_notification_GetNotificationRequest,
183
+ responseSerialize: serialize_notification_NotificationResponse,
184
+ responseDeserialize: deserialize_notification_NotificationResponse,
185
+ },
186
+ updateSingleNotification: {
187
+ path: '/notification.Notification/updateSingleNotification',
188
+ requestStream: false,
189
+ responseStream: false,
190
+ requestType: notification_pb.NotificationRequest,
191
+ responseType: notification_pb.NotificationResponse,
192
+ requestSerialize: serialize_notification_NotificationRequest,
193
+ requestDeserialize: deserialize_notification_NotificationRequest,
194
+ responseSerialize: serialize_notification_NotificationResponse,
195
+ responseDeserialize: deserialize_notification_NotificationResponse,
196
+ },
197
+ deleteSingleNotification: {
198
+ path: '/notification.Notification/deleteSingleNotification',
199
+ requestStream: false,
200
+ responseStream: false,
201
+ requestType: notification_pb.GetNotificationRequest,
202
+ responseType: notification_pb.NotificationStatusResponse,
203
+ requestSerialize: serialize_notification_GetNotificationRequest,
204
+ requestDeserialize: deserialize_notification_GetNotificationRequest,
205
+ responseSerialize: serialize_notification_NotificationStatusResponse,
206
+ responseDeserialize: deserialize_notification_NotificationStatusResponse,
207
+ },
208
+ readListNotifications: {
136
209
  path: '/notification.Notification/readListNotifications',
137
210
  requestStream: false,
138
211
  responseStream: false,
@@ -23,8 +23,11 @@ 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.GetNotificationRequest', null, global);
26
27
  goog.exportSymbol('proto.notification.NotificationItem', null, global);
27
28
  goog.exportSymbol('proto.notification.NotificationItemsResponse', null, global);
29
+ goog.exportSymbol('proto.notification.NotificationRequest', null, global);
30
+ goog.exportSymbol('proto.notification.NotificationResponse', null, global);
28
31
  goog.exportSymbol('proto.notification.NotificationSearchRequest', null, global);
29
32
  goog.exportSymbol('proto.notification.NotificationStatusResponse', null, global);
30
33
  goog.exportSymbol('proto.notification.PaginationRequest', null, global);
@@ -181,6 +184,48 @@ if (goog.DEBUG && !COMPILED) {
181
184
  */
182
185
  proto.notification.GetFileRequest.displayName = 'proto.notification.GetFileRequest';
183
186
  }
187
+ /**
188
+ * Generated by JsPbCodeGenerator.
189
+ * @param {Array=} opt_data Optional initial data array, typically from a
190
+ * server response, or constructed directly in Javascript. The array is used
191
+ * in place and becomes part of the constructed object. It is not cloned.
192
+ * If no data is provided, the constructed object will be empty, but still
193
+ * valid.
194
+ * @extends {jspb.Message}
195
+ * @constructor
196
+ */
197
+ proto.notification.NotificationRequest = function(opt_data) {
198
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
199
+ };
200
+ goog.inherits(proto.notification.NotificationRequest, jspb.Message);
201
+ if (goog.DEBUG && !COMPILED) {
202
+ /**
203
+ * @public
204
+ * @override
205
+ */
206
+ proto.notification.NotificationRequest.displayName = 'proto.notification.NotificationRequest';
207
+ }
208
+ /**
209
+ * Generated by JsPbCodeGenerator.
210
+ * @param {Array=} opt_data Optional initial data array, typically from a
211
+ * server response, or constructed directly in Javascript. The array is used
212
+ * in place and becomes part of the constructed object. It is not cloned.
213
+ * If no data is provided, the constructed object will be empty, but still
214
+ * valid.
215
+ * @extends {jspb.Message}
216
+ * @constructor
217
+ */
218
+ proto.notification.GetNotificationRequest = function(opt_data) {
219
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
220
+ };
221
+ goog.inherits(proto.notification.GetNotificationRequest, jspb.Message);
222
+ if (goog.DEBUG && !COMPILED) {
223
+ /**
224
+ * @public
225
+ * @override
226
+ */
227
+ proto.notification.GetNotificationRequest.displayName = 'proto.notification.GetNotificationRequest';
228
+ }
184
229
  /**
185
230
  * Generated by JsPbCodeGenerator.
186
231
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -286,6 +331,27 @@ if (goog.DEBUG && !COMPILED) {
286
331
  */
287
332
  proto.notification.NotificationItem.displayName = 'proto.notification.NotificationItem';
288
333
  }
334
+ /**
335
+ * Generated by JsPbCodeGenerator.
336
+ * @param {Array=} opt_data Optional initial data array, typically from a
337
+ * server response, or constructed directly in Javascript. The array is used
338
+ * in place and becomes part of the constructed object. It is not cloned.
339
+ * If no data is provided, the constructed object will be empty, but still
340
+ * valid.
341
+ * @extends {jspb.Message}
342
+ * @constructor
343
+ */
344
+ proto.notification.NotificationResponse = function(opt_data) {
345
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
346
+ };
347
+ goog.inherits(proto.notification.NotificationResponse, jspb.Message);
348
+ if (goog.DEBUG && !COMPILED) {
349
+ /**
350
+ * @public
351
+ * @override
352
+ */
353
+ proto.notification.NotificationResponse.displayName = 'proto.notification.NotificationResponse';
354
+ }
289
355
  /**
290
356
  * Generated by JsPbCodeGenerator.
291
357
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1662,13 +1728,6 @@ proto.notification.GetFileRequest.prototype.setInstanceType = function(value) {
1662
1728
 
1663
1729
 
1664
1730
 
1665
- /**
1666
- * List of repeated fields within this message type.
1667
- * @private {!Array<number>}
1668
- * @const
1669
- */
1670
- proto.notification.SendNotificationRequest.repeatedFields_ = [2];
1671
-
1672
1731
 
1673
1732
 
1674
1733
  if (jspb.Message.GENERATE_TO_OBJECT) {
@@ -1684,8 +1743,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
1684
1743
  * http://goto/soy-param-migration
1685
1744
  * @return {!Object}
1686
1745
  */
1687
- proto.notification.SendNotificationRequest.prototype.toObject = function(opt_includeInstance) {
1688
- return proto.notification.SendNotificationRequest.toObject(opt_includeInstance, this);
1746
+ proto.notification.NotificationRequest.prototype.toObject = function(opt_includeInstance) {
1747
+ return proto.notification.NotificationRequest.toObject(opt_includeInstance, this);
1689
1748
  };
1690
1749
 
1691
1750
 
@@ -1694,14 +1753,17 @@ proto.notification.SendNotificationRequest.prototype.toObject = function(opt_inc
1694
1753
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1695
1754
  * the JSPB instance for transitional soy proto support:
1696
1755
  * http://goto/soy-param-migration
1697
- * @param {!proto.notification.SendNotificationRequest} msg The msg instance to transform.
1756
+ * @param {!proto.notification.NotificationRequest} msg The msg instance to transform.
1698
1757
  * @return {!Object}
1699
1758
  * @suppress {unusedLocalVariables} f is only used for nested messages
1700
1759
  */
1701
- proto.notification.SendNotificationRequest.toObject = function(includeInstance, msg) {
1760
+ proto.notification.NotificationRequest.toObject = function(includeInstance, msg) {
1702
1761
  var f, obj = {
1703
- notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1704
- userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
1762
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1763
+ title: jspb.Message.getFieldWithDefault(msg, 2, ""),
1764
+ content: jspb.Message.getFieldWithDefault(msg, 3, ""),
1765
+ type: jspb.Message.getFieldWithDefault(msg, 4, ""),
1766
+ isActive: jspb.Message.getFieldWithDefault(msg, 5, 0)
1705
1767
  };
1706
1768
 
1707
1769
  if (includeInstance) {
@@ -1715,23 +1777,23 @@ proto.notification.SendNotificationRequest.toObject = function(includeInstance,
1715
1777
  /**
1716
1778
  * Deserializes binary data (in protobuf wire format).
1717
1779
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
1718
- * @return {!proto.notification.SendNotificationRequest}
1780
+ * @return {!proto.notification.NotificationRequest}
1719
1781
  */
1720
- proto.notification.SendNotificationRequest.deserializeBinary = function(bytes) {
1782
+ proto.notification.NotificationRequest.deserializeBinary = function(bytes) {
1721
1783
  var reader = new jspb.BinaryReader(bytes);
1722
- var msg = new proto.notification.SendNotificationRequest;
1723
- return proto.notification.SendNotificationRequest.deserializeBinaryFromReader(msg, reader);
1784
+ var msg = new proto.notification.NotificationRequest;
1785
+ return proto.notification.NotificationRequest.deserializeBinaryFromReader(msg, reader);
1724
1786
  };
1725
1787
 
1726
1788
 
1727
1789
  /**
1728
1790
  * Deserializes binary data (in protobuf wire format) from the
1729
1791
  * given reader into the given message object.
1730
- * @param {!proto.notification.SendNotificationRequest} msg The message object to deserialize into.
1792
+ * @param {!proto.notification.NotificationRequest} msg The message object to deserialize into.
1731
1793
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1732
- * @return {!proto.notification.SendNotificationRequest}
1794
+ * @return {!proto.notification.NotificationRequest}
1733
1795
  */
1734
- proto.notification.SendNotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
1796
+ proto.notification.NotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
1735
1797
  while (reader.nextField()) {
1736
1798
  if (reader.isEndGroup()) {
1737
1799
  break;
@@ -1740,13 +1802,23 @@ proto.notification.SendNotificationRequest.deserializeBinaryFromReader = functio
1740
1802
  switch (field) {
1741
1803
  case 1:
1742
1804
  var value = /** @type {number} */ (reader.readInt32());
1743
- msg.setNotificationId(value);
1805
+ msg.setId(value);
1744
1806
  break;
1745
1807
  case 2:
1746
- var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
1747
- for (var i = 0; i < values.length; i++) {
1748
- msg.addUserIds(values[i]);
1749
- }
1808
+ var value = /** @type {string} */ (reader.readString());
1809
+ msg.setTitle(value);
1810
+ break;
1811
+ case 3:
1812
+ var value = /** @type {string} */ (reader.readString());
1813
+ msg.setContent(value);
1814
+ break;
1815
+ case 4:
1816
+ var value = /** @type {string} */ (reader.readString());
1817
+ msg.setType(value);
1818
+ break;
1819
+ case 5:
1820
+ var value = /** @type {number} */ (reader.readInt32());
1821
+ msg.setIsActive(value);
1750
1822
  break;
1751
1823
  default:
1752
1824
  reader.skipField();
@@ -1761,9 +1833,9 @@ proto.notification.SendNotificationRequest.deserializeBinaryFromReader = functio
1761
1833
  * Serializes the message to binary data (in protobuf wire format).
1762
1834
  * @return {!Uint8Array}
1763
1835
  */
1764
- proto.notification.SendNotificationRequest.prototype.serializeBinary = function() {
1836
+ proto.notification.NotificationRequest.prototype.serializeBinary = function() {
1765
1837
  var writer = new jspb.BinaryWriter();
1766
- proto.notification.SendNotificationRequest.serializeBinaryToWriter(this, writer);
1838
+ proto.notification.NotificationRequest.serializeBinaryToWriter(this, writer);
1767
1839
  return writer.getResultBuffer();
1768
1840
  };
1769
1841
 
@@ -1771,186 +1843,650 @@ proto.notification.SendNotificationRequest.prototype.serializeBinary = function(
1771
1843
  /**
1772
1844
  * Serializes the given message to binary data (in protobuf wire
1773
1845
  * format), writing to the given BinaryWriter.
1774
- * @param {!proto.notification.SendNotificationRequest} message
1846
+ * @param {!proto.notification.NotificationRequest} message
1775
1847
  * @param {!jspb.BinaryWriter} writer
1776
1848
  * @suppress {unusedLocalVariables} f is only used for nested messages
1777
1849
  */
1778
- proto.notification.SendNotificationRequest.serializeBinaryToWriter = function(message, writer) {
1850
+ proto.notification.NotificationRequest.serializeBinaryToWriter = function(message, writer) {
1779
1851
  var f = undefined;
1780
- f = message.getNotificationId();
1781
- if (f !== 0) {
1852
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
1853
+ if (f != null) {
1782
1854
  writer.writeInt32(
1783
1855
  1,
1784
1856
  f
1785
1857
  );
1786
1858
  }
1787
- f = message.getUserIdsList();
1788
- if (f.length > 0) {
1789
- writer.writePackedInt32(
1859
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1860
+ if (f != null) {
1861
+ writer.writeString(
1790
1862
  2,
1791
1863
  f
1792
1864
  );
1793
1865
  }
1866
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1867
+ if (f != null) {
1868
+ writer.writeString(
1869
+ 3,
1870
+ f
1871
+ );
1872
+ }
1873
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1874
+ if (f != null) {
1875
+ writer.writeString(
1876
+ 4,
1877
+ f
1878
+ );
1879
+ }
1880
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
1881
+ if (f != null) {
1882
+ writer.writeInt32(
1883
+ 5,
1884
+ f
1885
+ );
1886
+ }
1794
1887
  };
1795
1888
 
1796
1889
 
1797
1890
  /**
1798
- * optional int32 notification_id = 1;
1891
+ * optional int32 id = 1;
1799
1892
  * @return {number}
1800
1893
  */
1801
- proto.notification.SendNotificationRequest.prototype.getNotificationId = function() {
1894
+ proto.notification.NotificationRequest.prototype.getId = function() {
1802
1895
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1803
1896
  };
1804
1897
 
1805
1898
 
1806
1899
  /**
1807
1900
  * @param {number} value
1808
- * @return {!proto.notification.SendNotificationRequest} returns this
1901
+ * @return {!proto.notification.NotificationRequest} returns this
1809
1902
  */
1810
- proto.notification.SendNotificationRequest.prototype.setNotificationId = function(value) {
1811
- return jspb.Message.setProto3IntField(this, 1, value);
1903
+ proto.notification.NotificationRequest.prototype.setId = function(value) {
1904
+ return jspb.Message.setField(this, 1, value);
1812
1905
  };
1813
1906
 
1814
1907
 
1815
1908
  /**
1816
- * repeated int32 user_ids = 2;
1817
- * @return {!Array<number>}
1909
+ * Clears the field making it undefined.
1910
+ * @return {!proto.notification.NotificationRequest} returns this
1818
1911
  */
1819
- proto.notification.SendNotificationRequest.prototype.getUserIdsList = function() {
1820
- return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
1912
+ proto.notification.NotificationRequest.prototype.clearId = function() {
1913
+ return jspb.Message.setField(this, 1, undefined);
1821
1914
  };
1822
1915
 
1823
1916
 
1824
1917
  /**
1825
- * @param {!Array<number>} value
1826
- * @return {!proto.notification.SendNotificationRequest} returns this
1918
+ * Returns whether this field is set.
1919
+ * @return {boolean}
1827
1920
  */
1828
- proto.notification.SendNotificationRequest.prototype.setUserIdsList = function(value) {
1829
- return jspb.Message.setField(this, 2, value || []);
1921
+ proto.notification.NotificationRequest.prototype.hasId = function() {
1922
+ return jspb.Message.getField(this, 1) != null;
1830
1923
  };
1831
1924
 
1832
1925
 
1833
1926
  /**
1834
- * @param {number} value
1835
- * @param {number=} opt_index
1836
- * @return {!proto.notification.SendNotificationRequest} returns this
1927
+ * optional string title = 2;
1928
+ * @return {string}
1837
1929
  */
1838
- proto.notification.SendNotificationRequest.prototype.addUserIds = function(value, opt_index) {
1839
- return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1930
+ proto.notification.NotificationRequest.prototype.getTitle = function() {
1931
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1840
1932
  };
1841
1933
 
1842
1934
 
1843
1935
  /**
1844
- * Clears the list making it empty but non-null.
1845
- * @return {!proto.notification.SendNotificationRequest} returns this
1936
+ * @param {string} value
1937
+ * @return {!proto.notification.NotificationRequest} returns this
1846
1938
  */
1847
- proto.notification.SendNotificationRequest.prototype.clearUserIdsList = function() {
1848
- return this.setUserIdsList([]);
1939
+ proto.notification.NotificationRequest.prototype.setTitle = function(value) {
1940
+ return jspb.Message.setField(this, 2, value);
1849
1941
  };
1850
1942
 
1851
1943
 
1944
+ /**
1945
+ * Clears the field making it undefined.
1946
+ * @return {!proto.notification.NotificationRequest} returns this
1947
+ */
1948
+ proto.notification.NotificationRequest.prototype.clearTitle = function() {
1949
+ return jspb.Message.setField(this, 2, undefined);
1950
+ };
1852
1951
 
1853
1952
 
1854
-
1855
- if (jspb.Message.GENERATE_TO_OBJECT) {
1856
1953
  /**
1857
- * Creates an object representation of this proto.
1858
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1859
- * Optional fields that are not set will be set to undefined.
1860
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1861
- * For the list of reserved names please see:
1862
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1863
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1864
- * JSPB instance for transitional soy proto support:
1865
- * http://goto/soy-param-migration
1866
- * @return {!Object}
1954
+ * Returns whether this field is set.
1955
+ * @return {boolean}
1867
1956
  */
1868
- proto.notification.NotificationStatusResponse.prototype.toObject = function(opt_includeInstance) {
1869
- return proto.notification.NotificationStatusResponse.toObject(opt_includeInstance, this);
1957
+ proto.notification.NotificationRequest.prototype.hasTitle = function() {
1958
+ return jspb.Message.getField(this, 2) != null;
1870
1959
  };
1871
1960
 
1872
1961
 
1873
1962
  /**
1874
- * Static version of the {@see toObject} method.
1875
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1876
- * the JSPB instance for transitional soy proto support:
1877
- * http://goto/soy-param-migration
1878
- * @param {!proto.notification.NotificationStatusResponse} msg The msg instance to transform.
1879
- * @return {!Object}
1880
- * @suppress {unusedLocalVariables} f is only used for nested messages
1963
+ * optional string content = 3;
1964
+ * @return {string}
1881
1965
  */
1882
- proto.notification.NotificationStatusResponse.toObject = function(includeInstance, msg) {
1883
- var f, obj = {
1884
- status: jspb.Message.getFieldWithDefault(msg, 1, "")
1885
- };
1886
-
1887
- if (includeInstance) {
1888
- obj.$jspbMessageInstance = msg;
1889
- }
1890
- return obj;
1966
+ proto.notification.NotificationRequest.prototype.getContent = function() {
1967
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1891
1968
  };
1892
- }
1893
1969
 
1894
1970
 
1895
1971
  /**
1896
- * Deserializes binary data (in protobuf wire format).
1897
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1898
- * @return {!proto.notification.NotificationStatusResponse}
1972
+ * @param {string} value
1973
+ * @return {!proto.notification.NotificationRequest} returns this
1899
1974
  */
1900
- proto.notification.NotificationStatusResponse.deserializeBinary = function(bytes) {
1901
- var reader = new jspb.BinaryReader(bytes);
1902
- var msg = new proto.notification.NotificationStatusResponse;
1903
- return proto.notification.NotificationStatusResponse.deserializeBinaryFromReader(msg, reader);
1975
+ proto.notification.NotificationRequest.prototype.setContent = function(value) {
1976
+ return jspb.Message.setField(this, 3, value);
1904
1977
  };
1905
1978
 
1906
1979
 
1907
1980
  /**
1908
- * Deserializes binary data (in protobuf wire format) from the
1909
- * given reader into the given message object.
1910
- * @param {!proto.notification.NotificationStatusResponse} msg The message object to deserialize into.
1911
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1912
- * @return {!proto.notification.NotificationStatusResponse}
1981
+ * Clears the field making it undefined.
1982
+ * @return {!proto.notification.NotificationRequest} returns this
1913
1983
  */
1914
- proto.notification.NotificationStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
1915
- while (reader.nextField()) {
1916
- if (reader.isEndGroup()) {
1917
- break;
1918
- }
1919
- var field = reader.getFieldNumber();
1920
- switch (field) {
1921
- case 1:
1922
- var value = /** @type {string} */ (reader.readString());
1923
- msg.setStatus(value);
1924
- break;
1925
- default:
1926
- reader.skipField();
1927
- break;
1928
- }
1929
- }
1930
- return msg;
1984
+ proto.notification.NotificationRequest.prototype.clearContent = function() {
1985
+ return jspb.Message.setField(this, 3, undefined);
1931
1986
  };
1932
1987
 
1933
1988
 
1934
1989
  /**
1935
- * Serializes the message to binary data (in protobuf wire format).
1936
- * @return {!Uint8Array}
1990
+ * Returns whether this field is set.
1991
+ * @return {boolean}
1937
1992
  */
1938
- proto.notification.NotificationStatusResponse.prototype.serializeBinary = function() {
1939
- var writer = new jspb.BinaryWriter();
1940
- proto.notification.NotificationStatusResponse.serializeBinaryToWriter(this, writer);
1941
- return writer.getResultBuffer();
1993
+ proto.notification.NotificationRequest.prototype.hasContent = function() {
1994
+ return jspb.Message.getField(this, 3) != null;
1942
1995
  };
1943
1996
 
1944
1997
 
1945
1998
  /**
1946
- * Serializes the given message to binary data (in protobuf wire
1947
- * format), writing to the given BinaryWriter.
1948
- * @param {!proto.notification.NotificationStatusResponse} message
1949
- * @param {!jspb.BinaryWriter} writer
1950
- * @suppress {unusedLocalVariables} f is only used for nested messages
1999
+ * optional string type = 4;
2000
+ * @return {string}
1951
2001
  */
1952
- proto.notification.NotificationStatusResponse.serializeBinaryToWriter = function(message, writer) {
1953
- var f = undefined;
2002
+ proto.notification.NotificationRequest.prototype.getType = function() {
2003
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2004
+ };
2005
+
2006
+
2007
+ /**
2008
+ * @param {string} value
2009
+ * @return {!proto.notification.NotificationRequest} returns this
2010
+ */
2011
+ proto.notification.NotificationRequest.prototype.setType = function(value) {
2012
+ return jspb.Message.setField(this, 4, value);
2013
+ };
2014
+
2015
+
2016
+ /**
2017
+ * Clears the field making it undefined.
2018
+ * @return {!proto.notification.NotificationRequest} returns this
2019
+ */
2020
+ proto.notification.NotificationRequest.prototype.clearType = function() {
2021
+ return jspb.Message.setField(this, 4, undefined);
2022
+ };
2023
+
2024
+
2025
+ /**
2026
+ * Returns whether this field is set.
2027
+ * @return {boolean}
2028
+ */
2029
+ proto.notification.NotificationRequest.prototype.hasType = function() {
2030
+ return jspb.Message.getField(this, 4) != null;
2031
+ };
2032
+
2033
+
2034
+ /**
2035
+ * optional int32 is_active = 5;
2036
+ * @return {number}
2037
+ */
2038
+ proto.notification.NotificationRequest.prototype.getIsActive = function() {
2039
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2040
+ };
2041
+
2042
+
2043
+ /**
2044
+ * @param {number} value
2045
+ * @return {!proto.notification.NotificationRequest} returns this
2046
+ */
2047
+ proto.notification.NotificationRequest.prototype.setIsActive = function(value) {
2048
+ return jspb.Message.setField(this, 5, value);
2049
+ };
2050
+
2051
+
2052
+ /**
2053
+ * Clears the field making it undefined.
2054
+ * @return {!proto.notification.NotificationRequest} returns this
2055
+ */
2056
+ proto.notification.NotificationRequest.prototype.clearIsActive = function() {
2057
+ return jspb.Message.setField(this, 5, undefined);
2058
+ };
2059
+
2060
+
2061
+ /**
2062
+ * Returns whether this field is set.
2063
+ * @return {boolean}
2064
+ */
2065
+ proto.notification.NotificationRequest.prototype.hasIsActive = function() {
2066
+ return jspb.Message.getField(this, 5) != null;
2067
+ };
2068
+
2069
+
2070
+
2071
+
2072
+
2073
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2074
+ /**
2075
+ * Creates an object representation of this proto.
2076
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2077
+ * Optional fields that are not set will be set to undefined.
2078
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2079
+ * For the list of reserved names please see:
2080
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2081
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2082
+ * JSPB instance for transitional soy proto support:
2083
+ * http://goto/soy-param-migration
2084
+ * @return {!Object}
2085
+ */
2086
+ proto.notification.GetNotificationRequest.prototype.toObject = function(opt_includeInstance) {
2087
+ return proto.notification.GetNotificationRequest.toObject(opt_includeInstance, this);
2088
+ };
2089
+
2090
+
2091
+ /**
2092
+ * Static version of the {@see toObject} method.
2093
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2094
+ * the JSPB instance for transitional soy proto support:
2095
+ * http://goto/soy-param-migration
2096
+ * @param {!proto.notification.GetNotificationRequest} msg The msg instance to transform.
2097
+ * @return {!Object}
2098
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2099
+ */
2100
+ proto.notification.GetNotificationRequest.toObject = function(includeInstance, msg) {
2101
+ var f, obj = {
2102
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
2103
+ };
2104
+
2105
+ if (includeInstance) {
2106
+ obj.$jspbMessageInstance = msg;
2107
+ }
2108
+ return obj;
2109
+ };
2110
+ }
2111
+
2112
+
2113
+ /**
2114
+ * Deserializes binary data (in protobuf wire format).
2115
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2116
+ * @return {!proto.notification.GetNotificationRequest}
2117
+ */
2118
+ proto.notification.GetNotificationRequest.deserializeBinary = function(bytes) {
2119
+ var reader = new jspb.BinaryReader(bytes);
2120
+ var msg = new proto.notification.GetNotificationRequest;
2121
+ return proto.notification.GetNotificationRequest.deserializeBinaryFromReader(msg, reader);
2122
+ };
2123
+
2124
+
2125
+ /**
2126
+ * Deserializes binary data (in protobuf wire format) from the
2127
+ * given reader into the given message object.
2128
+ * @param {!proto.notification.GetNotificationRequest} msg The message object to deserialize into.
2129
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2130
+ * @return {!proto.notification.GetNotificationRequest}
2131
+ */
2132
+ proto.notification.GetNotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
2133
+ while (reader.nextField()) {
2134
+ if (reader.isEndGroup()) {
2135
+ break;
2136
+ }
2137
+ var field = reader.getFieldNumber();
2138
+ switch (field) {
2139
+ case 1:
2140
+ var value = /** @type {number} */ (reader.readInt32());
2141
+ msg.setId(value);
2142
+ break;
2143
+ default:
2144
+ reader.skipField();
2145
+ break;
2146
+ }
2147
+ }
2148
+ return msg;
2149
+ };
2150
+
2151
+
2152
+ /**
2153
+ * Serializes the message to binary data (in protobuf wire format).
2154
+ * @return {!Uint8Array}
2155
+ */
2156
+ proto.notification.GetNotificationRequest.prototype.serializeBinary = function() {
2157
+ var writer = new jspb.BinaryWriter();
2158
+ proto.notification.GetNotificationRequest.serializeBinaryToWriter(this, writer);
2159
+ return writer.getResultBuffer();
2160
+ };
2161
+
2162
+
2163
+ /**
2164
+ * Serializes the given message to binary data (in protobuf wire
2165
+ * format), writing to the given BinaryWriter.
2166
+ * @param {!proto.notification.GetNotificationRequest} message
2167
+ * @param {!jspb.BinaryWriter} writer
2168
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2169
+ */
2170
+ proto.notification.GetNotificationRequest.serializeBinaryToWriter = function(message, writer) {
2171
+ var f = undefined;
2172
+ f = message.getId();
2173
+ if (f !== 0) {
2174
+ writer.writeInt32(
2175
+ 1,
2176
+ f
2177
+ );
2178
+ }
2179
+ };
2180
+
2181
+
2182
+ /**
2183
+ * optional int32 id = 1;
2184
+ * @return {number}
2185
+ */
2186
+ proto.notification.GetNotificationRequest.prototype.getId = function() {
2187
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2188
+ };
2189
+
2190
+
2191
+ /**
2192
+ * @param {number} value
2193
+ * @return {!proto.notification.GetNotificationRequest} returns this
2194
+ */
2195
+ proto.notification.GetNotificationRequest.prototype.setId = function(value) {
2196
+ return jspb.Message.setProto3IntField(this, 1, value);
2197
+ };
2198
+
2199
+
2200
+
2201
+ /**
2202
+ * List of repeated fields within this message type.
2203
+ * @private {!Array<number>}
2204
+ * @const
2205
+ */
2206
+ proto.notification.SendNotificationRequest.repeatedFields_ = [2];
2207
+
2208
+
2209
+
2210
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2211
+ /**
2212
+ * Creates an object representation of this proto.
2213
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2214
+ * Optional fields that are not set will be set to undefined.
2215
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2216
+ * For the list of reserved names please see:
2217
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2218
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2219
+ * JSPB instance for transitional soy proto support:
2220
+ * http://goto/soy-param-migration
2221
+ * @return {!Object}
2222
+ */
2223
+ proto.notification.SendNotificationRequest.prototype.toObject = function(opt_includeInstance) {
2224
+ return proto.notification.SendNotificationRequest.toObject(opt_includeInstance, this);
2225
+ };
2226
+
2227
+
2228
+ /**
2229
+ * Static version of the {@see toObject} method.
2230
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2231
+ * the JSPB instance for transitional soy proto support:
2232
+ * http://goto/soy-param-migration
2233
+ * @param {!proto.notification.SendNotificationRequest} msg The msg instance to transform.
2234
+ * @return {!Object}
2235
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2236
+ */
2237
+ proto.notification.SendNotificationRequest.toObject = function(includeInstance, msg) {
2238
+ var f, obj = {
2239
+ notificationId: jspb.Message.getFieldWithDefault(msg, 1, 0),
2240
+ userIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
2241
+ };
2242
+
2243
+ if (includeInstance) {
2244
+ obj.$jspbMessageInstance = msg;
2245
+ }
2246
+ return obj;
2247
+ };
2248
+ }
2249
+
2250
+
2251
+ /**
2252
+ * Deserializes binary data (in protobuf wire format).
2253
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2254
+ * @return {!proto.notification.SendNotificationRequest}
2255
+ */
2256
+ proto.notification.SendNotificationRequest.deserializeBinary = function(bytes) {
2257
+ var reader = new jspb.BinaryReader(bytes);
2258
+ var msg = new proto.notification.SendNotificationRequest;
2259
+ return proto.notification.SendNotificationRequest.deserializeBinaryFromReader(msg, reader);
2260
+ };
2261
+
2262
+
2263
+ /**
2264
+ * Deserializes binary data (in protobuf wire format) from the
2265
+ * given reader into the given message object.
2266
+ * @param {!proto.notification.SendNotificationRequest} msg The message object to deserialize into.
2267
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2268
+ * @return {!proto.notification.SendNotificationRequest}
2269
+ */
2270
+ proto.notification.SendNotificationRequest.deserializeBinaryFromReader = function(msg, reader) {
2271
+ while (reader.nextField()) {
2272
+ if (reader.isEndGroup()) {
2273
+ break;
2274
+ }
2275
+ var field = reader.getFieldNumber();
2276
+ switch (field) {
2277
+ case 1:
2278
+ var value = /** @type {number} */ (reader.readInt32());
2279
+ msg.setNotificationId(value);
2280
+ break;
2281
+ case 2:
2282
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]);
2283
+ for (var i = 0; i < values.length; i++) {
2284
+ msg.addUserIds(values[i]);
2285
+ }
2286
+ break;
2287
+ default:
2288
+ reader.skipField();
2289
+ break;
2290
+ }
2291
+ }
2292
+ return msg;
2293
+ };
2294
+
2295
+
2296
+ /**
2297
+ * Serializes the message to binary data (in protobuf wire format).
2298
+ * @return {!Uint8Array}
2299
+ */
2300
+ proto.notification.SendNotificationRequest.prototype.serializeBinary = function() {
2301
+ var writer = new jspb.BinaryWriter();
2302
+ proto.notification.SendNotificationRequest.serializeBinaryToWriter(this, writer);
2303
+ return writer.getResultBuffer();
2304
+ };
2305
+
2306
+
2307
+ /**
2308
+ * Serializes the given message to binary data (in protobuf wire
2309
+ * format), writing to the given BinaryWriter.
2310
+ * @param {!proto.notification.SendNotificationRequest} message
2311
+ * @param {!jspb.BinaryWriter} writer
2312
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2313
+ */
2314
+ proto.notification.SendNotificationRequest.serializeBinaryToWriter = function(message, writer) {
2315
+ var f = undefined;
2316
+ f = message.getNotificationId();
2317
+ if (f !== 0) {
2318
+ writer.writeInt32(
2319
+ 1,
2320
+ f
2321
+ );
2322
+ }
2323
+ f = message.getUserIdsList();
2324
+ if (f.length > 0) {
2325
+ writer.writePackedInt32(
2326
+ 2,
2327
+ f
2328
+ );
2329
+ }
2330
+ };
2331
+
2332
+
2333
+ /**
2334
+ * optional int32 notification_id = 1;
2335
+ * @return {number}
2336
+ */
2337
+ proto.notification.SendNotificationRequest.prototype.getNotificationId = function() {
2338
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2339
+ };
2340
+
2341
+
2342
+ /**
2343
+ * @param {number} value
2344
+ * @return {!proto.notification.SendNotificationRequest} returns this
2345
+ */
2346
+ proto.notification.SendNotificationRequest.prototype.setNotificationId = function(value) {
2347
+ return jspb.Message.setProto3IntField(this, 1, value);
2348
+ };
2349
+
2350
+
2351
+ /**
2352
+ * repeated int32 user_ids = 2;
2353
+ * @return {!Array<number>}
2354
+ */
2355
+ proto.notification.SendNotificationRequest.prototype.getUserIdsList = function() {
2356
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 2));
2357
+ };
2358
+
2359
+
2360
+ /**
2361
+ * @param {!Array<number>} value
2362
+ * @return {!proto.notification.SendNotificationRequest} returns this
2363
+ */
2364
+ proto.notification.SendNotificationRequest.prototype.setUserIdsList = function(value) {
2365
+ return jspb.Message.setField(this, 2, value || []);
2366
+ };
2367
+
2368
+
2369
+ /**
2370
+ * @param {number} value
2371
+ * @param {number=} opt_index
2372
+ * @return {!proto.notification.SendNotificationRequest} returns this
2373
+ */
2374
+ proto.notification.SendNotificationRequest.prototype.addUserIds = function(value, opt_index) {
2375
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
2376
+ };
2377
+
2378
+
2379
+ /**
2380
+ * Clears the list making it empty but non-null.
2381
+ * @return {!proto.notification.SendNotificationRequest} returns this
2382
+ */
2383
+ proto.notification.SendNotificationRequest.prototype.clearUserIdsList = function() {
2384
+ return this.setUserIdsList([]);
2385
+ };
2386
+
2387
+
2388
+
2389
+
2390
+
2391
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2392
+ /**
2393
+ * Creates an object representation of this proto.
2394
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2395
+ * Optional fields that are not set will be set to undefined.
2396
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2397
+ * For the list of reserved names please see:
2398
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2399
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2400
+ * JSPB instance for transitional soy proto support:
2401
+ * http://goto/soy-param-migration
2402
+ * @return {!Object}
2403
+ */
2404
+ proto.notification.NotificationStatusResponse.prototype.toObject = function(opt_includeInstance) {
2405
+ return proto.notification.NotificationStatusResponse.toObject(opt_includeInstance, this);
2406
+ };
2407
+
2408
+
2409
+ /**
2410
+ * Static version of the {@see toObject} method.
2411
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2412
+ * the JSPB instance for transitional soy proto support:
2413
+ * http://goto/soy-param-migration
2414
+ * @param {!proto.notification.NotificationStatusResponse} msg The msg instance to transform.
2415
+ * @return {!Object}
2416
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2417
+ */
2418
+ proto.notification.NotificationStatusResponse.toObject = function(includeInstance, msg) {
2419
+ var f, obj = {
2420
+ status: jspb.Message.getFieldWithDefault(msg, 1, "")
2421
+ };
2422
+
2423
+ if (includeInstance) {
2424
+ obj.$jspbMessageInstance = msg;
2425
+ }
2426
+ return obj;
2427
+ };
2428
+ }
2429
+
2430
+
2431
+ /**
2432
+ * Deserializes binary data (in protobuf wire format).
2433
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2434
+ * @return {!proto.notification.NotificationStatusResponse}
2435
+ */
2436
+ proto.notification.NotificationStatusResponse.deserializeBinary = function(bytes) {
2437
+ var reader = new jspb.BinaryReader(bytes);
2438
+ var msg = new proto.notification.NotificationStatusResponse;
2439
+ return proto.notification.NotificationStatusResponse.deserializeBinaryFromReader(msg, reader);
2440
+ };
2441
+
2442
+
2443
+ /**
2444
+ * Deserializes binary data (in protobuf wire format) from the
2445
+ * given reader into the given message object.
2446
+ * @param {!proto.notification.NotificationStatusResponse} msg The message object to deserialize into.
2447
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2448
+ * @return {!proto.notification.NotificationStatusResponse}
2449
+ */
2450
+ proto.notification.NotificationStatusResponse.deserializeBinaryFromReader = function(msg, reader) {
2451
+ while (reader.nextField()) {
2452
+ if (reader.isEndGroup()) {
2453
+ break;
2454
+ }
2455
+ var field = reader.getFieldNumber();
2456
+ switch (field) {
2457
+ case 1:
2458
+ var value = /** @type {string} */ (reader.readString());
2459
+ msg.setStatus(value);
2460
+ break;
2461
+ default:
2462
+ reader.skipField();
2463
+ break;
2464
+ }
2465
+ }
2466
+ return msg;
2467
+ };
2468
+
2469
+
2470
+ /**
2471
+ * Serializes the message to binary data (in protobuf wire format).
2472
+ * @return {!Uint8Array}
2473
+ */
2474
+ proto.notification.NotificationStatusResponse.prototype.serializeBinary = function() {
2475
+ var writer = new jspb.BinaryWriter();
2476
+ proto.notification.NotificationStatusResponse.serializeBinaryToWriter(this, writer);
2477
+ return writer.getResultBuffer();
2478
+ };
2479
+
2480
+
2481
+ /**
2482
+ * Serializes the given message to binary data (in protobuf wire
2483
+ * format), writing to the given BinaryWriter.
2484
+ * @param {!proto.notification.NotificationStatusResponse} message
2485
+ * @param {!jspb.BinaryWriter} writer
2486
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2487
+ */
2488
+ proto.notification.NotificationStatusResponse.serializeBinaryToWriter = function(message, writer) {
2489
+ var f = undefined;
1954
2490
  f = message.getStatus();
1955
2491
  if (f.length > 0) {
1956
2492
  writer.writeString(
@@ -2772,6 +3308,157 @@ proto.notification.NotificationItem.prototype.hasCreated = function() {
2772
3308
 
2773
3309
 
2774
3310
 
3311
+
3312
+
3313
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3314
+ /**
3315
+ * Creates an object representation of this proto.
3316
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3317
+ * Optional fields that are not set will be set to undefined.
3318
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3319
+ * For the list of reserved names please see:
3320
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3321
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3322
+ * JSPB instance for transitional soy proto support:
3323
+ * http://goto/soy-param-migration
3324
+ * @return {!Object}
3325
+ */
3326
+ proto.notification.NotificationResponse.prototype.toObject = function(opt_includeInstance) {
3327
+ return proto.notification.NotificationResponse.toObject(opt_includeInstance, this);
3328
+ };
3329
+
3330
+
3331
+ /**
3332
+ * Static version of the {@see toObject} method.
3333
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3334
+ * the JSPB instance for transitional soy proto support:
3335
+ * http://goto/soy-param-migration
3336
+ * @param {!proto.notification.NotificationResponse} msg The msg instance to transform.
3337
+ * @return {!Object}
3338
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3339
+ */
3340
+ proto.notification.NotificationResponse.toObject = function(includeInstance, msg) {
3341
+ var f, obj = {
3342
+ data: (f = msg.getData()) && proto.notification.NotificationItem.toObject(includeInstance, f)
3343
+ };
3344
+
3345
+ if (includeInstance) {
3346
+ obj.$jspbMessageInstance = msg;
3347
+ }
3348
+ return obj;
3349
+ };
3350
+ }
3351
+
3352
+
3353
+ /**
3354
+ * Deserializes binary data (in protobuf wire format).
3355
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3356
+ * @return {!proto.notification.NotificationResponse}
3357
+ */
3358
+ proto.notification.NotificationResponse.deserializeBinary = function(bytes) {
3359
+ var reader = new jspb.BinaryReader(bytes);
3360
+ var msg = new proto.notification.NotificationResponse;
3361
+ return proto.notification.NotificationResponse.deserializeBinaryFromReader(msg, reader);
3362
+ };
3363
+
3364
+
3365
+ /**
3366
+ * Deserializes binary data (in protobuf wire format) from the
3367
+ * given reader into the given message object.
3368
+ * @param {!proto.notification.NotificationResponse} msg The message object to deserialize into.
3369
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3370
+ * @return {!proto.notification.NotificationResponse}
3371
+ */
3372
+ proto.notification.NotificationResponse.deserializeBinaryFromReader = function(msg, reader) {
3373
+ while (reader.nextField()) {
3374
+ if (reader.isEndGroup()) {
3375
+ break;
3376
+ }
3377
+ var field = reader.getFieldNumber();
3378
+ switch (field) {
3379
+ case 1:
3380
+ var value = new proto.notification.NotificationItem;
3381
+ reader.readMessage(value,proto.notification.NotificationItem.deserializeBinaryFromReader);
3382
+ msg.setData(value);
3383
+ break;
3384
+ default:
3385
+ reader.skipField();
3386
+ break;
3387
+ }
3388
+ }
3389
+ return msg;
3390
+ };
3391
+
3392
+
3393
+ /**
3394
+ * Serializes the message to binary data (in protobuf wire format).
3395
+ * @return {!Uint8Array}
3396
+ */
3397
+ proto.notification.NotificationResponse.prototype.serializeBinary = function() {
3398
+ var writer = new jspb.BinaryWriter();
3399
+ proto.notification.NotificationResponse.serializeBinaryToWriter(this, writer);
3400
+ return writer.getResultBuffer();
3401
+ };
3402
+
3403
+
3404
+ /**
3405
+ * Serializes the given message to binary data (in protobuf wire
3406
+ * format), writing to the given BinaryWriter.
3407
+ * @param {!proto.notification.NotificationResponse} message
3408
+ * @param {!jspb.BinaryWriter} writer
3409
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3410
+ */
3411
+ proto.notification.NotificationResponse.serializeBinaryToWriter = function(message, writer) {
3412
+ var f = undefined;
3413
+ f = message.getData();
3414
+ if (f != null) {
3415
+ writer.writeMessage(
3416
+ 1,
3417
+ f,
3418
+ proto.notification.NotificationItem.serializeBinaryToWriter
3419
+ );
3420
+ }
3421
+ };
3422
+
3423
+
3424
+ /**
3425
+ * optional NotificationItem data = 1;
3426
+ * @return {?proto.notification.NotificationItem}
3427
+ */
3428
+ proto.notification.NotificationResponse.prototype.getData = function() {
3429
+ return /** @type{?proto.notification.NotificationItem} */ (
3430
+ jspb.Message.getWrapperField(this, proto.notification.NotificationItem, 1));
3431
+ };
3432
+
3433
+
3434
+ /**
3435
+ * @param {?proto.notification.NotificationItem|undefined} value
3436
+ * @return {!proto.notification.NotificationResponse} returns this
3437
+ */
3438
+ proto.notification.NotificationResponse.prototype.setData = function(value) {
3439
+ return jspb.Message.setWrapperField(this, 1, value);
3440
+ };
3441
+
3442
+
3443
+ /**
3444
+ * Clears the message field making it undefined.
3445
+ * @return {!proto.notification.NotificationResponse} returns this
3446
+ */
3447
+ proto.notification.NotificationResponse.prototype.clearData = function() {
3448
+ return this.setData(undefined);
3449
+ };
3450
+
3451
+
3452
+ /**
3453
+ * Returns whether this field is set.
3454
+ * @return {boolean}
3455
+ */
3456
+ proto.notification.NotificationResponse.prototype.hasData = function() {
3457
+ return jspb.Message.getField(this, 1) != null;
3458
+ };
3459
+
3460
+
3461
+
2775
3462
  /**
2776
3463
  * List of repeated fields within this message type.
2777
3464
  * @private {!Array<number>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.0.184",
3
+ "version": "1.0.185",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {