@juzi/wechaty-grpc 1.0.17 → 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 (98) hide show
  1. package/dist/cjs/commonjs/generated/puppet.cjs +2 -0
  2. package/dist/cjs/commonjs/generated/puppet.cjs.d.ts +2 -0
  3. package/dist/cjs/out/wechaty/puppet/moment_grpc_pb.js +1 -0
  4. package/dist/cjs/out/wechaty/puppet/moment_pb.d.ts +128 -0
  5. package/dist/cjs/out/wechaty/puppet/moment_pb.js +953 -0
  6. package/dist/cjs/out/wechaty/puppet/moment_pb_service.d.ts +3 -0
  7. package/dist/cjs/out/wechaty/puppet/moment_pb_service.js +3 -0
  8. package/dist/cjs/out/wechaty/puppet/post_grpc_pb.js +1 -0
  9. package/dist/cjs/out/wechaty/puppet/post_pb.d.ts +348 -0
  10. package/dist/cjs/out/wechaty/puppet/post_pb.js +2508 -0
  11. package/dist/cjs/out/wechaty/puppet/post_pb_service.d.ts +3 -0
  12. package/dist/cjs/out/wechaty/puppet/post_pb_service.js +3 -0
  13. package/dist/cjs/out/wechaty/puppet.openapi.yaml +286 -1
  14. package/dist/cjs/out/wechaty/puppet.swagger.json +444 -1
  15. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +121 -0
  16. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +238 -0
  17. package/dist/cjs/out/wechaty/puppet_pb.d.ts +2 -0
  18. package/dist/cjs/out/wechaty/puppet_pb.js +4 -0
  19. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +135 -0
  20. package/dist/cjs/out/wechaty/puppet_pb_service.js +282 -0
  21. package/dist/cjs/proto/wechaty/puppet/channel.proto +8 -8
  22. package/dist/cjs/proto/wechaty/puppet/contact.proto +29 -29
  23. package/dist/cjs/proto/wechaty/puppet/friendship.proto +14 -14
  24. package/dist/cjs/proto/wechaty/puppet/location.proto +5 -5
  25. package/dist/cjs/proto/wechaty/puppet/message.proto +42 -43
  26. package/dist/cjs/proto/wechaty/puppet/mini-program.proto +9 -9
  27. package/dist/cjs/proto/wechaty/puppet/moment.proto +33 -0
  28. package/dist/cjs/proto/wechaty/puppet/post.proto +91 -0
  29. package/dist/cjs/proto/wechaty/puppet/room-invitation.proto +8 -8
  30. package/dist/cjs/proto/wechaty/puppet/room-member.proto +4 -4
  31. package/dist/cjs/proto/wechaty/puppet/room.proto +11 -11
  32. package/dist/cjs/proto/wechaty/puppet/tag.proto +6 -6
  33. package/dist/cjs/proto/wechaty/puppet/url-link.proto +4 -4
  34. package/dist/cjs/proto/wechaty/puppet.proto +58 -0
  35. package/dist/cjs/src/package-json.js +2 -2
  36. package/dist/cjs/src/package-json.js.map +1 -1
  37. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  38. package/dist/cjs/tests/puppet-server-impl.js +35 -0
  39. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  40. package/dist/esm/commonjs/generated/puppet.cjs +2 -0
  41. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +2 -0
  42. package/dist/esm/out/wechaty/puppet/moment_grpc_pb.js +1 -0
  43. package/dist/esm/out/wechaty/puppet/moment_pb.d.ts +128 -0
  44. package/dist/esm/out/wechaty/puppet/moment_pb.js +953 -0
  45. package/dist/esm/out/wechaty/puppet/moment_pb_service.d.ts +3 -0
  46. package/dist/esm/out/wechaty/puppet/moment_pb_service.js +3 -0
  47. package/dist/esm/out/wechaty/puppet/post_grpc_pb.js +1 -0
  48. package/dist/esm/out/wechaty/puppet/post_pb.d.ts +348 -0
  49. package/dist/esm/out/wechaty/puppet/post_pb.js +2508 -0
  50. package/dist/esm/out/wechaty/puppet/post_pb_service.d.ts +3 -0
  51. package/dist/esm/out/wechaty/puppet/post_pb_service.js +3 -0
  52. package/dist/esm/out/wechaty/puppet.openapi.yaml +286 -1
  53. package/dist/esm/out/wechaty/puppet.swagger.json +444 -1
  54. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +121 -0
  55. package/dist/esm/out/wechaty/puppet_grpc_pb.js +238 -0
  56. package/dist/esm/out/wechaty/puppet_pb.d.ts +2 -0
  57. package/dist/esm/out/wechaty/puppet_pb.js +4 -0
  58. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +135 -0
  59. package/dist/esm/out/wechaty/puppet_pb_service.js +282 -0
  60. package/dist/esm/proto/wechaty/puppet/channel.proto +8 -8
  61. package/dist/esm/proto/wechaty/puppet/contact.proto +29 -29
  62. package/dist/esm/proto/wechaty/puppet/friendship.proto +14 -14
  63. package/dist/esm/proto/wechaty/puppet/location.proto +5 -5
  64. package/dist/esm/proto/wechaty/puppet/message.proto +42 -43
  65. package/dist/esm/proto/wechaty/puppet/mini-program.proto +9 -9
  66. package/dist/esm/proto/wechaty/puppet/moment.proto +33 -0
  67. package/dist/esm/proto/wechaty/puppet/post.proto +91 -0
  68. package/dist/esm/proto/wechaty/puppet/room-invitation.proto +8 -8
  69. package/dist/esm/proto/wechaty/puppet/room-member.proto +4 -4
  70. package/dist/esm/proto/wechaty/puppet/room.proto +11 -11
  71. package/dist/esm/proto/wechaty/puppet/tag.proto +6 -6
  72. package/dist/esm/proto/wechaty/puppet/url-link.proto +4 -4
  73. package/dist/esm/proto/wechaty/puppet.proto +58 -0
  74. package/dist/esm/src/package-json.js +2 -2
  75. package/dist/esm/src/package-json.js.map +1 -1
  76. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  77. package/dist/esm/tests/puppet-server-impl.js +35 -0
  78. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  79. package/out/wechaty/puppet/moment_grpc_pb.js +1 -0
  80. package/out/wechaty/puppet/moment_pb.d.ts +128 -0
  81. package/out/wechaty/puppet/moment_pb.js +953 -0
  82. package/out/wechaty/puppet/moment_pb_service.d.ts +3 -0
  83. package/out/wechaty/puppet/moment_pb_service.js +3 -0
  84. package/out/wechaty/puppet/post_grpc_pb.js +1 -0
  85. package/out/wechaty/puppet/post_pb.d.ts +348 -0
  86. package/out/wechaty/puppet/post_pb.js +2508 -0
  87. package/out/wechaty/puppet/post_pb_service.d.ts +3 -0
  88. package/out/wechaty/puppet/post_pb_service.js +3 -0
  89. package/out/wechaty/puppet.openapi.yaml +286 -1
  90. package/out/wechaty/puppet.swagger.json +444 -1
  91. package/out/wechaty/puppet_grpc_pb.d.ts +121 -0
  92. package/out/wechaty/puppet_grpc_pb.js +238 -0
  93. package/out/wechaty/puppet_pb.d.ts +2 -0
  94. package/out/wechaty/puppet_pb.js +4 -0
  95. package/out/wechaty/puppet_pb_service.d.ts +135 -0
  96. package/out/wechaty/puppet_pb_service.js +282 -0
  97. package/package.json +1 -1
  98. package/src/package-json.ts +2 -2
@@ -0,0 +1,2508 @@
1
+ // source: wechaty/puppet/post.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
19
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
20
+ var wechaty_puppet_url$link_pb = require('../../wechaty/puppet/url-link_pb.js');
21
+ goog.object.extend(proto, wechaty_puppet_url$link_pb);
22
+ var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
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);
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);
33
+ goog.exportSymbol('proto.wechaty.puppet.PostPayloadServer', null, global);
34
+ goog.exportSymbol('proto.wechaty.puppet.PostSayable', null, global);
35
+ goog.exportSymbol('proto.wechaty.puppet.PostSayable.SayablesCase', null, global);
36
+ goog.exportSymbol('proto.wechaty.puppet.PostType', null, global);
37
+ goog.exportSymbol('proto.wechaty.puppet.SayableType', null, global);
38
+ /**
39
+ * Generated by JsPbCodeGenerator.
40
+ * @param {Array=} opt_data Optional initial data array, typically from a
41
+ * server response, or constructed directly in Javascript. The array is used
42
+ * in place and becomes part of the constructed object. It is not cloned.
43
+ * If no data is provided, the constructed object will be empty, but still
44
+ * valid.
45
+ * @extends {jspb.Message}
46
+ * @constructor
47
+ */
48
+ proto.wechaty.puppet.PostSayable = function(opt_data) {
49
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.wechaty.puppet.PostSayable.oneofGroups_);
50
+ };
51
+ goog.inherits(proto.wechaty.puppet.PostSayable, jspb.Message);
52
+ if (goog.DEBUG && !COMPILED) {
53
+ /**
54
+ * @public
55
+ * @override
56
+ */
57
+ proto.wechaty.puppet.PostSayable.displayName = 'proto.wechaty.puppet.PostSayable';
58
+ }
59
+ /**
60
+ * Generated by JsPbCodeGenerator.
61
+ * @param {Array=} opt_data Optional initial data array, typically from a
62
+ * server response, or constructed directly in Javascript. The array is used
63
+ * in place and becomes part of the constructed object. It is not cloned.
64
+ * If no data is provided, the constructed object will be empty, but still
65
+ * valid.
66
+ * @extends {jspb.Message}
67
+ * @constructor
68
+ */
69
+ proto.wechaty.puppet.PostPayloadClient = function(opt_data) {
70
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.PostPayloadClient.repeatedFields_, null);
71
+ };
72
+ goog.inherits(proto.wechaty.puppet.PostPayloadClient, jspb.Message);
73
+ if (goog.DEBUG && !COMPILED) {
74
+ /**
75
+ * @public
76
+ * @override
77
+ */
78
+ proto.wechaty.puppet.PostPayloadClient.displayName = 'proto.wechaty.puppet.PostPayloadClient';
79
+ }
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.wechaty.puppet.PostPayloadServer = function(opt_data) {
91
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.PostPayloadServer.repeatedFields_, null);
92
+ };
93
+ goog.inherits(proto.wechaty.puppet.PostPayloadServer, jspb.Message);
94
+ if (goog.DEBUG && !COMPILED) {
95
+ /**
96
+ * @public
97
+ * @override
98
+ */
99
+ proto.wechaty.puppet.PostPayloadServer.displayName = 'proto.wechaty.puppet.PostPayloadServer';
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
+ }
269
+
270
+ /**
271
+ * Oneof group definitions for this message. Each group defines the field
272
+ * numbers belonging to that group. When of these fields' value is set, all
273
+ * other fields in the group are cleared. During deserialization, if multiple
274
+ * fields are encountered for a group, only the last value seen will be kept.
275
+ * @private {!Array<!Array<number>>}
276
+ * @const
277
+ */
278
+ proto.wechaty.puppet.PostSayable.oneofGroups_ = [[2,3,4,5,6]];
279
+
280
+ /**
281
+ * @enum {number}
282
+ */
283
+ proto.wechaty.puppet.PostSayable.SayablesCase = {
284
+ SAYABLES_NOT_SET: 0,
285
+ ID: 2,
286
+ TEXT: 3,
287
+ FILE_BOX: 4,
288
+ URL_LINK: 5,
289
+ CAHNEL: 6
290
+ };
291
+
292
+ /**
293
+ * @return {proto.wechaty.puppet.PostSayable.SayablesCase}
294
+ */
295
+ proto.wechaty.puppet.PostSayable.prototype.getSayablesCase = function() {
296
+ return /** @type {proto.wechaty.puppet.PostSayable.SayablesCase} */(jspb.Message.computeOneofCase(this, proto.wechaty.puppet.PostSayable.oneofGroups_[0]));
297
+ };
298
+
299
+
300
+
301
+ if (jspb.Message.GENERATE_TO_OBJECT) {
302
+ /**
303
+ * Creates an object representation of this proto.
304
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
305
+ * Optional fields that are not set will be set to undefined.
306
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
307
+ * For the list of reserved names please see:
308
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
309
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
310
+ * JSPB instance for transitional soy proto support:
311
+ * http://goto/soy-param-migration
312
+ * @return {!Object}
313
+ */
314
+ proto.wechaty.puppet.PostSayable.prototype.toObject = function(opt_includeInstance) {
315
+ return proto.wechaty.puppet.PostSayable.toObject(opt_includeInstance, this);
316
+ };
317
+
318
+
319
+ /**
320
+ * Static version of the {@see toObject} method.
321
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
322
+ * the JSPB instance for transitional soy proto support:
323
+ * http://goto/soy-param-migration
324
+ * @param {!proto.wechaty.puppet.PostSayable} msg The msg instance to transform.
325
+ * @return {!Object}
326
+ * @suppress {unusedLocalVariables} f is only used for nested messages
327
+ */
328
+ proto.wechaty.puppet.PostSayable.toObject = function(includeInstance, msg) {
329
+ var f, obj = {
330
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
331
+ id: jspb.Message.getFieldWithDefault(msg, 2, ""),
332
+ text: jspb.Message.getFieldWithDefault(msg, 3, ""),
333
+ fileBox: jspb.Message.getFieldWithDefault(msg, 4, ""),
334
+ urlLink: (f = msg.getUrlLink()) && wechaty_puppet_url$link_pb.UrlLinkPayload.toObject(includeInstance, f),
335
+ cahnel: (f = msg.getCahnel()) && wechaty_puppet_channel_pb.ChannelPayload.toObject(includeInstance, f)
336
+ };
337
+
338
+ if (includeInstance) {
339
+ obj.$jspbMessageInstance = msg;
340
+ }
341
+ return obj;
342
+ };
343
+ }
344
+
345
+
346
+ /**
347
+ * Deserializes binary data (in protobuf wire format).
348
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
349
+ * @return {!proto.wechaty.puppet.PostSayable}
350
+ */
351
+ proto.wechaty.puppet.PostSayable.deserializeBinary = function(bytes) {
352
+ var reader = new jspb.BinaryReader(bytes);
353
+ var msg = new proto.wechaty.puppet.PostSayable;
354
+ return proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader(msg, reader);
355
+ };
356
+
357
+
358
+ /**
359
+ * Deserializes binary data (in protobuf wire format) from the
360
+ * given reader into the given message object.
361
+ * @param {!proto.wechaty.puppet.PostSayable} msg The message object to deserialize into.
362
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
363
+ * @return {!proto.wechaty.puppet.PostSayable}
364
+ */
365
+ proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader = function(msg, reader) {
366
+ while (reader.nextField()) {
367
+ if (reader.isEndGroup()) {
368
+ break;
369
+ }
370
+ var field = reader.getFieldNumber();
371
+ switch (field) {
372
+ case 1:
373
+ var value = /** @type {!proto.wechaty.puppet.SayableType} */ (reader.readEnum());
374
+ msg.setType(value);
375
+ break;
376
+ case 2:
377
+ var value = /** @type {string} */ (reader.readString());
378
+ msg.setId(value);
379
+ break;
380
+ case 3:
381
+ var value = /** @type {string} */ (reader.readString());
382
+ msg.setText(value);
383
+ break;
384
+ case 4:
385
+ var value = /** @type {string} */ (reader.readString());
386
+ msg.setFileBox(value);
387
+ break;
388
+ case 5:
389
+ var value = new wechaty_puppet_url$link_pb.UrlLinkPayload;
390
+ reader.readMessage(value,wechaty_puppet_url$link_pb.UrlLinkPayload.deserializeBinaryFromReader);
391
+ msg.setUrlLink(value);
392
+ break;
393
+ case 6:
394
+ var value = new wechaty_puppet_channel_pb.ChannelPayload;
395
+ reader.readMessage(value,wechaty_puppet_channel_pb.ChannelPayload.deserializeBinaryFromReader);
396
+ msg.setCahnel(value);
397
+ break;
398
+ default:
399
+ reader.skipField();
400
+ break;
401
+ }
402
+ }
403
+ return msg;
404
+ };
405
+
406
+
407
+ /**
408
+ * Serializes the message to binary data (in protobuf wire format).
409
+ * @return {!Uint8Array}
410
+ */
411
+ proto.wechaty.puppet.PostSayable.prototype.serializeBinary = function() {
412
+ var writer = new jspb.BinaryWriter();
413
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter(this, writer);
414
+ return writer.getResultBuffer();
415
+ };
416
+
417
+
418
+ /**
419
+ * Serializes the given message to binary data (in protobuf wire
420
+ * format), writing to the given BinaryWriter.
421
+ * @param {!proto.wechaty.puppet.PostSayable} message
422
+ * @param {!jspb.BinaryWriter} writer
423
+ * @suppress {unusedLocalVariables} f is only used for nested messages
424
+ */
425
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter = function(message, writer) {
426
+ var f = undefined;
427
+ f = message.getType();
428
+ if (f !== 0.0) {
429
+ writer.writeEnum(
430
+ 1,
431
+ f
432
+ );
433
+ }
434
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
435
+ if (f != null) {
436
+ writer.writeString(
437
+ 2,
438
+ f
439
+ );
440
+ }
441
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
442
+ if (f != null) {
443
+ writer.writeString(
444
+ 3,
445
+ f
446
+ );
447
+ }
448
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
449
+ if (f != null) {
450
+ writer.writeString(
451
+ 4,
452
+ f
453
+ );
454
+ }
455
+ f = message.getUrlLink();
456
+ if (f != null) {
457
+ writer.writeMessage(
458
+ 5,
459
+ f,
460
+ wechaty_puppet_url$link_pb.UrlLinkPayload.serializeBinaryToWriter
461
+ );
462
+ }
463
+ f = message.getCahnel();
464
+ if (f != null) {
465
+ writer.writeMessage(
466
+ 6,
467
+ f,
468
+ wechaty_puppet_channel_pb.ChannelPayload.serializeBinaryToWriter
469
+ );
470
+ }
471
+ };
472
+
473
+
474
+ /**
475
+ * optional SayableType type = 1;
476
+ * @return {!proto.wechaty.puppet.SayableType}
477
+ */
478
+ proto.wechaty.puppet.PostSayable.prototype.getType = function() {
479
+ return /** @type {!proto.wechaty.puppet.SayableType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
480
+ };
481
+
482
+
483
+ /**
484
+ * @param {!proto.wechaty.puppet.SayableType} value
485
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
486
+ */
487
+ proto.wechaty.puppet.PostSayable.prototype.setType = function(value) {
488
+ return jspb.Message.setProto3EnumField(this, 1, value);
489
+ };
490
+
491
+
492
+ /**
493
+ * optional string id = 2;
494
+ * @return {string}
495
+ */
496
+ proto.wechaty.puppet.PostSayable.prototype.getId = function() {
497
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
498
+ };
499
+
500
+
501
+ /**
502
+ * @param {string} value
503
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
504
+ */
505
+ proto.wechaty.puppet.PostSayable.prototype.setId = function(value) {
506
+ return jspb.Message.setOneofField(this, 2, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
507
+ };
508
+
509
+
510
+ /**
511
+ * Clears the field making it undefined.
512
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
513
+ */
514
+ proto.wechaty.puppet.PostSayable.prototype.clearId = function() {
515
+ return jspb.Message.setOneofField(this, 2, proto.wechaty.puppet.PostSayable.oneofGroups_[0], undefined);
516
+ };
517
+
518
+
519
+ /**
520
+ * Returns whether this field is set.
521
+ * @return {boolean}
522
+ */
523
+ proto.wechaty.puppet.PostSayable.prototype.hasId = function() {
524
+ return jspb.Message.getField(this, 2) != null;
525
+ };
526
+
527
+
528
+ /**
529
+ * optional string text = 3;
530
+ * @return {string}
531
+ */
532
+ proto.wechaty.puppet.PostSayable.prototype.getText = function() {
533
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
534
+ };
535
+
536
+
537
+ /**
538
+ * @param {string} value
539
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
540
+ */
541
+ proto.wechaty.puppet.PostSayable.prototype.setText = function(value) {
542
+ return jspb.Message.setOneofField(this, 3, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
543
+ };
544
+
545
+
546
+ /**
547
+ * Clears the field making it undefined.
548
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
549
+ */
550
+ proto.wechaty.puppet.PostSayable.prototype.clearText = function() {
551
+ return jspb.Message.setOneofField(this, 3, proto.wechaty.puppet.PostSayable.oneofGroups_[0], undefined);
552
+ };
553
+
554
+
555
+ /**
556
+ * Returns whether this field is set.
557
+ * @return {boolean}
558
+ */
559
+ proto.wechaty.puppet.PostSayable.prototype.hasText = function() {
560
+ return jspb.Message.getField(this, 3) != null;
561
+ };
562
+
563
+
564
+ /**
565
+ * optional string file_box = 4;
566
+ * @return {string}
567
+ */
568
+ proto.wechaty.puppet.PostSayable.prototype.getFileBox = function() {
569
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
570
+ };
571
+
572
+
573
+ /**
574
+ * @param {string} value
575
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
576
+ */
577
+ proto.wechaty.puppet.PostSayable.prototype.setFileBox = function(value) {
578
+ return jspb.Message.setOneofField(this, 4, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
579
+ };
580
+
581
+
582
+ /**
583
+ * Clears the field making it undefined.
584
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
585
+ */
586
+ proto.wechaty.puppet.PostSayable.prototype.clearFileBox = function() {
587
+ return jspb.Message.setOneofField(this, 4, proto.wechaty.puppet.PostSayable.oneofGroups_[0], undefined);
588
+ };
589
+
590
+
591
+ /**
592
+ * Returns whether this field is set.
593
+ * @return {boolean}
594
+ */
595
+ proto.wechaty.puppet.PostSayable.prototype.hasFileBox = function() {
596
+ return jspb.Message.getField(this, 4) != null;
597
+ };
598
+
599
+
600
+ /**
601
+ * optional UrlLinkPayload url_link = 5;
602
+ * @return {?proto.wechaty.puppet.UrlLinkPayload}
603
+ */
604
+ proto.wechaty.puppet.PostSayable.prototype.getUrlLink = function() {
605
+ return /** @type{?proto.wechaty.puppet.UrlLinkPayload} */ (
606
+ jspb.Message.getWrapperField(this, wechaty_puppet_url$link_pb.UrlLinkPayload, 5));
607
+ };
608
+
609
+
610
+ /**
611
+ * @param {?proto.wechaty.puppet.UrlLinkPayload|undefined} value
612
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
613
+ */
614
+ proto.wechaty.puppet.PostSayable.prototype.setUrlLink = function(value) {
615
+ return jspb.Message.setOneofWrapperField(this, 5, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
616
+ };
617
+
618
+
619
+ /**
620
+ * Clears the message field making it undefined.
621
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
622
+ */
623
+ proto.wechaty.puppet.PostSayable.prototype.clearUrlLink = function() {
624
+ return this.setUrlLink(undefined);
625
+ };
626
+
627
+
628
+ /**
629
+ * Returns whether this field is set.
630
+ * @return {boolean}
631
+ */
632
+ proto.wechaty.puppet.PostSayable.prototype.hasUrlLink = function() {
633
+ return jspb.Message.getField(this, 5) != null;
634
+ };
635
+
636
+
637
+ /**
638
+ * optional ChannelPayload cahnel = 6;
639
+ * @return {?proto.wechaty.puppet.ChannelPayload}
640
+ */
641
+ proto.wechaty.puppet.PostSayable.prototype.getCahnel = function() {
642
+ return /** @type{?proto.wechaty.puppet.ChannelPayload} */ (
643
+ jspb.Message.getWrapperField(this, wechaty_puppet_channel_pb.ChannelPayload, 6));
644
+ };
645
+
646
+
647
+ /**
648
+ * @param {?proto.wechaty.puppet.ChannelPayload|undefined} value
649
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
650
+ */
651
+ proto.wechaty.puppet.PostSayable.prototype.setCahnel = function(value) {
652
+ return jspb.Message.setOneofWrapperField(this, 6, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
653
+ };
654
+
655
+
656
+ /**
657
+ * Clears the message field making it undefined.
658
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
659
+ */
660
+ proto.wechaty.puppet.PostSayable.prototype.clearCahnel = function() {
661
+ return this.setCahnel(undefined);
662
+ };
663
+
664
+
665
+ /**
666
+ * Returns whether this field is set.
667
+ * @return {boolean}
668
+ */
669
+ proto.wechaty.puppet.PostSayable.prototype.hasCahnel = function() {
670
+ return jspb.Message.getField(this, 6) != null;
671
+ };
672
+
673
+
674
+
675
+ /**
676
+ * List of repeated fields within this message type.
677
+ * @private {!Array<number>}
678
+ * @const
679
+ */
680
+ proto.wechaty.puppet.PostPayloadClient.repeatedFields_ = [4];
681
+
682
+
683
+
684
+ if (jspb.Message.GENERATE_TO_OBJECT) {
685
+ /**
686
+ * Creates an object representation of this proto.
687
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
688
+ * Optional fields that are not set will be set to undefined.
689
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
690
+ * For the list of reserved names please see:
691
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
692
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
693
+ * JSPB instance for transitional soy proto support:
694
+ * http://goto/soy-param-migration
695
+ * @return {!Object}
696
+ */
697
+ proto.wechaty.puppet.PostPayloadClient.prototype.toObject = function(opt_includeInstance) {
698
+ return proto.wechaty.puppet.PostPayloadClient.toObject(opt_includeInstance, this);
699
+ };
700
+
701
+
702
+ /**
703
+ * Static version of the {@see toObject} method.
704
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
705
+ * the JSPB instance for transitional soy proto support:
706
+ * http://goto/soy-param-migration
707
+ * @param {!proto.wechaty.puppet.PostPayloadClient} msg The msg instance to transform.
708
+ * @return {!Object}
709
+ * @suppress {unusedLocalVariables} f is only used for nested messages
710
+ */
711
+ proto.wechaty.puppet.PostPayloadClient.toObject = function(includeInstance, msg) {
712
+ var f, obj = {
713
+ parentId: jspb.Message.getFieldWithDefault(msg, 1, ""),
714
+ rootId: jspb.Message.getFieldWithDefault(msg, 2, ""),
715
+ type: jspb.Message.getFieldWithDefault(msg, 3, 0),
716
+ sayableListList: jspb.Message.toObjectList(msg.getSayableListList(),
717
+ proto.wechaty.puppet.PostSayable.toObject, includeInstance)
718
+ };
719
+
720
+ if (includeInstance) {
721
+ obj.$jspbMessageInstance = msg;
722
+ }
723
+ return obj;
724
+ };
725
+ }
726
+
727
+
728
+ /**
729
+ * Deserializes binary data (in protobuf wire format).
730
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
731
+ * @return {!proto.wechaty.puppet.PostPayloadClient}
732
+ */
733
+ proto.wechaty.puppet.PostPayloadClient.deserializeBinary = function(bytes) {
734
+ var reader = new jspb.BinaryReader(bytes);
735
+ var msg = new proto.wechaty.puppet.PostPayloadClient;
736
+ return proto.wechaty.puppet.PostPayloadClient.deserializeBinaryFromReader(msg, reader);
737
+ };
738
+
739
+
740
+ /**
741
+ * Deserializes binary data (in protobuf wire format) from the
742
+ * given reader into the given message object.
743
+ * @param {!proto.wechaty.puppet.PostPayloadClient} msg The message object to deserialize into.
744
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
745
+ * @return {!proto.wechaty.puppet.PostPayloadClient}
746
+ */
747
+ proto.wechaty.puppet.PostPayloadClient.deserializeBinaryFromReader = function(msg, reader) {
748
+ while (reader.nextField()) {
749
+ if (reader.isEndGroup()) {
750
+ break;
751
+ }
752
+ var field = reader.getFieldNumber();
753
+ switch (field) {
754
+ case 1:
755
+ var value = /** @type {string} */ (reader.readString());
756
+ msg.setParentId(value);
757
+ break;
758
+ case 2:
759
+ var value = /** @type {string} */ (reader.readString());
760
+ msg.setRootId(value);
761
+ break;
762
+ case 3:
763
+ var value = /** @type {!proto.wechaty.puppet.PostType} */ (reader.readEnum());
764
+ msg.setType(value);
765
+ break;
766
+ case 4:
767
+ var value = new proto.wechaty.puppet.PostSayable;
768
+ reader.readMessage(value,proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader);
769
+ msg.addSayableList(value);
770
+ break;
771
+ default:
772
+ reader.skipField();
773
+ break;
774
+ }
775
+ }
776
+ return msg;
777
+ };
778
+
779
+
780
+ /**
781
+ * Serializes the message to binary data (in protobuf wire format).
782
+ * @return {!Uint8Array}
783
+ */
784
+ proto.wechaty.puppet.PostPayloadClient.prototype.serializeBinary = function() {
785
+ var writer = new jspb.BinaryWriter();
786
+ proto.wechaty.puppet.PostPayloadClient.serializeBinaryToWriter(this, writer);
787
+ return writer.getResultBuffer();
788
+ };
789
+
790
+
791
+ /**
792
+ * Serializes the given message to binary data (in protobuf wire
793
+ * format), writing to the given BinaryWriter.
794
+ * @param {!proto.wechaty.puppet.PostPayloadClient} message
795
+ * @param {!jspb.BinaryWriter} writer
796
+ * @suppress {unusedLocalVariables} f is only used for nested messages
797
+ */
798
+ proto.wechaty.puppet.PostPayloadClient.serializeBinaryToWriter = function(message, writer) {
799
+ var f = undefined;
800
+ f = message.getParentId();
801
+ if (f.length > 0) {
802
+ writer.writeString(
803
+ 1,
804
+ f
805
+ );
806
+ }
807
+ f = message.getRootId();
808
+ if (f.length > 0) {
809
+ writer.writeString(
810
+ 2,
811
+ f
812
+ );
813
+ }
814
+ f = message.getType();
815
+ if (f !== 0.0) {
816
+ writer.writeEnum(
817
+ 3,
818
+ f
819
+ );
820
+ }
821
+ f = message.getSayableListList();
822
+ if (f.length > 0) {
823
+ writer.writeRepeatedMessage(
824
+ 4,
825
+ f,
826
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter
827
+ );
828
+ }
829
+ };
830
+
831
+
832
+ /**
833
+ * optional string parent_id = 1;
834
+ * @return {string}
835
+ */
836
+ proto.wechaty.puppet.PostPayloadClient.prototype.getParentId = function() {
837
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
838
+ };
839
+
840
+
841
+ /**
842
+ * @param {string} value
843
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
844
+ */
845
+ proto.wechaty.puppet.PostPayloadClient.prototype.setParentId = function(value) {
846
+ return jspb.Message.setProto3StringField(this, 1, value);
847
+ };
848
+
849
+
850
+ /**
851
+ * optional string root_id = 2;
852
+ * @return {string}
853
+ */
854
+ proto.wechaty.puppet.PostPayloadClient.prototype.getRootId = function() {
855
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
856
+ };
857
+
858
+
859
+ /**
860
+ * @param {string} value
861
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
862
+ */
863
+ proto.wechaty.puppet.PostPayloadClient.prototype.setRootId = function(value) {
864
+ return jspb.Message.setProto3StringField(this, 2, value);
865
+ };
866
+
867
+
868
+ /**
869
+ * optional PostType type = 3;
870
+ * @return {!proto.wechaty.puppet.PostType}
871
+ */
872
+ proto.wechaty.puppet.PostPayloadClient.prototype.getType = function() {
873
+ return /** @type {!proto.wechaty.puppet.PostType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
874
+ };
875
+
876
+
877
+ /**
878
+ * @param {!proto.wechaty.puppet.PostType} value
879
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
880
+ */
881
+ proto.wechaty.puppet.PostPayloadClient.prototype.setType = function(value) {
882
+ return jspb.Message.setProto3EnumField(this, 3, value);
883
+ };
884
+
885
+
886
+ /**
887
+ * repeated PostSayable sayable_list = 4;
888
+ * @return {!Array<!proto.wechaty.puppet.PostSayable>}
889
+ */
890
+ proto.wechaty.puppet.PostPayloadClient.prototype.getSayableListList = function() {
891
+ return /** @type{!Array<!proto.wechaty.puppet.PostSayable>} */ (
892
+ jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.PostSayable, 4));
893
+ };
894
+
895
+
896
+ /**
897
+ * @param {!Array<!proto.wechaty.puppet.PostSayable>} value
898
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
899
+ */
900
+ proto.wechaty.puppet.PostPayloadClient.prototype.setSayableListList = function(value) {
901
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
902
+ };
903
+
904
+
905
+ /**
906
+ * @param {!proto.wechaty.puppet.PostSayable=} opt_value
907
+ * @param {number=} opt_index
908
+ * @return {!proto.wechaty.puppet.PostSayable}
909
+ */
910
+ proto.wechaty.puppet.PostPayloadClient.prototype.addSayableList = function(opt_value, opt_index) {
911
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.wechaty.puppet.PostSayable, opt_index);
912
+ };
913
+
914
+
915
+ /**
916
+ * Clears the list making it empty but non-null.
917
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
918
+ */
919
+ proto.wechaty.puppet.PostPayloadClient.prototype.clearSayableListList = function() {
920
+ return this.setSayableListList([]);
921
+ };
922
+
923
+
924
+
925
+ /**
926
+ * List of repeated fields within this message type.
927
+ * @private {!Array<number>}
928
+ * @const
929
+ */
930
+ proto.wechaty.puppet.PostPayloadServer.repeatedFields_ = [4];
931
+
932
+
933
+
934
+ if (jspb.Message.GENERATE_TO_OBJECT) {
935
+ /**
936
+ * Creates an object representation of this proto.
937
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
938
+ * Optional fields that are not set will be set to undefined.
939
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
940
+ * For the list of reserved names please see:
941
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
942
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
943
+ * JSPB instance for transitional soy proto support:
944
+ * http://goto/soy-param-migration
945
+ * @return {!Object}
946
+ */
947
+ proto.wechaty.puppet.PostPayloadServer.prototype.toObject = function(opt_includeInstance) {
948
+ return proto.wechaty.puppet.PostPayloadServer.toObject(opt_includeInstance, this);
949
+ };
950
+
951
+
952
+ /**
953
+ * Static version of the {@see toObject} method.
954
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
955
+ * the JSPB instance for transitional soy proto support:
956
+ * http://goto/soy-param-migration
957
+ * @param {!proto.wechaty.puppet.PostPayloadServer} msg The msg instance to transform.
958
+ * @return {!Object}
959
+ * @suppress {unusedLocalVariables} f is only used for nested messages
960
+ */
961
+ proto.wechaty.puppet.PostPayloadServer.toObject = function(includeInstance, msg) {
962
+ var f, obj = {
963
+ parentId: jspb.Message.getFieldWithDefault(msg, 1, ""),
964
+ rootId: jspb.Message.getFieldWithDefault(msg, 2, ""),
965
+ type: jspb.Message.getFieldWithDefault(msg, 3, 0),
966
+ sayableListList: jspb.Message.toObjectList(msg.getSayableListList(),
967
+ proto.wechaty.puppet.PostSayable.toObject, includeInstance),
968
+ contactId: jspb.Message.getFieldWithDefault(msg, 5, ""),
969
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
970
+ children: jspb.Message.getFieldWithDefault(msg, 7, 0),
971
+ descendant: jspb.Message.getFieldWithDefault(msg, 8, 0),
972
+ like: jspb.Message.getFieldWithDefault(msg, 9, 0)
973
+ };
974
+
975
+ if (includeInstance) {
976
+ obj.$jspbMessageInstance = msg;
977
+ }
978
+ return obj;
979
+ };
980
+ }
981
+
982
+
983
+ /**
984
+ * Deserializes binary data (in protobuf wire format).
985
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
986
+ * @return {!proto.wechaty.puppet.PostPayloadServer}
987
+ */
988
+ proto.wechaty.puppet.PostPayloadServer.deserializeBinary = function(bytes) {
989
+ var reader = new jspb.BinaryReader(bytes);
990
+ var msg = new proto.wechaty.puppet.PostPayloadServer;
991
+ return proto.wechaty.puppet.PostPayloadServer.deserializeBinaryFromReader(msg, reader);
992
+ };
993
+
994
+
995
+ /**
996
+ * Deserializes binary data (in protobuf wire format) from the
997
+ * given reader into the given message object.
998
+ * @param {!proto.wechaty.puppet.PostPayloadServer} msg The message object to deserialize into.
999
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1000
+ * @return {!proto.wechaty.puppet.PostPayloadServer}
1001
+ */
1002
+ proto.wechaty.puppet.PostPayloadServer.deserializeBinaryFromReader = function(msg, reader) {
1003
+ while (reader.nextField()) {
1004
+ if (reader.isEndGroup()) {
1005
+ break;
1006
+ }
1007
+ var field = reader.getFieldNumber();
1008
+ switch (field) {
1009
+ case 1:
1010
+ var value = /** @type {string} */ (reader.readString());
1011
+ msg.setParentId(value);
1012
+ break;
1013
+ case 2:
1014
+ var value = /** @type {string} */ (reader.readString());
1015
+ msg.setRootId(value);
1016
+ break;
1017
+ case 3:
1018
+ var value = /** @type {!proto.wechaty.puppet.PostType} */ (reader.readEnum());
1019
+ msg.setType(value);
1020
+ break;
1021
+ case 4:
1022
+ var value = new proto.wechaty.puppet.PostSayable;
1023
+ reader.readMessage(value,proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader);
1024
+ msg.addSayableList(value);
1025
+ break;
1026
+ case 5:
1027
+ var value = /** @type {string} */ (reader.readString());
1028
+ msg.setContactId(value);
1029
+ break;
1030
+ case 6:
1031
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1032
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1033
+ msg.setTimestamp(value);
1034
+ break;
1035
+ case 7:
1036
+ var value = /** @type {number} */ (reader.readInt32());
1037
+ msg.setChildren(value);
1038
+ break;
1039
+ case 8:
1040
+ var value = /** @type {number} */ (reader.readInt32());
1041
+ msg.setDescendant(value);
1042
+ break;
1043
+ case 9:
1044
+ var value = /** @type {number} */ (reader.readInt32());
1045
+ msg.setLike(value);
1046
+ break;
1047
+ default:
1048
+ reader.skipField();
1049
+ break;
1050
+ }
1051
+ }
1052
+ return msg;
1053
+ };
1054
+
1055
+
1056
+ /**
1057
+ * Serializes the message to binary data (in protobuf wire format).
1058
+ * @return {!Uint8Array}
1059
+ */
1060
+ proto.wechaty.puppet.PostPayloadServer.prototype.serializeBinary = function() {
1061
+ var writer = new jspb.BinaryWriter();
1062
+ proto.wechaty.puppet.PostPayloadServer.serializeBinaryToWriter(this, writer);
1063
+ return writer.getResultBuffer();
1064
+ };
1065
+
1066
+
1067
+ /**
1068
+ * Serializes the given message to binary data (in protobuf wire
1069
+ * format), writing to the given BinaryWriter.
1070
+ * @param {!proto.wechaty.puppet.PostPayloadServer} message
1071
+ * @param {!jspb.BinaryWriter} writer
1072
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1073
+ */
1074
+ proto.wechaty.puppet.PostPayloadServer.serializeBinaryToWriter = function(message, writer) {
1075
+ var f = undefined;
1076
+ f = message.getParentId();
1077
+ if (f.length > 0) {
1078
+ writer.writeString(
1079
+ 1,
1080
+ f
1081
+ );
1082
+ }
1083
+ f = message.getRootId();
1084
+ if (f.length > 0) {
1085
+ writer.writeString(
1086
+ 2,
1087
+ f
1088
+ );
1089
+ }
1090
+ f = message.getType();
1091
+ if (f !== 0.0) {
1092
+ writer.writeEnum(
1093
+ 3,
1094
+ f
1095
+ );
1096
+ }
1097
+ f = message.getSayableListList();
1098
+ if (f.length > 0) {
1099
+ writer.writeRepeatedMessage(
1100
+ 4,
1101
+ f,
1102
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter
1103
+ );
1104
+ }
1105
+ f = message.getContactId();
1106
+ if (f.length > 0) {
1107
+ writer.writeString(
1108
+ 5,
1109
+ f
1110
+ );
1111
+ }
1112
+ f = message.getTimestamp();
1113
+ if (f != null) {
1114
+ writer.writeMessage(
1115
+ 6,
1116
+ f,
1117
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1118
+ );
1119
+ }
1120
+ f = message.getChildren();
1121
+ if (f !== 0) {
1122
+ writer.writeInt32(
1123
+ 7,
1124
+ f
1125
+ );
1126
+ }
1127
+ f = message.getDescendant();
1128
+ if (f !== 0) {
1129
+ writer.writeInt32(
1130
+ 8,
1131
+ f
1132
+ );
1133
+ }
1134
+ f = message.getLike();
1135
+ if (f !== 0) {
1136
+ writer.writeInt32(
1137
+ 9,
1138
+ f
1139
+ );
1140
+ }
1141
+ };
1142
+
1143
+
1144
+ /**
1145
+ * optional string parent_id = 1;
1146
+ * @return {string}
1147
+ */
1148
+ proto.wechaty.puppet.PostPayloadServer.prototype.getParentId = function() {
1149
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1150
+ };
1151
+
1152
+
1153
+ /**
1154
+ * @param {string} value
1155
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1156
+ */
1157
+ proto.wechaty.puppet.PostPayloadServer.prototype.setParentId = function(value) {
1158
+ return jspb.Message.setProto3StringField(this, 1, value);
1159
+ };
1160
+
1161
+
1162
+ /**
1163
+ * optional string root_id = 2;
1164
+ * @return {string}
1165
+ */
1166
+ proto.wechaty.puppet.PostPayloadServer.prototype.getRootId = function() {
1167
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1168
+ };
1169
+
1170
+
1171
+ /**
1172
+ * @param {string} value
1173
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1174
+ */
1175
+ proto.wechaty.puppet.PostPayloadServer.prototype.setRootId = function(value) {
1176
+ return jspb.Message.setProto3StringField(this, 2, value);
1177
+ };
1178
+
1179
+
1180
+ /**
1181
+ * optional PostType type = 3;
1182
+ * @return {!proto.wechaty.puppet.PostType}
1183
+ */
1184
+ proto.wechaty.puppet.PostPayloadServer.prototype.getType = function() {
1185
+ return /** @type {!proto.wechaty.puppet.PostType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1186
+ };
1187
+
1188
+
1189
+ /**
1190
+ * @param {!proto.wechaty.puppet.PostType} value
1191
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1192
+ */
1193
+ proto.wechaty.puppet.PostPayloadServer.prototype.setType = function(value) {
1194
+ return jspb.Message.setProto3EnumField(this, 3, value);
1195
+ };
1196
+
1197
+
1198
+ /**
1199
+ * repeated PostSayable sayable_list = 4;
1200
+ * @return {!Array<!proto.wechaty.puppet.PostSayable>}
1201
+ */
1202
+ proto.wechaty.puppet.PostPayloadServer.prototype.getSayableListList = function() {
1203
+ return /** @type{!Array<!proto.wechaty.puppet.PostSayable>} */ (
1204
+ jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.PostSayable, 4));
1205
+ };
1206
+
1207
+
1208
+ /**
1209
+ * @param {!Array<!proto.wechaty.puppet.PostSayable>} value
1210
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1211
+ */
1212
+ proto.wechaty.puppet.PostPayloadServer.prototype.setSayableListList = function(value) {
1213
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
1214
+ };
1215
+
1216
+
1217
+ /**
1218
+ * @param {!proto.wechaty.puppet.PostSayable=} opt_value
1219
+ * @param {number=} opt_index
1220
+ * @return {!proto.wechaty.puppet.PostSayable}
1221
+ */
1222
+ proto.wechaty.puppet.PostPayloadServer.prototype.addSayableList = function(opt_value, opt_index) {
1223
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.wechaty.puppet.PostSayable, opt_index);
1224
+ };
1225
+
1226
+
1227
+ /**
1228
+ * Clears the list making it empty but non-null.
1229
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1230
+ */
1231
+ proto.wechaty.puppet.PostPayloadServer.prototype.clearSayableListList = function() {
1232
+ return this.setSayableListList([]);
1233
+ };
1234
+
1235
+
1236
+ /**
1237
+ * optional string contact_id = 5;
1238
+ * @return {string}
1239
+ */
1240
+ proto.wechaty.puppet.PostPayloadServer.prototype.getContactId = function() {
1241
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1242
+ };
1243
+
1244
+
1245
+ /**
1246
+ * @param {string} value
1247
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1248
+ */
1249
+ proto.wechaty.puppet.PostPayloadServer.prototype.setContactId = function(value) {
1250
+ return jspb.Message.setProto3StringField(this, 5, value);
1251
+ };
1252
+
1253
+
1254
+ /**
1255
+ * optional google.protobuf.Timestamp timestamp = 6;
1256
+ * @return {?proto.google.protobuf.Timestamp}
1257
+ */
1258
+ proto.wechaty.puppet.PostPayloadServer.prototype.getTimestamp = function() {
1259
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1260
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
1261
+ };
1262
+
1263
+
1264
+ /**
1265
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1266
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1267
+ */
1268
+ proto.wechaty.puppet.PostPayloadServer.prototype.setTimestamp = function(value) {
1269
+ return jspb.Message.setWrapperField(this, 6, value);
1270
+ };
1271
+
1272
+
1273
+ /**
1274
+ * Clears the message field making it undefined.
1275
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1276
+ */
1277
+ proto.wechaty.puppet.PostPayloadServer.prototype.clearTimestamp = function() {
1278
+ return this.setTimestamp(undefined);
1279
+ };
1280
+
1281
+
1282
+ /**
1283
+ * Returns whether this field is set.
1284
+ * @return {boolean}
1285
+ */
1286
+ proto.wechaty.puppet.PostPayloadServer.prototype.hasTimestamp = function() {
1287
+ return jspb.Message.getField(this, 6) != null;
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * optional int32 children = 7;
1293
+ * @return {number}
1294
+ */
1295
+ proto.wechaty.puppet.PostPayloadServer.prototype.getChildren = function() {
1296
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1297
+ };
1298
+
1299
+
1300
+ /**
1301
+ * @param {number} value
1302
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1303
+ */
1304
+ proto.wechaty.puppet.PostPayloadServer.prototype.setChildren = function(value) {
1305
+ return jspb.Message.setProto3IntField(this, 7, value);
1306
+ };
1307
+
1308
+
1309
+ /**
1310
+ * optional int32 descendant = 8;
1311
+ * @return {number}
1312
+ */
1313
+ proto.wechaty.puppet.PostPayloadServer.prototype.getDescendant = function() {
1314
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1315
+ };
1316
+
1317
+
1318
+ /**
1319
+ * @param {number} value
1320
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1321
+ */
1322
+ proto.wechaty.puppet.PostPayloadServer.prototype.setDescendant = function(value) {
1323
+ return jspb.Message.setProto3IntField(this, 8, value);
1324
+ };
1325
+
1326
+
1327
+ /**
1328
+ * optional int32 like = 9;
1329
+ * @return {number}
1330
+ */
1331
+ proto.wechaty.puppet.PostPayloadServer.prototype.getLike = function() {
1332
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1333
+ };
1334
+
1335
+
1336
+ /**
1337
+ * @param {number} value
1338
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1339
+ */
1340
+ proto.wechaty.puppet.PostPayloadServer.prototype.setLike = function(value) {
1341
+ return jspb.Message.setProto3IntField(this, 9, value);
1342
+ };
1343
+
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
+
2488
+ /**
2489
+ * @enum {number}
2490
+ */
2491
+ proto.wechaty.puppet.PostType = {
2492
+ POST_TYPE_UNSPECIFIED: 0,
2493
+ POST_TYPE_MOMENT: 1,
2494
+ POST_TYPE_CHANNEL: 2,
2495
+ POST_TYPE_MESSAGE: 3
2496
+ };
2497
+
2498
+ /**
2499
+ * @enum {number}
2500
+ */
2501
+ proto.wechaty.puppet.SayableType = {
2502
+ SAYABLE_TYPE_TEXT: 0,
2503
+ SAYABLE_TYPE_FILE: 1,
2504
+ SAYABLE_TYPE_URL: 2,
2505
+ SAYABLE_TYPE_CHANNEL: 3
2506
+ };
2507
+
2508
+ goog.object.extend(exports, proto.wechaty.puppet);