@juzi/wechaty-grpc 1.0.18 → 1.0.19

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.
Files changed (44) hide show
  1. package/dist/cjs/out/wechaty/puppet/moment_pb.d.ts +0 -172
  2. package/dist/cjs/out/wechaty/puppet/moment_pb.js +87 -1406
  3. package/dist/cjs/out/wechaty/puppet/post_pb.d.ts +172 -0
  4. package/dist/cjs/out/wechaty/puppet/post_pb.js +1319 -0
  5. package/dist/cjs/out/wechaty/puppet.openapi.yaml +72 -72
  6. package/dist/cjs/out/wechaty/puppet.swagger.json +97 -97
  7. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +56 -56
  8. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +103 -103
  9. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +41 -40
  10. package/dist/cjs/out/wechaty/puppet_pb_service.js +25 -24
  11. package/dist/cjs/proto/wechaty/puppet/moment.proto +0 -33
  12. package/dist/cjs/proto/wechaty/puppet/post.proto +34 -0
  13. package/dist/cjs/proto/wechaty/puppet.proto +9 -9
  14. package/dist/cjs/src/package-json.js +1 -1
  15. package/dist/cjs/tests/puppet-server-impl.js +4 -4
  16. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  17. package/dist/esm/out/wechaty/puppet/moment_pb.d.ts +0 -172
  18. package/dist/esm/out/wechaty/puppet/moment_pb.js +87 -1406
  19. package/dist/esm/out/wechaty/puppet/post_pb.d.ts +172 -0
  20. package/dist/esm/out/wechaty/puppet/post_pb.js +1319 -0
  21. package/dist/esm/out/wechaty/puppet.openapi.yaml +72 -72
  22. package/dist/esm/out/wechaty/puppet.swagger.json +97 -97
  23. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +56 -56
  24. package/dist/esm/out/wechaty/puppet_grpc_pb.js +103 -103
  25. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +41 -40
  26. package/dist/esm/out/wechaty/puppet_pb_service.js +25 -24
  27. package/dist/esm/proto/wechaty/puppet/moment.proto +0 -33
  28. package/dist/esm/proto/wechaty/puppet/post.proto +34 -0
  29. package/dist/esm/proto/wechaty/puppet.proto +9 -9
  30. package/dist/esm/src/package-json.js +1 -1
  31. package/dist/esm/tests/puppet-server-impl.js +4 -4
  32. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  33. package/out/wechaty/puppet/moment_pb.d.ts +0 -172
  34. package/out/wechaty/puppet/moment_pb.js +87 -1406
  35. package/out/wechaty/puppet/post_pb.d.ts +172 -0
  36. package/out/wechaty/puppet/post_pb.js +1319 -0
  37. package/out/wechaty/puppet.openapi.yaml +72 -72
  38. package/out/wechaty/puppet.swagger.json +97 -97
  39. package/out/wechaty/puppet_grpc_pb.d.ts +56 -56
  40. package/out/wechaty/puppet_grpc_pb.js +103 -103
  41. package/out/wechaty/puppet_pb_service.d.ts +41 -40
  42. package/out/wechaty/puppet_pb_service.js +25 -24
  43. package/package.json +1 -1
  44. package/src/package-json.ts +1 -1
@@ -21,7 +21,15 @@ var wechaty_puppet_url$link_pb = require('../../wechaty/puppet/url-link_pb.js');
21
21
  goog.object.extend(proto, wechaty_puppet_url$link_pb);
22
22
  var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
23
23
  goog.object.extend(proto, wechaty_puppet_channel_pb);
24
+ goog.exportSymbol('proto.wechaty.puppet.PostCommentRequest', null, global);
25
+ goog.exportSymbol('proto.wechaty.puppet.PostCommentResponse', null, global);
26
+ goog.exportSymbol('proto.wechaty.puppet.PostLikeRequest', null, global);
27
+ goog.exportSymbol('proto.wechaty.puppet.PostLikeResponse', null, global);
24
28
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadClient', null, global);
29
+ goog.exportSymbol('proto.wechaty.puppet.PostPayloadRequest', null, global);
30
+ goog.exportSymbol('proto.wechaty.puppet.PostPayloadResponse', null, global);
31
+ goog.exportSymbol('proto.wechaty.puppet.PostPayloadSayableRequest', null, global);
32
+ goog.exportSymbol('proto.wechaty.puppet.PostPayloadSayableResponse', null, global);
25
33
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadServer', null, global);
26
34
  goog.exportSymbol('proto.wechaty.puppet.PostSayable', null, global);
27
35
  goog.exportSymbol('proto.wechaty.puppet.PostSayable.SayablesCase', null, global);
@@ -90,6 +98,174 @@ if (goog.DEBUG && !COMPILED) {
90
98
  */
91
99
  proto.wechaty.puppet.PostPayloadServer.displayName = 'proto.wechaty.puppet.PostPayloadServer';
92
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.wechaty.puppet.PostCommentRequest = function(opt_data) {
112
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
113
+ };
114
+ goog.inherits(proto.wechaty.puppet.PostCommentRequest, jspb.Message);
115
+ if (goog.DEBUG && !COMPILED) {
116
+ /**
117
+ * @public
118
+ * @override
119
+ */
120
+ proto.wechaty.puppet.PostCommentRequest.displayName = 'proto.wechaty.puppet.PostCommentRequest';
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.wechaty.puppet.PostCommentResponse = function(opt_data) {
133
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
134
+ };
135
+ goog.inherits(proto.wechaty.puppet.PostCommentResponse, jspb.Message);
136
+ if (goog.DEBUG && !COMPILED) {
137
+ /**
138
+ * @public
139
+ * @override
140
+ */
141
+ proto.wechaty.puppet.PostCommentResponse.displayName = 'proto.wechaty.puppet.PostCommentResponse';
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.wechaty.puppet.PostLikeRequest = function(opt_data) {
154
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
155
+ };
156
+ goog.inherits(proto.wechaty.puppet.PostLikeRequest, jspb.Message);
157
+ if (goog.DEBUG && !COMPILED) {
158
+ /**
159
+ * @public
160
+ * @override
161
+ */
162
+ proto.wechaty.puppet.PostLikeRequest.displayName = 'proto.wechaty.puppet.PostLikeRequest';
163
+ }
164
+ /**
165
+ * Generated by JsPbCodeGenerator.
166
+ * @param {Array=} opt_data Optional initial data array, typically from a
167
+ * server response, or constructed directly in Javascript. The array is used
168
+ * in place and becomes part of the constructed object. It is not cloned.
169
+ * If no data is provided, the constructed object will be empty, but still
170
+ * valid.
171
+ * @extends {jspb.Message}
172
+ * @constructor
173
+ */
174
+ proto.wechaty.puppet.PostLikeResponse = function(opt_data) {
175
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
176
+ };
177
+ goog.inherits(proto.wechaty.puppet.PostLikeResponse, jspb.Message);
178
+ if (goog.DEBUG && !COMPILED) {
179
+ /**
180
+ * @public
181
+ * @override
182
+ */
183
+ proto.wechaty.puppet.PostLikeResponse.displayName = 'proto.wechaty.puppet.PostLikeResponse';
184
+ }
185
+ /**
186
+ * Generated by JsPbCodeGenerator.
187
+ * @param {Array=} opt_data Optional initial data array, typically from a
188
+ * server response, or constructed directly in Javascript. The array is used
189
+ * in place and becomes part of the constructed object. It is not cloned.
190
+ * If no data is provided, the constructed object will be empty, but still
191
+ * valid.
192
+ * @extends {jspb.Message}
193
+ * @constructor
194
+ */
195
+ proto.wechaty.puppet.PostPayloadRequest = function(opt_data) {
196
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
197
+ };
198
+ goog.inherits(proto.wechaty.puppet.PostPayloadRequest, jspb.Message);
199
+ if (goog.DEBUG && !COMPILED) {
200
+ /**
201
+ * @public
202
+ * @override
203
+ */
204
+ proto.wechaty.puppet.PostPayloadRequest.displayName = 'proto.wechaty.puppet.PostPayloadRequest';
205
+ }
206
+ /**
207
+ * Generated by JsPbCodeGenerator.
208
+ * @param {Array=} opt_data Optional initial data array, typically from a
209
+ * server response, or constructed directly in Javascript. The array is used
210
+ * in place and becomes part of the constructed object. It is not cloned.
211
+ * If no data is provided, the constructed object will be empty, but still
212
+ * valid.
213
+ * @extends {jspb.Message}
214
+ * @constructor
215
+ */
216
+ proto.wechaty.puppet.PostPayloadResponse = function(opt_data) {
217
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
218
+ };
219
+ goog.inherits(proto.wechaty.puppet.PostPayloadResponse, jspb.Message);
220
+ if (goog.DEBUG && !COMPILED) {
221
+ /**
222
+ * @public
223
+ * @override
224
+ */
225
+ proto.wechaty.puppet.PostPayloadResponse.displayName = 'proto.wechaty.puppet.PostPayloadResponse';
226
+ }
227
+ /**
228
+ * Generated by JsPbCodeGenerator.
229
+ * @param {Array=} opt_data Optional initial data array, typically from a
230
+ * server response, or constructed directly in Javascript. The array is used
231
+ * in place and becomes part of the constructed object. It is not cloned.
232
+ * If no data is provided, the constructed object will be empty, but still
233
+ * valid.
234
+ * @extends {jspb.Message}
235
+ * @constructor
236
+ */
237
+ proto.wechaty.puppet.PostPayloadSayableRequest = function(opt_data) {
238
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
239
+ };
240
+ goog.inherits(proto.wechaty.puppet.PostPayloadSayableRequest, jspb.Message);
241
+ if (goog.DEBUG && !COMPILED) {
242
+ /**
243
+ * @public
244
+ * @override
245
+ */
246
+ proto.wechaty.puppet.PostPayloadSayableRequest.displayName = 'proto.wechaty.puppet.PostPayloadSayableRequest';
247
+ }
248
+ /**
249
+ * Generated by JsPbCodeGenerator.
250
+ * @param {Array=} opt_data Optional initial data array, typically from a
251
+ * server response, or constructed directly in Javascript. The array is used
252
+ * in place and becomes part of the constructed object. It is not cloned.
253
+ * If no data is provided, the constructed object will be empty, but still
254
+ * valid.
255
+ * @extends {jspb.Message}
256
+ * @constructor
257
+ */
258
+ proto.wechaty.puppet.PostPayloadSayableResponse = function(opt_data) {
259
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
260
+ };
261
+ goog.inherits(proto.wechaty.puppet.PostPayloadSayableResponse, jspb.Message);
262
+ if (goog.DEBUG && !COMPILED) {
263
+ /**
264
+ * @public
265
+ * @override
266
+ */
267
+ proto.wechaty.puppet.PostPayloadSayableResponse.displayName = 'proto.wechaty.puppet.PostPayloadSayableResponse';
268
+ }
93
269
 
94
270
  /**
95
271
  * Oneof group definitions for this message. Each group defines the field
@@ -1166,6 +1342,1149 @@ proto.wechaty.puppet.PostPayloadServer.prototype.setLike = function(value) {
1166
1342
  };
1167
1343
 
1168
1344
 
1345
+
1346
+
1347
+
1348
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1349
+ /**
1350
+ * Creates an object representation of this proto.
1351
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1352
+ * Optional fields that are not set will be set to undefined.
1353
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1354
+ * For the list of reserved names please see:
1355
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1356
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1357
+ * JSPB instance for transitional soy proto support:
1358
+ * http://goto/soy-param-migration
1359
+ * @return {!Object}
1360
+ */
1361
+ proto.wechaty.puppet.PostCommentRequest.prototype.toObject = function(opt_includeInstance) {
1362
+ return proto.wechaty.puppet.PostCommentRequest.toObject(opt_includeInstance, this);
1363
+ };
1364
+
1365
+
1366
+ /**
1367
+ * Static version of the {@see toObject} method.
1368
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1369
+ * the JSPB instance for transitional soy proto support:
1370
+ * http://goto/soy-param-migration
1371
+ * @param {!proto.wechaty.puppet.PostCommentRequest} msg The msg instance to transform.
1372
+ * @return {!Object}
1373
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1374
+ */
1375
+ proto.wechaty.puppet.PostCommentRequest.toObject = function(includeInstance, msg) {
1376
+ var f, obj = {
1377
+ postId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1378
+ text: jspb.Message.getFieldWithDefault(msg, 2, ""),
1379
+ mentionId: jspb.Message.getFieldWithDefault(msg, 3, "")
1380
+ };
1381
+
1382
+ if (includeInstance) {
1383
+ obj.$jspbMessageInstance = msg;
1384
+ }
1385
+ return obj;
1386
+ };
1387
+ }
1388
+
1389
+
1390
+ /**
1391
+ * Deserializes binary data (in protobuf wire format).
1392
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1393
+ * @return {!proto.wechaty.puppet.PostCommentRequest}
1394
+ */
1395
+ proto.wechaty.puppet.PostCommentRequest.deserializeBinary = function(bytes) {
1396
+ var reader = new jspb.BinaryReader(bytes);
1397
+ var msg = new proto.wechaty.puppet.PostCommentRequest;
1398
+ return proto.wechaty.puppet.PostCommentRequest.deserializeBinaryFromReader(msg, reader);
1399
+ };
1400
+
1401
+
1402
+ /**
1403
+ * Deserializes binary data (in protobuf wire format) from the
1404
+ * given reader into the given message object.
1405
+ * @param {!proto.wechaty.puppet.PostCommentRequest} msg The message object to deserialize into.
1406
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1407
+ * @return {!proto.wechaty.puppet.PostCommentRequest}
1408
+ */
1409
+ proto.wechaty.puppet.PostCommentRequest.deserializeBinaryFromReader = function(msg, reader) {
1410
+ while (reader.nextField()) {
1411
+ if (reader.isEndGroup()) {
1412
+ break;
1413
+ }
1414
+ var field = reader.getFieldNumber();
1415
+ switch (field) {
1416
+ case 1:
1417
+ var value = /** @type {string} */ (reader.readString());
1418
+ msg.setPostId(value);
1419
+ break;
1420
+ case 2:
1421
+ var value = /** @type {string} */ (reader.readString());
1422
+ msg.setText(value);
1423
+ break;
1424
+ case 3:
1425
+ var value = /** @type {string} */ (reader.readString());
1426
+ msg.setMentionId(value);
1427
+ break;
1428
+ default:
1429
+ reader.skipField();
1430
+ break;
1431
+ }
1432
+ }
1433
+ return msg;
1434
+ };
1435
+
1436
+
1437
+ /**
1438
+ * Serializes the message to binary data (in protobuf wire format).
1439
+ * @return {!Uint8Array}
1440
+ */
1441
+ proto.wechaty.puppet.PostCommentRequest.prototype.serializeBinary = function() {
1442
+ var writer = new jspb.BinaryWriter();
1443
+ proto.wechaty.puppet.PostCommentRequest.serializeBinaryToWriter(this, writer);
1444
+ return writer.getResultBuffer();
1445
+ };
1446
+
1447
+
1448
+ /**
1449
+ * Serializes the given message to binary data (in protobuf wire
1450
+ * format), writing to the given BinaryWriter.
1451
+ * @param {!proto.wechaty.puppet.PostCommentRequest} message
1452
+ * @param {!jspb.BinaryWriter} writer
1453
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1454
+ */
1455
+ proto.wechaty.puppet.PostCommentRequest.serializeBinaryToWriter = function(message, writer) {
1456
+ var f = undefined;
1457
+ f = message.getPostId();
1458
+ if (f.length > 0) {
1459
+ writer.writeString(
1460
+ 1,
1461
+ f
1462
+ );
1463
+ }
1464
+ f = message.getText();
1465
+ if (f.length > 0) {
1466
+ writer.writeString(
1467
+ 2,
1468
+ f
1469
+ );
1470
+ }
1471
+ f = message.getMentionId();
1472
+ if (f.length > 0) {
1473
+ writer.writeString(
1474
+ 3,
1475
+ f
1476
+ );
1477
+ }
1478
+ };
1479
+
1480
+
1481
+ /**
1482
+ * optional string post_id = 1;
1483
+ * @return {string}
1484
+ */
1485
+ proto.wechaty.puppet.PostCommentRequest.prototype.getPostId = function() {
1486
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1487
+ };
1488
+
1489
+
1490
+ /**
1491
+ * @param {string} value
1492
+ * @return {!proto.wechaty.puppet.PostCommentRequest} returns this
1493
+ */
1494
+ proto.wechaty.puppet.PostCommentRequest.prototype.setPostId = function(value) {
1495
+ return jspb.Message.setProto3StringField(this, 1, value);
1496
+ };
1497
+
1498
+
1499
+ /**
1500
+ * optional string text = 2;
1501
+ * @return {string}
1502
+ */
1503
+ proto.wechaty.puppet.PostCommentRequest.prototype.getText = function() {
1504
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1505
+ };
1506
+
1507
+
1508
+ /**
1509
+ * @param {string} value
1510
+ * @return {!proto.wechaty.puppet.PostCommentRequest} returns this
1511
+ */
1512
+ proto.wechaty.puppet.PostCommentRequest.prototype.setText = function(value) {
1513
+ return jspb.Message.setProto3StringField(this, 2, value);
1514
+ };
1515
+
1516
+
1517
+ /**
1518
+ * optional string mention_id = 3;
1519
+ * @return {string}
1520
+ */
1521
+ proto.wechaty.puppet.PostCommentRequest.prototype.getMentionId = function() {
1522
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1523
+ };
1524
+
1525
+
1526
+ /**
1527
+ * @param {string} value
1528
+ * @return {!proto.wechaty.puppet.PostCommentRequest} returns this
1529
+ */
1530
+ proto.wechaty.puppet.PostCommentRequest.prototype.setMentionId = function(value) {
1531
+ return jspb.Message.setProto3StringField(this, 3, value);
1532
+ };
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1539
+ /**
1540
+ * Creates an object representation of this proto.
1541
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1542
+ * Optional fields that are not set will be set to undefined.
1543
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1544
+ * For the list of reserved names please see:
1545
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1546
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1547
+ * JSPB instance for transitional soy proto support:
1548
+ * http://goto/soy-param-migration
1549
+ * @return {!Object}
1550
+ */
1551
+ proto.wechaty.puppet.PostCommentResponse.prototype.toObject = function(opt_includeInstance) {
1552
+ return proto.wechaty.puppet.PostCommentResponse.toObject(opt_includeInstance, this);
1553
+ };
1554
+
1555
+
1556
+ /**
1557
+ * Static version of the {@see toObject} method.
1558
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1559
+ * the JSPB instance for transitional soy proto support:
1560
+ * http://goto/soy-param-migration
1561
+ * @param {!proto.wechaty.puppet.PostCommentResponse} msg The msg instance to transform.
1562
+ * @return {!Object}
1563
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1564
+ */
1565
+ proto.wechaty.puppet.PostCommentResponse.toObject = function(includeInstance, msg) {
1566
+ var f, obj = {
1567
+ commentId: jspb.Message.getFieldWithDefault(msg, 1, "")
1568
+ };
1569
+
1570
+ if (includeInstance) {
1571
+ obj.$jspbMessageInstance = msg;
1572
+ }
1573
+ return obj;
1574
+ };
1575
+ }
1576
+
1577
+
1578
+ /**
1579
+ * Deserializes binary data (in protobuf wire format).
1580
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1581
+ * @return {!proto.wechaty.puppet.PostCommentResponse}
1582
+ */
1583
+ proto.wechaty.puppet.PostCommentResponse.deserializeBinary = function(bytes) {
1584
+ var reader = new jspb.BinaryReader(bytes);
1585
+ var msg = new proto.wechaty.puppet.PostCommentResponse;
1586
+ return proto.wechaty.puppet.PostCommentResponse.deserializeBinaryFromReader(msg, reader);
1587
+ };
1588
+
1589
+
1590
+ /**
1591
+ * Deserializes binary data (in protobuf wire format) from the
1592
+ * given reader into the given message object.
1593
+ * @param {!proto.wechaty.puppet.PostCommentResponse} msg The message object to deserialize into.
1594
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1595
+ * @return {!proto.wechaty.puppet.PostCommentResponse}
1596
+ */
1597
+ proto.wechaty.puppet.PostCommentResponse.deserializeBinaryFromReader = function(msg, reader) {
1598
+ while (reader.nextField()) {
1599
+ if (reader.isEndGroup()) {
1600
+ break;
1601
+ }
1602
+ var field = reader.getFieldNumber();
1603
+ switch (field) {
1604
+ case 1:
1605
+ var value = /** @type {string} */ (reader.readString());
1606
+ msg.setCommentId(value);
1607
+ break;
1608
+ default:
1609
+ reader.skipField();
1610
+ break;
1611
+ }
1612
+ }
1613
+ return msg;
1614
+ };
1615
+
1616
+
1617
+ /**
1618
+ * Serializes the message to binary data (in protobuf wire format).
1619
+ * @return {!Uint8Array}
1620
+ */
1621
+ proto.wechaty.puppet.PostCommentResponse.prototype.serializeBinary = function() {
1622
+ var writer = new jspb.BinaryWriter();
1623
+ proto.wechaty.puppet.PostCommentResponse.serializeBinaryToWriter(this, writer);
1624
+ return writer.getResultBuffer();
1625
+ };
1626
+
1627
+
1628
+ /**
1629
+ * Serializes the given message to binary data (in protobuf wire
1630
+ * format), writing to the given BinaryWriter.
1631
+ * @param {!proto.wechaty.puppet.PostCommentResponse} message
1632
+ * @param {!jspb.BinaryWriter} writer
1633
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1634
+ */
1635
+ proto.wechaty.puppet.PostCommentResponse.serializeBinaryToWriter = function(message, writer) {
1636
+ var f = undefined;
1637
+ f = message.getCommentId();
1638
+ if (f.length > 0) {
1639
+ writer.writeString(
1640
+ 1,
1641
+ f
1642
+ );
1643
+ }
1644
+ };
1645
+
1646
+
1647
+ /**
1648
+ * optional string comment_id = 1;
1649
+ * @return {string}
1650
+ */
1651
+ proto.wechaty.puppet.PostCommentResponse.prototype.getCommentId = function() {
1652
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1653
+ };
1654
+
1655
+
1656
+ /**
1657
+ * @param {string} value
1658
+ * @return {!proto.wechaty.puppet.PostCommentResponse} returns this
1659
+ */
1660
+ proto.wechaty.puppet.PostCommentResponse.prototype.setCommentId = function(value) {
1661
+ return jspb.Message.setProto3StringField(this, 1, value);
1662
+ };
1663
+
1664
+
1665
+
1666
+
1667
+
1668
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1669
+ /**
1670
+ * Creates an object representation of this proto.
1671
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1672
+ * Optional fields that are not set will be set to undefined.
1673
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1674
+ * For the list of reserved names please see:
1675
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1676
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1677
+ * JSPB instance for transitional soy proto support:
1678
+ * http://goto/soy-param-migration
1679
+ * @return {!Object}
1680
+ */
1681
+ proto.wechaty.puppet.PostLikeRequest.prototype.toObject = function(opt_includeInstance) {
1682
+ return proto.wechaty.puppet.PostLikeRequest.toObject(opt_includeInstance, this);
1683
+ };
1684
+
1685
+
1686
+ /**
1687
+ * Static version of the {@see toObject} method.
1688
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1689
+ * the JSPB instance for transitional soy proto support:
1690
+ * http://goto/soy-param-migration
1691
+ * @param {!proto.wechaty.puppet.PostLikeRequest} msg The msg instance to transform.
1692
+ * @return {!Object}
1693
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1694
+ */
1695
+ proto.wechaty.puppet.PostLikeRequest.toObject = function(includeInstance, msg) {
1696
+ var f, obj = {
1697
+ postId: jspb.Message.getFieldWithDefault(msg, 1, "")
1698
+ };
1699
+
1700
+ if (includeInstance) {
1701
+ obj.$jspbMessageInstance = msg;
1702
+ }
1703
+ return obj;
1704
+ };
1705
+ }
1706
+
1707
+
1708
+ /**
1709
+ * Deserializes binary data (in protobuf wire format).
1710
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1711
+ * @return {!proto.wechaty.puppet.PostLikeRequest}
1712
+ */
1713
+ proto.wechaty.puppet.PostLikeRequest.deserializeBinary = function(bytes) {
1714
+ var reader = new jspb.BinaryReader(bytes);
1715
+ var msg = new proto.wechaty.puppet.PostLikeRequest;
1716
+ return proto.wechaty.puppet.PostLikeRequest.deserializeBinaryFromReader(msg, reader);
1717
+ };
1718
+
1719
+
1720
+ /**
1721
+ * Deserializes binary data (in protobuf wire format) from the
1722
+ * given reader into the given message object.
1723
+ * @param {!proto.wechaty.puppet.PostLikeRequest} msg The message object to deserialize into.
1724
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1725
+ * @return {!proto.wechaty.puppet.PostLikeRequest}
1726
+ */
1727
+ proto.wechaty.puppet.PostLikeRequest.deserializeBinaryFromReader = function(msg, reader) {
1728
+ while (reader.nextField()) {
1729
+ if (reader.isEndGroup()) {
1730
+ break;
1731
+ }
1732
+ var field = reader.getFieldNumber();
1733
+ switch (field) {
1734
+ case 1:
1735
+ var value = /** @type {string} */ (reader.readString());
1736
+ msg.setPostId(value);
1737
+ break;
1738
+ default:
1739
+ reader.skipField();
1740
+ break;
1741
+ }
1742
+ }
1743
+ return msg;
1744
+ };
1745
+
1746
+
1747
+ /**
1748
+ * Serializes the message to binary data (in protobuf wire format).
1749
+ * @return {!Uint8Array}
1750
+ */
1751
+ proto.wechaty.puppet.PostLikeRequest.prototype.serializeBinary = function() {
1752
+ var writer = new jspb.BinaryWriter();
1753
+ proto.wechaty.puppet.PostLikeRequest.serializeBinaryToWriter(this, writer);
1754
+ return writer.getResultBuffer();
1755
+ };
1756
+
1757
+
1758
+ /**
1759
+ * Serializes the given message to binary data (in protobuf wire
1760
+ * format), writing to the given BinaryWriter.
1761
+ * @param {!proto.wechaty.puppet.PostLikeRequest} message
1762
+ * @param {!jspb.BinaryWriter} writer
1763
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1764
+ */
1765
+ proto.wechaty.puppet.PostLikeRequest.serializeBinaryToWriter = function(message, writer) {
1766
+ var f = undefined;
1767
+ f = message.getPostId();
1768
+ if (f.length > 0) {
1769
+ writer.writeString(
1770
+ 1,
1771
+ f
1772
+ );
1773
+ }
1774
+ };
1775
+
1776
+
1777
+ /**
1778
+ * optional string post_id = 1;
1779
+ * @return {string}
1780
+ */
1781
+ proto.wechaty.puppet.PostLikeRequest.prototype.getPostId = function() {
1782
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1783
+ };
1784
+
1785
+
1786
+ /**
1787
+ * @param {string} value
1788
+ * @return {!proto.wechaty.puppet.PostLikeRequest} returns this
1789
+ */
1790
+ proto.wechaty.puppet.PostLikeRequest.prototype.setPostId = function(value) {
1791
+ return jspb.Message.setProto3StringField(this, 1, value);
1792
+ };
1793
+
1794
+
1795
+
1796
+
1797
+
1798
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1799
+ /**
1800
+ * Creates an object representation of this proto.
1801
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1802
+ * Optional fields that are not set will be set to undefined.
1803
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1804
+ * For the list of reserved names please see:
1805
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1806
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1807
+ * JSPB instance for transitional soy proto support:
1808
+ * http://goto/soy-param-migration
1809
+ * @return {!Object}
1810
+ */
1811
+ proto.wechaty.puppet.PostLikeResponse.prototype.toObject = function(opt_includeInstance) {
1812
+ return proto.wechaty.puppet.PostLikeResponse.toObject(opt_includeInstance, this);
1813
+ };
1814
+
1815
+
1816
+ /**
1817
+ * Static version of the {@see toObject} method.
1818
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1819
+ * the JSPB instance for transitional soy proto support:
1820
+ * http://goto/soy-param-migration
1821
+ * @param {!proto.wechaty.puppet.PostLikeResponse} msg The msg instance to transform.
1822
+ * @return {!Object}
1823
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1824
+ */
1825
+ proto.wechaty.puppet.PostLikeResponse.toObject = function(includeInstance, msg) {
1826
+ var f, obj = {
1827
+
1828
+ };
1829
+
1830
+ if (includeInstance) {
1831
+ obj.$jspbMessageInstance = msg;
1832
+ }
1833
+ return obj;
1834
+ };
1835
+ }
1836
+
1837
+
1838
+ /**
1839
+ * Deserializes binary data (in protobuf wire format).
1840
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1841
+ * @return {!proto.wechaty.puppet.PostLikeResponse}
1842
+ */
1843
+ proto.wechaty.puppet.PostLikeResponse.deserializeBinary = function(bytes) {
1844
+ var reader = new jspb.BinaryReader(bytes);
1845
+ var msg = new proto.wechaty.puppet.PostLikeResponse;
1846
+ return proto.wechaty.puppet.PostLikeResponse.deserializeBinaryFromReader(msg, reader);
1847
+ };
1848
+
1849
+
1850
+ /**
1851
+ * Deserializes binary data (in protobuf wire format) from the
1852
+ * given reader into the given message object.
1853
+ * @param {!proto.wechaty.puppet.PostLikeResponse} msg The message object to deserialize into.
1854
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1855
+ * @return {!proto.wechaty.puppet.PostLikeResponse}
1856
+ */
1857
+ proto.wechaty.puppet.PostLikeResponse.deserializeBinaryFromReader = function(msg, reader) {
1858
+ while (reader.nextField()) {
1859
+ if (reader.isEndGroup()) {
1860
+ break;
1861
+ }
1862
+ var field = reader.getFieldNumber();
1863
+ switch (field) {
1864
+ default:
1865
+ reader.skipField();
1866
+ break;
1867
+ }
1868
+ }
1869
+ return msg;
1870
+ };
1871
+
1872
+
1873
+ /**
1874
+ * Serializes the message to binary data (in protobuf wire format).
1875
+ * @return {!Uint8Array}
1876
+ */
1877
+ proto.wechaty.puppet.PostLikeResponse.prototype.serializeBinary = function() {
1878
+ var writer = new jspb.BinaryWriter();
1879
+ proto.wechaty.puppet.PostLikeResponse.serializeBinaryToWriter(this, writer);
1880
+ return writer.getResultBuffer();
1881
+ };
1882
+
1883
+
1884
+ /**
1885
+ * Serializes the given message to binary data (in protobuf wire
1886
+ * format), writing to the given BinaryWriter.
1887
+ * @param {!proto.wechaty.puppet.PostLikeResponse} message
1888
+ * @param {!jspb.BinaryWriter} writer
1889
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1890
+ */
1891
+ proto.wechaty.puppet.PostLikeResponse.serializeBinaryToWriter = function(message, writer) {
1892
+ var f = undefined;
1893
+ };
1894
+
1895
+
1896
+
1897
+
1898
+
1899
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1900
+ /**
1901
+ * Creates an object representation of this proto.
1902
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1903
+ * Optional fields that are not set will be set to undefined.
1904
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1905
+ * For the list of reserved names please see:
1906
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1907
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1908
+ * JSPB instance for transitional soy proto support:
1909
+ * http://goto/soy-param-migration
1910
+ * @return {!Object}
1911
+ */
1912
+ proto.wechaty.puppet.PostPayloadRequest.prototype.toObject = function(opt_includeInstance) {
1913
+ return proto.wechaty.puppet.PostPayloadRequest.toObject(opt_includeInstance, this);
1914
+ };
1915
+
1916
+
1917
+ /**
1918
+ * Static version of the {@see toObject} method.
1919
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1920
+ * the JSPB instance for transitional soy proto support:
1921
+ * http://goto/soy-param-migration
1922
+ * @param {!proto.wechaty.puppet.PostPayloadRequest} msg The msg instance to transform.
1923
+ * @return {!Object}
1924
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1925
+ */
1926
+ proto.wechaty.puppet.PostPayloadRequest.toObject = function(includeInstance, msg) {
1927
+ var f, obj = {
1928
+ postId: jspb.Message.getFieldWithDefault(msg, 1, "")
1929
+ };
1930
+
1931
+ if (includeInstance) {
1932
+ obj.$jspbMessageInstance = msg;
1933
+ }
1934
+ return obj;
1935
+ };
1936
+ }
1937
+
1938
+
1939
+ /**
1940
+ * Deserializes binary data (in protobuf wire format).
1941
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1942
+ * @return {!proto.wechaty.puppet.PostPayloadRequest}
1943
+ */
1944
+ proto.wechaty.puppet.PostPayloadRequest.deserializeBinary = function(bytes) {
1945
+ var reader = new jspb.BinaryReader(bytes);
1946
+ var msg = new proto.wechaty.puppet.PostPayloadRequest;
1947
+ return proto.wechaty.puppet.PostPayloadRequest.deserializeBinaryFromReader(msg, reader);
1948
+ };
1949
+
1950
+
1951
+ /**
1952
+ * Deserializes binary data (in protobuf wire format) from the
1953
+ * given reader into the given message object.
1954
+ * @param {!proto.wechaty.puppet.PostPayloadRequest} msg The message object to deserialize into.
1955
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1956
+ * @return {!proto.wechaty.puppet.PostPayloadRequest}
1957
+ */
1958
+ proto.wechaty.puppet.PostPayloadRequest.deserializeBinaryFromReader = function(msg, reader) {
1959
+ while (reader.nextField()) {
1960
+ if (reader.isEndGroup()) {
1961
+ break;
1962
+ }
1963
+ var field = reader.getFieldNumber();
1964
+ switch (field) {
1965
+ case 1:
1966
+ var value = /** @type {string} */ (reader.readString());
1967
+ msg.setPostId(value);
1968
+ break;
1969
+ default:
1970
+ reader.skipField();
1971
+ break;
1972
+ }
1973
+ }
1974
+ return msg;
1975
+ };
1976
+
1977
+
1978
+ /**
1979
+ * Serializes the message to binary data (in protobuf wire format).
1980
+ * @return {!Uint8Array}
1981
+ */
1982
+ proto.wechaty.puppet.PostPayloadRequest.prototype.serializeBinary = function() {
1983
+ var writer = new jspb.BinaryWriter();
1984
+ proto.wechaty.puppet.PostPayloadRequest.serializeBinaryToWriter(this, writer);
1985
+ return writer.getResultBuffer();
1986
+ };
1987
+
1988
+
1989
+ /**
1990
+ * Serializes the given message to binary data (in protobuf wire
1991
+ * format), writing to the given BinaryWriter.
1992
+ * @param {!proto.wechaty.puppet.PostPayloadRequest} message
1993
+ * @param {!jspb.BinaryWriter} writer
1994
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1995
+ */
1996
+ proto.wechaty.puppet.PostPayloadRequest.serializeBinaryToWriter = function(message, writer) {
1997
+ var f = undefined;
1998
+ f = message.getPostId();
1999
+ if (f.length > 0) {
2000
+ writer.writeString(
2001
+ 1,
2002
+ f
2003
+ );
2004
+ }
2005
+ };
2006
+
2007
+
2008
+ /**
2009
+ * optional string post_id = 1;
2010
+ * @return {string}
2011
+ */
2012
+ proto.wechaty.puppet.PostPayloadRequest.prototype.getPostId = function() {
2013
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2014
+ };
2015
+
2016
+
2017
+ /**
2018
+ * @param {string} value
2019
+ * @return {!proto.wechaty.puppet.PostPayloadRequest} returns this
2020
+ */
2021
+ proto.wechaty.puppet.PostPayloadRequest.prototype.setPostId = function(value) {
2022
+ return jspb.Message.setProto3StringField(this, 1, value);
2023
+ };
2024
+
2025
+
2026
+
2027
+
2028
+
2029
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2030
+ /**
2031
+ * Creates an object representation of this proto.
2032
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2033
+ * Optional fields that are not set will be set to undefined.
2034
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2035
+ * For the list of reserved names please see:
2036
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2037
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2038
+ * JSPB instance for transitional soy proto support:
2039
+ * http://goto/soy-param-migration
2040
+ * @return {!Object}
2041
+ */
2042
+ proto.wechaty.puppet.PostPayloadResponse.prototype.toObject = function(opt_includeInstance) {
2043
+ return proto.wechaty.puppet.PostPayloadResponse.toObject(opt_includeInstance, this);
2044
+ };
2045
+
2046
+
2047
+ /**
2048
+ * Static version of the {@see toObject} method.
2049
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2050
+ * the JSPB instance for transitional soy proto support:
2051
+ * http://goto/soy-param-migration
2052
+ * @param {!proto.wechaty.puppet.PostPayloadResponse} msg The msg instance to transform.
2053
+ * @return {!Object}
2054
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2055
+ */
2056
+ proto.wechaty.puppet.PostPayloadResponse.toObject = function(includeInstance, msg) {
2057
+ var f, obj = {
2058
+ post: (f = msg.getPost()) && proto.wechaty.puppet.PostPayloadServer.toObject(includeInstance, f)
2059
+ };
2060
+
2061
+ if (includeInstance) {
2062
+ obj.$jspbMessageInstance = msg;
2063
+ }
2064
+ return obj;
2065
+ };
2066
+ }
2067
+
2068
+
2069
+ /**
2070
+ * Deserializes binary data (in protobuf wire format).
2071
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2072
+ * @return {!proto.wechaty.puppet.PostPayloadResponse}
2073
+ */
2074
+ proto.wechaty.puppet.PostPayloadResponse.deserializeBinary = function(bytes) {
2075
+ var reader = new jspb.BinaryReader(bytes);
2076
+ var msg = new proto.wechaty.puppet.PostPayloadResponse;
2077
+ return proto.wechaty.puppet.PostPayloadResponse.deserializeBinaryFromReader(msg, reader);
2078
+ };
2079
+
2080
+
2081
+ /**
2082
+ * Deserializes binary data (in protobuf wire format) from the
2083
+ * given reader into the given message object.
2084
+ * @param {!proto.wechaty.puppet.PostPayloadResponse} msg The message object to deserialize into.
2085
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2086
+ * @return {!proto.wechaty.puppet.PostPayloadResponse}
2087
+ */
2088
+ proto.wechaty.puppet.PostPayloadResponse.deserializeBinaryFromReader = function(msg, reader) {
2089
+ while (reader.nextField()) {
2090
+ if (reader.isEndGroup()) {
2091
+ break;
2092
+ }
2093
+ var field = reader.getFieldNumber();
2094
+ switch (field) {
2095
+ case 1:
2096
+ var value = new proto.wechaty.puppet.PostPayloadServer;
2097
+ reader.readMessage(value,proto.wechaty.puppet.PostPayloadServer.deserializeBinaryFromReader);
2098
+ msg.setPost(value);
2099
+ break;
2100
+ default:
2101
+ reader.skipField();
2102
+ break;
2103
+ }
2104
+ }
2105
+ return msg;
2106
+ };
2107
+
2108
+
2109
+ /**
2110
+ * Serializes the message to binary data (in protobuf wire format).
2111
+ * @return {!Uint8Array}
2112
+ */
2113
+ proto.wechaty.puppet.PostPayloadResponse.prototype.serializeBinary = function() {
2114
+ var writer = new jspb.BinaryWriter();
2115
+ proto.wechaty.puppet.PostPayloadResponse.serializeBinaryToWriter(this, writer);
2116
+ return writer.getResultBuffer();
2117
+ };
2118
+
2119
+
2120
+ /**
2121
+ * Serializes the given message to binary data (in protobuf wire
2122
+ * format), writing to the given BinaryWriter.
2123
+ * @param {!proto.wechaty.puppet.PostPayloadResponse} message
2124
+ * @param {!jspb.BinaryWriter} writer
2125
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2126
+ */
2127
+ proto.wechaty.puppet.PostPayloadResponse.serializeBinaryToWriter = function(message, writer) {
2128
+ var f = undefined;
2129
+ f = message.getPost();
2130
+ if (f != null) {
2131
+ writer.writeMessage(
2132
+ 1,
2133
+ f,
2134
+ proto.wechaty.puppet.PostPayloadServer.serializeBinaryToWriter
2135
+ );
2136
+ }
2137
+ };
2138
+
2139
+
2140
+ /**
2141
+ * optional PostPayloadServer post = 1;
2142
+ * @return {?proto.wechaty.puppet.PostPayloadServer}
2143
+ */
2144
+ proto.wechaty.puppet.PostPayloadResponse.prototype.getPost = function() {
2145
+ return /** @type{?proto.wechaty.puppet.PostPayloadServer} */ (
2146
+ jspb.Message.getWrapperField(this, proto.wechaty.puppet.PostPayloadServer, 1));
2147
+ };
2148
+
2149
+
2150
+ /**
2151
+ * @param {?proto.wechaty.puppet.PostPayloadServer|undefined} value
2152
+ * @return {!proto.wechaty.puppet.PostPayloadResponse} returns this
2153
+ */
2154
+ proto.wechaty.puppet.PostPayloadResponse.prototype.setPost = function(value) {
2155
+ return jspb.Message.setWrapperField(this, 1, value);
2156
+ };
2157
+
2158
+
2159
+ /**
2160
+ * Clears the message field making it undefined.
2161
+ * @return {!proto.wechaty.puppet.PostPayloadResponse} returns this
2162
+ */
2163
+ proto.wechaty.puppet.PostPayloadResponse.prototype.clearPost = function() {
2164
+ return this.setPost(undefined);
2165
+ };
2166
+
2167
+
2168
+ /**
2169
+ * Returns whether this field is set.
2170
+ * @return {boolean}
2171
+ */
2172
+ proto.wechaty.puppet.PostPayloadResponse.prototype.hasPost = function() {
2173
+ return jspb.Message.getField(this, 1) != null;
2174
+ };
2175
+
2176
+
2177
+
2178
+
2179
+
2180
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2181
+ /**
2182
+ * Creates an object representation of this proto.
2183
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2184
+ * Optional fields that are not set will be set to undefined.
2185
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2186
+ * For the list of reserved names please see:
2187
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2188
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2189
+ * JSPB instance for transitional soy proto support:
2190
+ * http://goto/soy-param-migration
2191
+ * @return {!Object}
2192
+ */
2193
+ proto.wechaty.puppet.PostPayloadSayableRequest.prototype.toObject = function(opt_includeInstance) {
2194
+ return proto.wechaty.puppet.PostPayloadSayableRequest.toObject(opt_includeInstance, this);
2195
+ };
2196
+
2197
+
2198
+ /**
2199
+ * Static version of the {@see toObject} method.
2200
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2201
+ * the JSPB instance for transitional soy proto support:
2202
+ * http://goto/soy-param-migration
2203
+ * @param {!proto.wechaty.puppet.PostPayloadSayableRequest} msg The msg instance to transform.
2204
+ * @return {!Object}
2205
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2206
+ */
2207
+ proto.wechaty.puppet.PostPayloadSayableRequest.toObject = function(includeInstance, msg) {
2208
+ var f, obj = {
2209
+ postId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2210
+ sayableId: jspb.Message.getFieldWithDefault(msg, 2, "")
2211
+ };
2212
+
2213
+ if (includeInstance) {
2214
+ obj.$jspbMessageInstance = msg;
2215
+ }
2216
+ return obj;
2217
+ };
2218
+ }
2219
+
2220
+
2221
+ /**
2222
+ * Deserializes binary data (in protobuf wire format).
2223
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2224
+ * @return {!proto.wechaty.puppet.PostPayloadSayableRequest}
2225
+ */
2226
+ proto.wechaty.puppet.PostPayloadSayableRequest.deserializeBinary = function(bytes) {
2227
+ var reader = new jspb.BinaryReader(bytes);
2228
+ var msg = new proto.wechaty.puppet.PostPayloadSayableRequest;
2229
+ return proto.wechaty.puppet.PostPayloadSayableRequest.deserializeBinaryFromReader(msg, reader);
2230
+ };
2231
+
2232
+
2233
+ /**
2234
+ * Deserializes binary data (in protobuf wire format) from the
2235
+ * given reader into the given message object.
2236
+ * @param {!proto.wechaty.puppet.PostPayloadSayableRequest} msg The message object to deserialize into.
2237
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2238
+ * @return {!proto.wechaty.puppet.PostPayloadSayableRequest}
2239
+ */
2240
+ proto.wechaty.puppet.PostPayloadSayableRequest.deserializeBinaryFromReader = function(msg, reader) {
2241
+ while (reader.nextField()) {
2242
+ if (reader.isEndGroup()) {
2243
+ break;
2244
+ }
2245
+ var field = reader.getFieldNumber();
2246
+ switch (field) {
2247
+ case 1:
2248
+ var value = /** @type {string} */ (reader.readString());
2249
+ msg.setPostId(value);
2250
+ break;
2251
+ case 2:
2252
+ var value = /** @type {string} */ (reader.readString());
2253
+ msg.setSayableId(value);
2254
+ break;
2255
+ default:
2256
+ reader.skipField();
2257
+ break;
2258
+ }
2259
+ }
2260
+ return msg;
2261
+ };
2262
+
2263
+
2264
+ /**
2265
+ * Serializes the message to binary data (in protobuf wire format).
2266
+ * @return {!Uint8Array}
2267
+ */
2268
+ proto.wechaty.puppet.PostPayloadSayableRequest.prototype.serializeBinary = function() {
2269
+ var writer = new jspb.BinaryWriter();
2270
+ proto.wechaty.puppet.PostPayloadSayableRequest.serializeBinaryToWriter(this, writer);
2271
+ return writer.getResultBuffer();
2272
+ };
2273
+
2274
+
2275
+ /**
2276
+ * Serializes the given message to binary data (in protobuf wire
2277
+ * format), writing to the given BinaryWriter.
2278
+ * @param {!proto.wechaty.puppet.PostPayloadSayableRequest} message
2279
+ * @param {!jspb.BinaryWriter} writer
2280
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2281
+ */
2282
+ proto.wechaty.puppet.PostPayloadSayableRequest.serializeBinaryToWriter = function(message, writer) {
2283
+ var f = undefined;
2284
+ f = message.getPostId();
2285
+ if (f.length > 0) {
2286
+ writer.writeString(
2287
+ 1,
2288
+ f
2289
+ );
2290
+ }
2291
+ f = message.getSayableId();
2292
+ if (f.length > 0) {
2293
+ writer.writeString(
2294
+ 2,
2295
+ f
2296
+ );
2297
+ }
2298
+ };
2299
+
2300
+
2301
+ /**
2302
+ * optional string post_id = 1;
2303
+ * @return {string}
2304
+ */
2305
+ proto.wechaty.puppet.PostPayloadSayableRequest.prototype.getPostId = function() {
2306
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2307
+ };
2308
+
2309
+
2310
+ /**
2311
+ * @param {string} value
2312
+ * @return {!proto.wechaty.puppet.PostPayloadSayableRequest} returns this
2313
+ */
2314
+ proto.wechaty.puppet.PostPayloadSayableRequest.prototype.setPostId = function(value) {
2315
+ return jspb.Message.setProto3StringField(this, 1, value);
2316
+ };
2317
+
2318
+
2319
+ /**
2320
+ * optional string sayable_id = 2;
2321
+ * @return {string}
2322
+ */
2323
+ proto.wechaty.puppet.PostPayloadSayableRequest.prototype.getSayableId = function() {
2324
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2325
+ };
2326
+
2327
+
2328
+ /**
2329
+ * @param {string} value
2330
+ * @return {!proto.wechaty.puppet.PostPayloadSayableRequest} returns this
2331
+ */
2332
+ proto.wechaty.puppet.PostPayloadSayableRequest.prototype.setSayableId = function(value) {
2333
+ return jspb.Message.setProto3StringField(this, 2, value);
2334
+ };
2335
+
2336
+
2337
+
2338
+
2339
+
2340
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2341
+ /**
2342
+ * Creates an object representation of this proto.
2343
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2344
+ * Optional fields that are not set will be set to undefined.
2345
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2346
+ * For the list of reserved names please see:
2347
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2348
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2349
+ * JSPB instance for transitional soy proto support:
2350
+ * http://goto/soy-param-migration
2351
+ * @return {!Object}
2352
+ */
2353
+ proto.wechaty.puppet.PostPayloadSayableResponse.prototype.toObject = function(opt_includeInstance) {
2354
+ return proto.wechaty.puppet.PostPayloadSayableResponse.toObject(opt_includeInstance, this);
2355
+ };
2356
+
2357
+
2358
+ /**
2359
+ * Static version of the {@see toObject} method.
2360
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2361
+ * the JSPB instance for transitional soy proto support:
2362
+ * http://goto/soy-param-migration
2363
+ * @param {!proto.wechaty.puppet.PostPayloadSayableResponse} msg The msg instance to transform.
2364
+ * @return {!Object}
2365
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2366
+ */
2367
+ proto.wechaty.puppet.PostPayloadSayableResponse.toObject = function(includeInstance, msg) {
2368
+ var f, obj = {
2369
+ sayable: (f = msg.getSayable()) && proto.wechaty.puppet.PostSayable.toObject(includeInstance, f)
2370
+ };
2371
+
2372
+ if (includeInstance) {
2373
+ obj.$jspbMessageInstance = msg;
2374
+ }
2375
+ return obj;
2376
+ };
2377
+ }
2378
+
2379
+
2380
+ /**
2381
+ * Deserializes binary data (in protobuf wire format).
2382
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2383
+ * @return {!proto.wechaty.puppet.PostPayloadSayableResponse}
2384
+ */
2385
+ proto.wechaty.puppet.PostPayloadSayableResponse.deserializeBinary = function(bytes) {
2386
+ var reader = new jspb.BinaryReader(bytes);
2387
+ var msg = new proto.wechaty.puppet.PostPayloadSayableResponse;
2388
+ return proto.wechaty.puppet.PostPayloadSayableResponse.deserializeBinaryFromReader(msg, reader);
2389
+ };
2390
+
2391
+
2392
+ /**
2393
+ * Deserializes binary data (in protobuf wire format) from the
2394
+ * given reader into the given message object.
2395
+ * @param {!proto.wechaty.puppet.PostPayloadSayableResponse} msg The message object to deserialize into.
2396
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2397
+ * @return {!proto.wechaty.puppet.PostPayloadSayableResponse}
2398
+ */
2399
+ proto.wechaty.puppet.PostPayloadSayableResponse.deserializeBinaryFromReader = function(msg, reader) {
2400
+ while (reader.nextField()) {
2401
+ if (reader.isEndGroup()) {
2402
+ break;
2403
+ }
2404
+ var field = reader.getFieldNumber();
2405
+ switch (field) {
2406
+ case 1:
2407
+ var value = new proto.wechaty.puppet.PostSayable;
2408
+ reader.readMessage(value,proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader);
2409
+ msg.setSayable(value);
2410
+ break;
2411
+ default:
2412
+ reader.skipField();
2413
+ break;
2414
+ }
2415
+ }
2416
+ return msg;
2417
+ };
2418
+
2419
+
2420
+ /**
2421
+ * Serializes the message to binary data (in protobuf wire format).
2422
+ * @return {!Uint8Array}
2423
+ */
2424
+ proto.wechaty.puppet.PostPayloadSayableResponse.prototype.serializeBinary = function() {
2425
+ var writer = new jspb.BinaryWriter();
2426
+ proto.wechaty.puppet.PostPayloadSayableResponse.serializeBinaryToWriter(this, writer);
2427
+ return writer.getResultBuffer();
2428
+ };
2429
+
2430
+
2431
+ /**
2432
+ * Serializes the given message to binary data (in protobuf wire
2433
+ * format), writing to the given BinaryWriter.
2434
+ * @param {!proto.wechaty.puppet.PostPayloadSayableResponse} message
2435
+ * @param {!jspb.BinaryWriter} writer
2436
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2437
+ */
2438
+ proto.wechaty.puppet.PostPayloadSayableResponse.serializeBinaryToWriter = function(message, writer) {
2439
+ var f = undefined;
2440
+ f = message.getSayable();
2441
+ if (f != null) {
2442
+ writer.writeMessage(
2443
+ 1,
2444
+ f,
2445
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter
2446
+ );
2447
+ }
2448
+ };
2449
+
2450
+
2451
+ /**
2452
+ * optional PostSayable sayable = 1;
2453
+ * @return {?proto.wechaty.puppet.PostSayable}
2454
+ */
2455
+ proto.wechaty.puppet.PostPayloadSayableResponse.prototype.getSayable = function() {
2456
+ return /** @type{?proto.wechaty.puppet.PostSayable} */ (
2457
+ jspb.Message.getWrapperField(this, proto.wechaty.puppet.PostSayable, 1));
2458
+ };
2459
+
2460
+
2461
+ /**
2462
+ * @param {?proto.wechaty.puppet.PostSayable|undefined} value
2463
+ * @return {!proto.wechaty.puppet.PostPayloadSayableResponse} returns this
2464
+ */
2465
+ proto.wechaty.puppet.PostPayloadSayableResponse.prototype.setSayable = function(value) {
2466
+ return jspb.Message.setWrapperField(this, 1, value);
2467
+ };
2468
+
2469
+
2470
+ /**
2471
+ * Clears the message field making it undefined.
2472
+ * @return {!proto.wechaty.puppet.PostPayloadSayableResponse} returns this
2473
+ */
2474
+ proto.wechaty.puppet.PostPayloadSayableResponse.prototype.clearSayable = function() {
2475
+ return this.setSayable(undefined);
2476
+ };
2477
+
2478
+
2479
+ /**
2480
+ * Returns whether this field is set.
2481
+ * @return {boolean}
2482
+ */
2483
+ proto.wechaty.puppet.PostPayloadSayableResponse.prototype.hasSayable = function() {
2484
+ return jspb.Message.getField(this, 1) != null;
2485
+ };
2486
+
2487
+
1169
2488
  /**
1170
2489
  * @enum {number}
1171
2490
  */