protobuf-platform 1.2.754 → 1.2.755

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.
@@ -32,6 +32,8 @@ goog.exportSymbol('proto.notification.GetMailTemplateRequest', null, global);
32
32
  goog.exportSymbol('proto.notification.GetMailTemplateTranslationRequest', null, global);
33
33
  goog.exportSymbol('proto.notification.GetNotificationRequest', null, global);
34
34
  goog.exportSymbol('proto.notification.GetNotificationTranslationRequest', null, global);
35
+ goog.exportSymbol('proto.notification.IssueOneSignalWebPushTokenRequest', null, global);
36
+ goog.exportSymbol('proto.notification.IssueOneSignalWebPushTokenResponse', null, global);
35
37
  goog.exportSymbol('proto.notification.ItemsBunchRequest', null, global);
36
38
  goog.exportSymbol('proto.notification.MailTemplateChunk', null, global);
37
39
  goog.exportSymbol('proto.notification.MailTemplateChunk.DataOrFileCase', null, global);
@@ -58,6 +60,8 @@ goog.exportSymbol('proto.notification.NotificationTargetTypeItem', null, global)
58
60
  goog.exportSymbol('proto.notification.NotificationTargetTypeItemsResponse', null, global);
59
61
  goog.exportSymbol('proto.notification.NotificationTranslationRequest', null, global);
60
62
  goog.exportSymbol('proto.notification.NotificationTranslationResponse', null, global);
63
+ goog.exportSymbol('proto.notification.ObserveOneSignalWebPushSubscriptionRequest', null, global);
64
+ goog.exportSymbol('proto.notification.ObserveOneSignalWebPushSubscriptionResponse', null, global);
61
65
  goog.exportSymbol('proto.notification.PaginationRequest', null, global);
62
66
  goog.exportSymbol('proto.notification.PingRequest', null, global);
63
67
  goog.exportSymbol('proto.notification.PongResponse', null, global);
@@ -73,6 +77,90 @@ goog.exportSymbol('proto.notification.UserNotificationItem', null, global);
73
77
  goog.exportSymbol('proto.notification.UserNotificationItemsResponse', null, global);
74
78
  goog.exportSymbol('proto.notification.UserNotificationsCountResponse', null, global);
75
79
  goog.exportSymbol('proto.notification.UserSearchRequest', null, global);
80
+ /**
81
+ * Generated by JsPbCodeGenerator.
82
+ * @param {Array=} opt_data Optional initial data array, typically from a
83
+ * server response, or constructed directly in Javascript. The array is used
84
+ * in place and becomes part of the constructed object. It is not cloned.
85
+ * If no data is provided, the constructed object will be empty, but still
86
+ * valid.
87
+ * @extends {jspb.Message}
88
+ * @constructor
89
+ */
90
+ proto.notification.IssueOneSignalWebPushTokenRequest = function(opt_data) {
91
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
92
+ };
93
+ goog.inherits(proto.notification.IssueOneSignalWebPushTokenRequest, jspb.Message);
94
+ if (goog.DEBUG && !COMPILED) {
95
+ /**
96
+ * @public
97
+ * @override
98
+ */
99
+ proto.notification.IssueOneSignalWebPushTokenRequest.displayName = 'proto.notification.IssueOneSignalWebPushTokenRequest';
100
+ }
101
+ /**
102
+ * Generated by JsPbCodeGenerator.
103
+ * @param {Array=} opt_data Optional initial data array, typically from a
104
+ * server response, or constructed directly in Javascript. The array is used
105
+ * in place and becomes part of the constructed object. It is not cloned.
106
+ * If no data is provided, the constructed object will be empty, but still
107
+ * valid.
108
+ * @extends {jspb.Message}
109
+ * @constructor
110
+ */
111
+ proto.notification.IssueOneSignalWebPushTokenResponse = function(opt_data) {
112
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
113
+ };
114
+ goog.inherits(proto.notification.IssueOneSignalWebPushTokenResponse, jspb.Message);
115
+ if (goog.DEBUG && !COMPILED) {
116
+ /**
117
+ * @public
118
+ * @override
119
+ */
120
+ proto.notification.IssueOneSignalWebPushTokenResponse.displayName = 'proto.notification.IssueOneSignalWebPushTokenResponse';
121
+ }
122
+ /**
123
+ * Generated by JsPbCodeGenerator.
124
+ * @param {Array=} opt_data Optional initial data array, typically from a
125
+ * server response, or constructed directly in Javascript. The array is used
126
+ * in place and becomes part of the constructed object. It is not cloned.
127
+ * If no data is provided, the constructed object will be empty, but still
128
+ * valid.
129
+ * @extends {jspb.Message}
130
+ * @constructor
131
+ */
132
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest = function(opt_data) {
133
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
134
+ };
135
+ goog.inherits(proto.notification.ObserveOneSignalWebPushSubscriptionRequest, jspb.Message);
136
+ if (goog.DEBUG && !COMPILED) {
137
+ /**
138
+ * @public
139
+ * @override
140
+ */
141
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.displayName = 'proto.notification.ObserveOneSignalWebPushSubscriptionRequest';
142
+ }
143
+ /**
144
+ * Generated by JsPbCodeGenerator.
145
+ * @param {Array=} opt_data Optional initial data array, typically from a
146
+ * server response, or constructed directly in Javascript. The array is used
147
+ * in place and becomes part of the constructed object. It is not cloned.
148
+ * If no data is provided, the constructed object will be empty, but still
149
+ * valid.
150
+ * @extends {jspb.Message}
151
+ * @constructor
152
+ */
153
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse = function(opt_data) {
154
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
155
+ };
156
+ goog.inherits(proto.notification.ObserveOneSignalWebPushSubscriptionResponse, jspb.Message);
157
+ if (goog.DEBUG && !COMPILED) {
158
+ /**
159
+ * @public
160
+ * @override
161
+ */
162
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.displayName = 'proto.notification.ObserveOneSignalWebPushSubscriptionResponse';
163
+ }
76
164
  /**
77
165
  * Generated by JsPbCodeGenerator.
78
166
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -1126,6 +1214,946 @@ if (goog.DEBUG && !COMPILED) {
1126
1214
 
1127
1215
 
1128
1216
 
1217
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1218
+ /**
1219
+ * Creates an object representation of this proto.
1220
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1221
+ * Optional fields that are not set will be set to undefined.
1222
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1223
+ * For the list of reserved names please see:
1224
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1225
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1226
+ * JSPB instance for transitional soy proto support:
1227
+ * http://goto/soy-param-migration
1228
+ * @return {!Object}
1229
+ */
1230
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.toObject = function(opt_includeInstance) {
1231
+ return proto.notification.IssueOneSignalWebPushTokenRequest.toObject(opt_includeInstance, this);
1232
+ };
1233
+
1234
+
1235
+ /**
1236
+ * Static version of the {@see toObject} method.
1237
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1238
+ * the JSPB instance for transitional soy proto support:
1239
+ * http://goto/soy-param-migration
1240
+ * @param {!proto.notification.IssueOneSignalWebPushTokenRequest} msg The msg instance to transform.
1241
+ * @return {!Object}
1242
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1243
+ */
1244
+ proto.notification.IssueOneSignalWebPushTokenRequest.toObject = function(includeInstance, msg) {
1245
+ var f, obj = {
1246
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1247
+ publicId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1248
+ websiteHostname: jspb.Message.getFieldWithDefault(msg, 3, "")
1249
+ };
1250
+
1251
+ if (includeInstance) {
1252
+ obj.$jspbMessageInstance = msg;
1253
+ }
1254
+ return obj;
1255
+ };
1256
+ }
1257
+
1258
+
1259
+ /**
1260
+ * Deserializes binary data (in protobuf wire format).
1261
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1262
+ * @return {!proto.notification.IssueOneSignalWebPushTokenRequest}
1263
+ */
1264
+ proto.notification.IssueOneSignalWebPushTokenRequest.deserializeBinary = function(bytes) {
1265
+ var reader = new jspb.BinaryReader(bytes);
1266
+ var msg = new proto.notification.IssueOneSignalWebPushTokenRequest;
1267
+ return proto.notification.IssueOneSignalWebPushTokenRequest.deserializeBinaryFromReader(msg, reader);
1268
+ };
1269
+
1270
+
1271
+ /**
1272
+ * Deserializes binary data (in protobuf wire format) from the
1273
+ * given reader into the given message object.
1274
+ * @param {!proto.notification.IssueOneSignalWebPushTokenRequest} msg The message object to deserialize into.
1275
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1276
+ * @return {!proto.notification.IssueOneSignalWebPushTokenRequest}
1277
+ */
1278
+ proto.notification.IssueOneSignalWebPushTokenRequest.deserializeBinaryFromReader = function(msg, reader) {
1279
+ while (reader.nextField()) {
1280
+ if (reader.isEndGroup()) {
1281
+ break;
1282
+ }
1283
+ var field = reader.getFieldNumber();
1284
+ switch (field) {
1285
+ case 1:
1286
+ var value = /** @type {number} */ (reader.readInt32());
1287
+ msg.setUserId(value);
1288
+ break;
1289
+ case 2:
1290
+ var value = /** @type {string} */ (reader.readString());
1291
+ msg.setPublicId(value);
1292
+ break;
1293
+ case 3:
1294
+ var value = /** @type {string} */ (reader.readString());
1295
+ msg.setWebsiteHostname(value);
1296
+ break;
1297
+ default:
1298
+ reader.skipField();
1299
+ break;
1300
+ }
1301
+ }
1302
+ return msg;
1303
+ };
1304
+
1305
+
1306
+ /**
1307
+ * Serializes the message to binary data (in protobuf wire format).
1308
+ * @return {!Uint8Array}
1309
+ */
1310
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.serializeBinary = function() {
1311
+ var writer = new jspb.BinaryWriter();
1312
+ proto.notification.IssueOneSignalWebPushTokenRequest.serializeBinaryToWriter(this, writer);
1313
+ return writer.getResultBuffer();
1314
+ };
1315
+
1316
+
1317
+ /**
1318
+ * Serializes the given message to binary data (in protobuf wire
1319
+ * format), writing to the given BinaryWriter.
1320
+ * @param {!proto.notification.IssueOneSignalWebPushTokenRequest} message
1321
+ * @param {!jspb.BinaryWriter} writer
1322
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1323
+ */
1324
+ proto.notification.IssueOneSignalWebPushTokenRequest.serializeBinaryToWriter = function(message, writer) {
1325
+ var f = undefined;
1326
+ f = message.getUserId();
1327
+ if (f !== 0) {
1328
+ writer.writeInt32(
1329
+ 1,
1330
+ f
1331
+ );
1332
+ }
1333
+ f = message.getPublicId();
1334
+ if (f.length > 0) {
1335
+ writer.writeString(
1336
+ 2,
1337
+ f
1338
+ );
1339
+ }
1340
+ f = message.getWebsiteHostname();
1341
+ if (f.length > 0) {
1342
+ writer.writeString(
1343
+ 3,
1344
+ f
1345
+ );
1346
+ }
1347
+ };
1348
+
1349
+
1350
+ /**
1351
+ * optional int32 user_id = 1;
1352
+ * @return {number}
1353
+ */
1354
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.getUserId = function() {
1355
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1356
+ };
1357
+
1358
+
1359
+ /**
1360
+ * @param {number} value
1361
+ * @return {!proto.notification.IssueOneSignalWebPushTokenRequest} returns this
1362
+ */
1363
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.setUserId = function(value) {
1364
+ return jspb.Message.setProto3IntField(this, 1, value);
1365
+ };
1366
+
1367
+
1368
+ /**
1369
+ * optional string public_id = 2;
1370
+ * @return {string}
1371
+ */
1372
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.getPublicId = function() {
1373
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1374
+ };
1375
+
1376
+
1377
+ /**
1378
+ * @param {string} value
1379
+ * @return {!proto.notification.IssueOneSignalWebPushTokenRequest} returns this
1380
+ */
1381
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.setPublicId = function(value) {
1382
+ return jspb.Message.setProto3StringField(this, 2, value);
1383
+ };
1384
+
1385
+
1386
+ /**
1387
+ * optional string website_hostname = 3;
1388
+ * @return {string}
1389
+ */
1390
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.getWebsiteHostname = function() {
1391
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1392
+ };
1393
+
1394
+
1395
+ /**
1396
+ * @param {string} value
1397
+ * @return {!proto.notification.IssueOneSignalWebPushTokenRequest} returns this
1398
+ */
1399
+ proto.notification.IssueOneSignalWebPushTokenRequest.prototype.setWebsiteHostname = function(value) {
1400
+ return jspb.Message.setProto3StringField(this, 3, value);
1401
+ };
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1408
+ /**
1409
+ * Creates an object representation of this proto.
1410
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1411
+ * Optional fields that are not set will be set to undefined.
1412
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1413
+ * For the list of reserved names please see:
1414
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1415
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1416
+ * JSPB instance for transitional soy proto support:
1417
+ * http://goto/soy-param-migration
1418
+ * @return {!Object}
1419
+ */
1420
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.toObject = function(opt_includeInstance) {
1421
+ return proto.notification.IssueOneSignalWebPushTokenResponse.toObject(opt_includeInstance, this);
1422
+ };
1423
+
1424
+
1425
+ /**
1426
+ * Static version of the {@see toObject} method.
1427
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1428
+ * the JSPB instance for transitional soy proto support:
1429
+ * http://goto/soy-param-migration
1430
+ * @param {!proto.notification.IssueOneSignalWebPushTokenResponse} msg The msg instance to transform.
1431
+ * @return {!Object}
1432
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1433
+ */
1434
+ proto.notification.IssueOneSignalWebPushTokenResponse.toObject = function(includeInstance, msg) {
1435
+ var f, obj = {
1436
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
1437
+ appId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1438
+ externalId: jspb.Message.getFieldWithDefault(msg, 3, ""),
1439
+ token: jspb.Message.getFieldWithDefault(msg, 4, ""),
1440
+ expiresAt: jspb.Message.getFieldWithDefault(msg, 5, 0)
1441
+ };
1442
+
1443
+ if (includeInstance) {
1444
+ obj.$jspbMessageInstance = msg;
1445
+ }
1446
+ return obj;
1447
+ };
1448
+ }
1449
+
1450
+
1451
+ /**
1452
+ * Deserializes binary data (in protobuf wire format).
1453
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1454
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse}
1455
+ */
1456
+ proto.notification.IssueOneSignalWebPushTokenResponse.deserializeBinary = function(bytes) {
1457
+ var reader = new jspb.BinaryReader(bytes);
1458
+ var msg = new proto.notification.IssueOneSignalWebPushTokenResponse;
1459
+ return proto.notification.IssueOneSignalWebPushTokenResponse.deserializeBinaryFromReader(msg, reader);
1460
+ };
1461
+
1462
+
1463
+ /**
1464
+ * Deserializes binary data (in protobuf wire format) from the
1465
+ * given reader into the given message object.
1466
+ * @param {!proto.notification.IssueOneSignalWebPushTokenResponse} msg The message object to deserialize into.
1467
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1468
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse}
1469
+ */
1470
+ proto.notification.IssueOneSignalWebPushTokenResponse.deserializeBinaryFromReader = function(msg, reader) {
1471
+ while (reader.nextField()) {
1472
+ if (reader.isEndGroup()) {
1473
+ break;
1474
+ }
1475
+ var field = reader.getFieldNumber();
1476
+ switch (field) {
1477
+ case 1:
1478
+ var value = /** @type {boolean} */ (reader.readBool());
1479
+ msg.setEnabled(value);
1480
+ break;
1481
+ case 2:
1482
+ var value = /** @type {string} */ (reader.readString());
1483
+ msg.setAppId(value);
1484
+ break;
1485
+ case 3:
1486
+ var value = /** @type {string} */ (reader.readString());
1487
+ msg.setExternalId(value);
1488
+ break;
1489
+ case 4:
1490
+ var value = /** @type {string} */ (reader.readString());
1491
+ msg.setToken(value);
1492
+ break;
1493
+ case 5:
1494
+ var value = /** @type {number} */ (reader.readInt32());
1495
+ msg.setExpiresAt(value);
1496
+ break;
1497
+ default:
1498
+ reader.skipField();
1499
+ break;
1500
+ }
1501
+ }
1502
+ return msg;
1503
+ };
1504
+
1505
+
1506
+ /**
1507
+ * Serializes the message to binary data (in protobuf wire format).
1508
+ * @return {!Uint8Array}
1509
+ */
1510
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.serializeBinary = function() {
1511
+ var writer = new jspb.BinaryWriter();
1512
+ proto.notification.IssueOneSignalWebPushTokenResponse.serializeBinaryToWriter(this, writer);
1513
+ return writer.getResultBuffer();
1514
+ };
1515
+
1516
+
1517
+ /**
1518
+ * Serializes the given message to binary data (in protobuf wire
1519
+ * format), writing to the given BinaryWriter.
1520
+ * @param {!proto.notification.IssueOneSignalWebPushTokenResponse} message
1521
+ * @param {!jspb.BinaryWriter} writer
1522
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1523
+ */
1524
+ proto.notification.IssueOneSignalWebPushTokenResponse.serializeBinaryToWriter = function(message, writer) {
1525
+ var f = undefined;
1526
+ f = message.getEnabled();
1527
+ if (f) {
1528
+ writer.writeBool(
1529
+ 1,
1530
+ f
1531
+ );
1532
+ }
1533
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1534
+ if (f != null) {
1535
+ writer.writeString(
1536
+ 2,
1537
+ f
1538
+ );
1539
+ }
1540
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
1541
+ if (f != null) {
1542
+ writer.writeString(
1543
+ 3,
1544
+ f
1545
+ );
1546
+ }
1547
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1548
+ if (f != null) {
1549
+ writer.writeString(
1550
+ 4,
1551
+ f
1552
+ );
1553
+ }
1554
+ f = /** @type {number} */ (jspb.Message.getField(message, 5));
1555
+ if (f != null) {
1556
+ writer.writeInt32(
1557
+ 5,
1558
+ f
1559
+ );
1560
+ }
1561
+ };
1562
+
1563
+
1564
+ /**
1565
+ * optional bool enabled = 1;
1566
+ * @return {boolean}
1567
+ */
1568
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.getEnabled = function() {
1569
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
1570
+ };
1571
+
1572
+
1573
+ /**
1574
+ * @param {boolean} value
1575
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1576
+ */
1577
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.setEnabled = function(value) {
1578
+ return jspb.Message.setProto3BooleanField(this, 1, value);
1579
+ };
1580
+
1581
+
1582
+ /**
1583
+ * optional string app_id = 2;
1584
+ * @return {string}
1585
+ */
1586
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.getAppId = function() {
1587
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1588
+ };
1589
+
1590
+
1591
+ /**
1592
+ * @param {string} value
1593
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1594
+ */
1595
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.setAppId = function(value) {
1596
+ return jspb.Message.setField(this, 2, value);
1597
+ };
1598
+
1599
+
1600
+ /**
1601
+ * Clears the field making it undefined.
1602
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1603
+ */
1604
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.clearAppId = function() {
1605
+ return jspb.Message.setField(this, 2, undefined);
1606
+ };
1607
+
1608
+
1609
+ /**
1610
+ * Returns whether this field is set.
1611
+ * @return {boolean}
1612
+ */
1613
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.hasAppId = function() {
1614
+ return jspb.Message.getField(this, 2) != null;
1615
+ };
1616
+
1617
+
1618
+ /**
1619
+ * optional string external_id = 3;
1620
+ * @return {string}
1621
+ */
1622
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.getExternalId = function() {
1623
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1624
+ };
1625
+
1626
+
1627
+ /**
1628
+ * @param {string} value
1629
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1630
+ */
1631
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.setExternalId = function(value) {
1632
+ return jspb.Message.setField(this, 3, value);
1633
+ };
1634
+
1635
+
1636
+ /**
1637
+ * Clears the field making it undefined.
1638
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1639
+ */
1640
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.clearExternalId = function() {
1641
+ return jspb.Message.setField(this, 3, undefined);
1642
+ };
1643
+
1644
+
1645
+ /**
1646
+ * Returns whether this field is set.
1647
+ * @return {boolean}
1648
+ */
1649
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.hasExternalId = function() {
1650
+ return jspb.Message.getField(this, 3) != null;
1651
+ };
1652
+
1653
+
1654
+ /**
1655
+ * optional string token = 4;
1656
+ * @return {string}
1657
+ */
1658
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.getToken = function() {
1659
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1660
+ };
1661
+
1662
+
1663
+ /**
1664
+ * @param {string} value
1665
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1666
+ */
1667
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.setToken = function(value) {
1668
+ return jspb.Message.setField(this, 4, value);
1669
+ };
1670
+
1671
+
1672
+ /**
1673
+ * Clears the field making it undefined.
1674
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1675
+ */
1676
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.clearToken = function() {
1677
+ return jspb.Message.setField(this, 4, undefined);
1678
+ };
1679
+
1680
+
1681
+ /**
1682
+ * Returns whether this field is set.
1683
+ * @return {boolean}
1684
+ */
1685
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.hasToken = function() {
1686
+ return jspb.Message.getField(this, 4) != null;
1687
+ };
1688
+
1689
+
1690
+ /**
1691
+ * optional int32 expires_at = 5;
1692
+ * @return {number}
1693
+ */
1694
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.getExpiresAt = function() {
1695
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1696
+ };
1697
+
1698
+
1699
+ /**
1700
+ * @param {number} value
1701
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1702
+ */
1703
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.setExpiresAt = function(value) {
1704
+ return jspb.Message.setField(this, 5, value);
1705
+ };
1706
+
1707
+
1708
+ /**
1709
+ * Clears the field making it undefined.
1710
+ * @return {!proto.notification.IssueOneSignalWebPushTokenResponse} returns this
1711
+ */
1712
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.clearExpiresAt = function() {
1713
+ return jspb.Message.setField(this, 5, undefined);
1714
+ };
1715
+
1716
+
1717
+ /**
1718
+ * Returns whether this field is set.
1719
+ * @return {boolean}
1720
+ */
1721
+ proto.notification.IssueOneSignalWebPushTokenResponse.prototype.hasExpiresAt = function() {
1722
+ return jspb.Message.getField(this, 5) != null;
1723
+ };
1724
+
1725
+
1726
+
1727
+
1728
+
1729
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1730
+ /**
1731
+ * Creates an object representation of this proto.
1732
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1733
+ * Optional fields that are not set will be set to undefined.
1734
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1735
+ * For the list of reserved names please see:
1736
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1737
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1738
+ * JSPB instance for transitional soy proto support:
1739
+ * http://goto/soy-param-migration
1740
+ * @return {!Object}
1741
+ */
1742
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.toObject = function(opt_includeInstance) {
1743
+ return proto.notification.ObserveOneSignalWebPushSubscriptionRequest.toObject(opt_includeInstance, this);
1744
+ };
1745
+
1746
+
1747
+ /**
1748
+ * Static version of the {@see toObject} method.
1749
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1750
+ * the JSPB instance for transitional soy proto support:
1751
+ * http://goto/soy-param-migration
1752
+ * @param {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} msg The msg instance to transform.
1753
+ * @return {!Object}
1754
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1755
+ */
1756
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.toObject = function(includeInstance, msg) {
1757
+ var f, obj = {
1758
+ userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
1759
+ publicId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1760
+ websiteHostname: jspb.Message.getFieldWithDefault(msg, 3, ""),
1761
+ subscribed: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
1762
+ };
1763
+
1764
+ if (includeInstance) {
1765
+ obj.$jspbMessageInstance = msg;
1766
+ }
1767
+ return obj;
1768
+ };
1769
+ }
1770
+
1771
+
1772
+ /**
1773
+ * Deserializes binary data (in protobuf wire format).
1774
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1775
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest}
1776
+ */
1777
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.deserializeBinary = function(bytes) {
1778
+ var reader = new jspb.BinaryReader(bytes);
1779
+ var msg = new proto.notification.ObserveOneSignalWebPushSubscriptionRequest;
1780
+ return proto.notification.ObserveOneSignalWebPushSubscriptionRequest.deserializeBinaryFromReader(msg, reader);
1781
+ };
1782
+
1783
+
1784
+ /**
1785
+ * Deserializes binary data (in protobuf wire format) from the
1786
+ * given reader into the given message object.
1787
+ * @param {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} msg The message object to deserialize into.
1788
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1789
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest}
1790
+ */
1791
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.deserializeBinaryFromReader = function(msg, reader) {
1792
+ while (reader.nextField()) {
1793
+ if (reader.isEndGroup()) {
1794
+ break;
1795
+ }
1796
+ var field = reader.getFieldNumber();
1797
+ switch (field) {
1798
+ case 1:
1799
+ var value = /** @type {number} */ (reader.readInt32());
1800
+ msg.setUserId(value);
1801
+ break;
1802
+ case 2:
1803
+ var value = /** @type {string} */ (reader.readString());
1804
+ msg.setPublicId(value);
1805
+ break;
1806
+ case 3:
1807
+ var value = /** @type {string} */ (reader.readString());
1808
+ msg.setWebsiteHostname(value);
1809
+ break;
1810
+ case 4:
1811
+ var value = /** @type {boolean} */ (reader.readBool());
1812
+ msg.setSubscribed(value);
1813
+ break;
1814
+ default:
1815
+ reader.skipField();
1816
+ break;
1817
+ }
1818
+ }
1819
+ return msg;
1820
+ };
1821
+
1822
+
1823
+ /**
1824
+ * Serializes the message to binary data (in protobuf wire format).
1825
+ * @return {!Uint8Array}
1826
+ */
1827
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.serializeBinary = function() {
1828
+ var writer = new jspb.BinaryWriter();
1829
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.serializeBinaryToWriter(this, writer);
1830
+ return writer.getResultBuffer();
1831
+ };
1832
+
1833
+
1834
+ /**
1835
+ * Serializes the given message to binary data (in protobuf wire
1836
+ * format), writing to the given BinaryWriter.
1837
+ * @param {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} message
1838
+ * @param {!jspb.BinaryWriter} writer
1839
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1840
+ */
1841
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.serializeBinaryToWriter = function(message, writer) {
1842
+ var f = undefined;
1843
+ f = message.getUserId();
1844
+ if (f !== 0) {
1845
+ writer.writeInt32(
1846
+ 1,
1847
+ f
1848
+ );
1849
+ }
1850
+ f = message.getPublicId();
1851
+ if (f.length > 0) {
1852
+ writer.writeString(
1853
+ 2,
1854
+ f
1855
+ );
1856
+ }
1857
+ f = message.getWebsiteHostname();
1858
+ if (f.length > 0) {
1859
+ writer.writeString(
1860
+ 3,
1861
+ f
1862
+ );
1863
+ }
1864
+ f = message.getSubscribed();
1865
+ if (f) {
1866
+ writer.writeBool(
1867
+ 4,
1868
+ f
1869
+ );
1870
+ }
1871
+ };
1872
+
1873
+
1874
+ /**
1875
+ * optional int32 user_id = 1;
1876
+ * @return {number}
1877
+ */
1878
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.getUserId = function() {
1879
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1880
+ };
1881
+
1882
+
1883
+ /**
1884
+ * @param {number} value
1885
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} returns this
1886
+ */
1887
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.setUserId = function(value) {
1888
+ return jspb.Message.setProto3IntField(this, 1, value);
1889
+ };
1890
+
1891
+
1892
+ /**
1893
+ * optional string public_id = 2;
1894
+ * @return {string}
1895
+ */
1896
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.getPublicId = function() {
1897
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1898
+ };
1899
+
1900
+
1901
+ /**
1902
+ * @param {string} value
1903
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} returns this
1904
+ */
1905
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.setPublicId = function(value) {
1906
+ return jspb.Message.setProto3StringField(this, 2, value);
1907
+ };
1908
+
1909
+
1910
+ /**
1911
+ * optional string website_hostname = 3;
1912
+ * @return {string}
1913
+ */
1914
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.getWebsiteHostname = function() {
1915
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1916
+ };
1917
+
1918
+
1919
+ /**
1920
+ * @param {string} value
1921
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} returns this
1922
+ */
1923
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.setWebsiteHostname = function(value) {
1924
+ return jspb.Message.setProto3StringField(this, 3, value);
1925
+ };
1926
+
1927
+
1928
+ /**
1929
+ * optional bool subscribed = 4;
1930
+ * @return {boolean}
1931
+ */
1932
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.getSubscribed = function() {
1933
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
1934
+ };
1935
+
1936
+
1937
+ /**
1938
+ * @param {boolean} value
1939
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionRequest} returns this
1940
+ */
1941
+ proto.notification.ObserveOneSignalWebPushSubscriptionRequest.prototype.setSubscribed = function(value) {
1942
+ return jspb.Message.setProto3BooleanField(this, 4, value);
1943
+ };
1944
+
1945
+
1946
+
1947
+
1948
+
1949
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1950
+ /**
1951
+ * Creates an object representation of this proto.
1952
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1953
+ * Optional fields that are not set will be set to undefined.
1954
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1955
+ * For the list of reserved names please see:
1956
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1957
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1958
+ * JSPB instance for transitional soy proto support:
1959
+ * http://goto/soy-param-migration
1960
+ * @return {!Object}
1961
+ */
1962
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.toObject = function(opt_includeInstance) {
1963
+ return proto.notification.ObserveOneSignalWebPushSubscriptionResponse.toObject(opt_includeInstance, this);
1964
+ };
1965
+
1966
+
1967
+ /**
1968
+ * Static version of the {@see toObject} method.
1969
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1970
+ * the JSPB instance for transitional soy proto support:
1971
+ * http://goto/soy-param-migration
1972
+ * @param {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} msg The msg instance to transform.
1973
+ * @return {!Object}
1974
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1975
+ */
1976
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.toObject = function(includeInstance, msg) {
1977
+ var f, obj = {
1978
+ enabled: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
1979
+ accepted: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1980
+ pushSubscriptionDomain: jspb.Message.getFieldWithDefault(msg, 3, "")
1981
+ };
1982
+
1983
+ if (includeInstance) {
1984
+ obj.$jspbMessageInstance = msg;
1985
+ }
1986
+ return obj;
1987
+ };
1988
+ }
1989
+
1990
+
1991
+ /**
1992
+ * Deserializes binary data (in protobuf wire format).
1993
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1994
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse}
1995
+ */
1996
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.deserializeBinary = function(bytes) {
1997
+ var reader = new jspb.BinaryReader(bytes);
1998
+ var msg = new proto.notification.ObserveOneSignalWebPushSubscriptionResponse;
1999
+ return proto.notification.ObserveOneSignalWebPushSubscriptionResponse.deserializeBinaryFromReader(msg, reader);
2000
+ };
2001
+
2002
+
2003
+ /**
2004
+ * Deserializes binary data (in protobuf wire format) from the
2005
+ * given reader into the given message object.
2006
+ * @param {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} msg The message object to deserialize into.
2007
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2008
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse}
2009
+ */
2010
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.deserializeBinaryFromReader = function(msg, reader) {
2011
+ while (reader.nextField()) {
2012
+ if (reader.isEndGroup()) {
2013
+ break;
2014
+ }
2015
+ var field = reader.getFieldNumber();
2016
+ switch (field) {
2017
+ case 1:
2018
+ var value = /** @type {boolean} */ (reader.readBool());
2019
+ msg.setEnabled(value);
2020
+ break;
2021
+ case 2:
2022
+ var value = /** @type {boolean} */ (reader.readBool());
2023
+ msg.setAccepted(value);
2024
+ break;
2025
+ case 3:
2026
+ var value = /** @type {string} */ (reader.readString());
2027
+ msg.setPushSubscriptionDomain(value);
2028
+ break;
2029
+ default:
2030
+ reader.skipField();
2031
+ break;
2032
+ }
2033
+ }
2034
+ return msg;
2035
+ };
2036
+
2037
+
2038
+ /**
2039
+ * Serializes the message to binary data (in protobuf wire format).
2040
+ * @return {!Uint8Array}
2041
+ */
2042
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.serializeBinary = function() {
2043
+ var writer = new jspb.BinaryWriter();
2044
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.serializeBinaryToWriter(this, writer);
2045
+ return writer.getResultBuffer();
2046
+ };
2047
+
2048
+
2049
+ /**
2050
+ * Serializes the given message to binary data (in protobuf wire
2051
+ * format), writing to the given BinaryWriter.
2052
+ * @param {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} message
2053
+ * @param {!jspb.BinaryWriter} writer
2054
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2055
+ */
2056
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.serializeBinaryToWriter = function(message, writer) {
2057
+ var f = undefined;
2058
+ f = message.getEnabled();
2059
+ if (f) {
2060
+ writer.writeBool(
2061
+ 1,
2062
+ f
2063
+ );
2064
+ }
2065
+ f = message.getAccepted();
2066
+ if (f) {
2067
+ writer.writeBool(
2068
+ 2,
2069
+ f
2070
+ );
2071
+ }
2072
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
2073
+ if (f != null) {
2074
+ writer.writeString(
2075
+ 3,
2076
+ f
2077
+ );
2078
+ }
2079
+ };
2080
+
2081
+
2082
+ /**
2083
+ * optional bool enabled = 1;
2084
+ * @return {boolean}
2085
+ */
2086
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.getEnabled = function() {
2087
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
2088
+ };
2089
+
2090
+
2091
+ /**
2092
+ * @param {boolean} value
2093
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} returns this
2094
+ */
2095
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.setEnabled = function(value) {
2096
+ return jspb.Message.setProto3BooleanField(this, 1, value);
2097
+ };
2098
+
2099
+
2100
+ /**
2101
+ * optional bool accepted = 2;
2102
+ * @return {boolean}
2103
+ */
2104
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.getAccepted = function() {
2105
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
2106
+ };
2107
+
2108
+
2109
+ /**
2110
+ * @param {boolean} value
2111
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} returns this
2112
+ */
2113
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.setAccepted = function(value) {
2114
+ return jspb.Message.setProto3BooleanField(this, 2, value);
2115
+ };
2116
+
2117
+
2118
+ /**
2119
+ * optional string push_subscription_domain = 3;
2120
+ * @return {string}
2121
+ */
2122
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.getPushSubscriptionDomain = function() {
2123
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2124
+ };
2125
+
2126
+
2127
+ /**
2128
+ * @param {string} value
2129
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} returns this
2130
+ */
2131
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.setPushSubscriptionDomain = function(value) {
2132
+ return jspb.Message.setField(this, 3, value);
2133
+ };
2134
+
2135
+
2136
+ /**
2137
+ * Clears the field making it undefined.
2138
+ * @return {!proto.notification.ObserveOneSignalWebPushSubscriptionResponse} returns this
2139
+ */
2140
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.clearPushSubscriptionDomain = function() {
2141
+ return jspb.Message.setField(this, 3, undefined);
2142
+ };
2143
+
2144
+
2145
+ /**
2146
+ * Returns whether this field is set.
2147
+ * @return {boolean}
2148
+ */
2149
+ proto.notification.ObserveOneSignalWebPushSubscriptionResponse.prototype.hasPushSubscriptionDomain = function() {
2150
+ return jspb.Message.getField(this, 3) != null;
2151
+ };
2152
+
2153
+
2154
+
2155
+
2156
+
1129
2157
  if (jspb.Message.GENERATE_TO_OBJECT) {
1130
2158
  /**
1131
2159
  * Creates an object representation of this proto.