@juzi/wechaty-grpc 1.0.17 → 1.0.18

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 +300 -0
  5. package/dist/cjs/out/wechaty/puppet/moment_pb.js +2272 -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 +176 -0
  10. package/dist/cjs/out/wechaty/puppet/post_pb.js +1189 -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 +134 -0
  20. package/dist/cjs/out/wechaty/puppet_pb_service.js +281 -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 +66 -0
  28. package/dist/cjs/proto/wechaty/puppet/post.proto +57 -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 +300 -0
  44. package/dist/esm/out/wechaty/puppet/moment_pb.js +2272 -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 +176 -0
  49. package/dist/esm/out/wechaty/puppet/post_pb.js +1189 -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 +134 -0
  59. package/dist/esm/out/wechaty/puppet_pb_service.js +281 -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 +66 -0
  67. package/dist/esm/proto/wechaty/puppet/post.proto +57 -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 +300 -0
  81. package/out/wechaty/puppet/moment_pb.js +2272 -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 +176 -0
  86. package/out/wechaty/puppet/post_pb.js +1189 -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 +134 -0
  96. package/out/wechaty/puppet_pb_service.js +281 -0
  97. package/package.json +1 -1
  98. package/src/package-json.ts +2 -2
@@ -0,0 +1,1189 @@
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.PostPayloadClient', null, global);
25
+ goog.exportSymbol('proto.wechaty.puppet.PostPayloadServer', null, global);
26
+ goog.exportSymbol('proto.wechaty.puppet.PostSayable', null, global);
27
+ goog.exportSymbol('proto.wechaty.puppet.PostSayable.SayablesCase', null, global);
28
+ goog.exportSymbol('proto.wechaty.puppet.PostType', null, global);
29
+ goog.exportSymbol('proto.wechaty.puppet.SayableType', null, global);
30
+ /**
31
+ * Generated by JsPbCodeGenerator.
32
+ * @param {Array=} opt_data Optional initial data array, typically from a
33
+ * server response, or constructed directly in Javascript. The array is used
34
+ * in place and becomes part of the constructed object. It is not cloned.
35
+ * If no data is provided, the constructed object will be empty, but still
36
+ * valid.
37
+ * @extends {jspb.Message}
38
+ * @constructor
39
+ */
40
+ proto.wechaty.puppet.PostSayable = function(opt_data) {
41
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.wechaty.puppet.PostSayable.oneofGroups_);
42
+ };
43
+ goog.inherits(proto.wechaty.puppet.PostSayable, jspb.Message);
44
+ if (goog.DEBUG && !COMPILED) {
45
+ /**
46
+ * @public
47
+ * @override
48
+ */
49
+ proto.wechaty.puppet.PostSayable.displayName = 'proto.wechaty.puppet.PostSayable';
50
+ }
51
+ /**
52
+ * Generated by JsPbCodeGenerator.
53
+ * @param {Array=} opt_data Optional initial data array, typically from a
54
+ * server response, or constructed directly in Javascript. The array is used
55
+ * in place and becomes part of the constructed object. It is not cloned.
56
+ * If no data is provided, the constructed object will be empty, but still
57
+ * valid.
58
+ * @extends {jspb.Message}
59
+ * @constructor
60
+ */
61
+ proto.wechaty.puppet.PostPayloadClient = function(opt_data) {
62
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.PostPayloadClient.repeatedFields_, null);
63
+ };
64
+ goog.inherits(proto.wechaty.puppet.PostPayloadClient, jspb.Message);
65
+ if (goog.DEBUG && !COMPILED) {
66
+ /**
67
+ * @public
68
+ * @override
69
+ */
70
+ proto.wechaty.puppet.PostPayloadClient.displayName = 'proto.wechaty.puppet.PostPayloadClient';
71
+ }
72
+ /**
73
+ * Generated by JsPbCodeGenerator.
74
+ * @param {Array=} opt_data Optional initial data array, typically from a
75
+ * server response, or constructed directly in Javascript. The array is used
76
+ * in place and becomes part of the constructed object. It is not cloned.
77
+ * If no data is provided, the constructed object will be empty, but still
78
+ * valid.
79
+ * @extends {jspb.Message}
80
+ * @constructor
81
+ */
82
+ proto.wechaty.puppet.PostPayloadServer = function(opt_data) {
83
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.PostPayloadServer.repeatedFields_, null);
84
+ };
85
+ goog.inherits(proto.wechaty.puppet.PostPayloadServer, jspb.Message);
86
+ if (goog.DEBUG && !COMPILED) {
87
+ /**
88
+ * @public
89
+ * @override
90
+ */
91
+ proto.wechaty.puppet.PostPayloadServer.displayName = 'proto.wechaty.puppet.PostPayloadServer';
92
+ }
93
+
94
+ /**
95
+ * Oneof group definitions for this message. Each group defines the field
96
+ * numbers belonging to that group. When of these fields' value is set, all
97
+ * other fields in the group are cleared. During deserialization, if multiple
98
+ * fields are encountered for a group, only the last value seen will be kept.
99
+ * @private {!Array<!Array<number>>}
100
+ * @const
101
+ */
102
+ proto.wechaty.puppet.PostSayable.oneofGroups_ = [[2,3,4,5,6]];
103
+
104
+ /**
105
+ * @enum {number}
106
+ */
107
+ proto.wechaty.puppet.PostSayable.SayablesCase = {
108
+ SAYABLES_NOT_SET: 0,
109
+ ID: 2,
110
+ TEXT: 3,
111
+ FILE_BOX: 4,
112
+ URL_LINK: 5,
113
+ CAHNEL: 6
114
+ };
115
+
116
+ /**
117
+ * @return {proto.wechaty.puppet.PostSayable.SayablesCase}
118
+ */
119
+ proto.wechaty.puppet.PostSayable.prototype.getSayablesCase = function() {
120
+ return /** @type {proto.wechaty.puppet.PostSayable.SayablesCase} */(jspb.Message.computeOneofCase(this, proto.wechaty.puppet.PostSayable.oneofGroups_[0]));
121
+ };
122
+
123
+
124
+
125
+ if (jspb.Message.GENERATE_TO_OBJECT) {
126
+ /**
127
+ * Creates an object representation of this proto.
128
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
129
+ * Optional fields that are not set will be set to undefined.
130
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
131
+ * For the list of reserved names please see:
132
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
133
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
134
+ * JSPB instance for transitional soy proto support:
135
+ * http://goto/soy-param-migration
136
+ * @return {!Object}
137
+ */
138
+ proto.wechaty.puppet.PostSayable.prototype.toObject = function(opt_includeInstance) {
139
+ return proto.wechaty.puppet.PostSayable.toObject(opt_includeInstance, this);
140
+ };
141
+
142
+
143
+ /**
144
+ * Static version of the {@see toObject} method.
145
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
146
+ * the JSPB instance for transitional soy proto support:
147
+ * http://goto/soy-param-migration
148
+ * @param {!proto.wechaty.puppet.PostSayable} msg The msg instance to transform.
149
+ * @return {!Object}
150
+ * @suppress {unusedLocalVariables} f is only used for nested messages
151
+ */
152
+ proto.wechaty.puppet.PostSayable.toObject = function(includeInstance, msg) {
153
+ var f, obj = {
154
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
155
+ id: jspb.Message.getFieldWithDefault(msg, 2, ""),
156
+ text: jspb.Message.getFieldWithDefault(msg, 3, ""),
157
+ fileBox: jspb.Message.getFieldWithDefault(msg, 4, ""),
158
+ urlLink: (f = msg.getUrlLink()) && wechaty_puppet_url$link_pb.UrlLinkPayload.toObject(includeInstance, f),
159
+ cahnel: (f = msg.getCahnel()) && wechaty_puppet_channel_pb.ChannelPayload.toObject(includeInstance, f)
160
+ };
161
+
162
+ if (includeInstance) {
163
+ obj.$jspbMessageInstance = msg;
164
+ }
165
+ return obj;
166
+ };
167
+ }
168
+
169
+
170
+ /**
171
+ * Deserializes binary data (in protobuf wire format).
172
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
173
+ * @return {!proto.wechaty.puppet.PostSayable}
174
+ */
175
+ proto.wechaty.puppet.PostSayable.deserializeBinary = function(bytes) {
176
+ var reader = new jspb.BinaryReader(bytes);
177
+ var msg = new proto.wechaty.puppet.PostSayable;
178
+ return proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader(msg, reader);
179
+ };
180
+
181
+
182
+ /**
183
+ * Deserializes binary data (in protobuf wire format) from the
184
+ * given reader into the given message object.
185
+ * @param {!proto.wechaty.puppet.PostSayable} msg The message object to deserialize into.
186
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
187
+ * @return {!proto.wechaty.puppet.PostSayable}
188
+ */
189
+ proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader = function(msg, reader) {
190
+ while (reader.nextField()) {
191
+ if (reader.isEndGroup()) {
192
+ break;
193
+ }
194
+ var field = reader.getFieldNumber();
195
+ switch (field) {
196
+ case 1:
197
+ var value = /** @type {!proto.wechaty.puppet.SayableType} */ (reader.readEnum());
198
+ msg.setType(value);
199
+ break;
200
+ case 2:
201
+ var value = /** @type {string} */ (reader.readString());
202
+ msg.setId(value);
203
+ break;
204
+ case 3:
205
+ var value = /** @type {string} */ (reader.readString());
206
+ msg.setText(value);
207
+ break;
208
+ case 4:
209
+ var value = /** @type {string} */ (reader.readString());
210
+ msg.setFileBox(value);
211
+ break;
212
+ case 5:
213
+ var value = new wechaty_puppet_url$link_pb.UrlLinkPayload;
214
+ reader.readMessage(value,wechaty_puppet_url$link_pb.UrlLinkPayload.deserializeBinaryFromReader);
215
+ msg.setUrlLink(value);
216
+ break;
217
+ case 6:
218
+ var value = new wechaty_puppet_channel_pb.ChannelPayload;
219
+ reader.readMessage(value,wechaty_puppet_channel_pb.ChannelPayload.deserializeBinaryFromReader);
220
+ msg.setCahnel(value);
221
+ break;
222
+ default:
223
+ reader.skipField();
224
+ break;
225
+ }
226
+ }
227
+ return msg;
228
+ };
229
+
230
+
231
+ /**
232
+ * Serializes the message to binary data (in protobuf wire format).
233
+ * @return {!Uint8Array}
234
+ */
235
+ proto.wechaty.puppet.PostSayable.prototype.serializeBinary = function() {
236
+ var writer = new jspb.BinaryWriter();
237
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter(this, writer);
238
+ return writer.getResultBuffer();
239
+ };
240
+
241
+
242
+ /**
243
+ * Serializes the given message to binary data (in protobuf wire
244
+ * format), writing to the given BinaryWriter.
245
+ * @param {!proto.wechaty.puppet.PostSayable} message
246
+ * @param {!jspb.BinaryWriter} writer
247
+ * @suppress {unusedLocalVariables} f is only used for nested messages
248
+ */
249
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter = function(message, writer) {
250
+ var f = undefined;
251
+ f = message.getType();
252
+ if (f !== 0.0) {
253
+ writer.writeEnum(
254
+ 1,
255
+ f
256
+ );
257
+ }
258
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
259
+ if (f != null) {
260
+ writer.writeString(
261
+ 2,
262
+ f
263
+ );
264
+ }
265
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
266
+ if (f != null) {
267
+ writer.writeString(
268
+ 3,
269
+ f
270
+ );
271
+ }
272
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
273
+ if (f != null) {
274
+ writer.writeString(
275
+ 4,
276
+ f
277
+ );
278
+ }
279
+ f = message.getUrlLink();
280
+ if (f != null) {
281
+ writer.writeMessage(
282
+ 5,
283
+ f,
284
+ wechaty_puppet_url$link_pb.UrlLinkPayload.serializeBinaryToWriter
285
+ );
286
+ }
287
+ f = message.getCahnel();
288
+ if (f != null) {
289
+ writer.writeMessage(
290
+ 6,
291
+ f,
292
+ wechaty_puppet_channel_pb.ChannelPayload.serializeBinaryToWriter
293
+ );
294
+ }
295
+ };
296
+
297
+
298
+ /**
299
+ * optional SayableType type = 1;
300
+ * @return {!proto.wechaty.puppet.SayableType}
301
+ */
302
+ proto.wechaty.puppet.PostSayable.prototype.getType = function() {
303
+ return /** @type {!proto.wechaty.puppet.SayableType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
304
+ };
305
+
306
+
307
+ /**
308
+ * @param {!proto.wechaty.puppet.SayableType} value
309
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
310
+ */
311
+ proto.wechaty.puppet.PostSayable.prototype.setType = function(value) {
312
+ return jspb.Message.setProto3EnumField(this, 1, value);
313
+ };
314
+
315
+
316
+ /**
317
+ * optional string id = 2;
318
+ * @return {string}
319
+ */
320
+ proto.wechaty.puppet.PostSayable.prototype.getId = function() {
321
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
322
+ };
323
+
324
+
325
+ /**
326
+ * @param {string} value
327
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
328
+ */
329
+ proto.wechaty.puppet.PostSayable.prototype.setId = function(value) {
330
+ return jspb.Message.setOneofField(this, 2, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
331
+ };
332
+
333
+
334
+ /**
335
+ * Clears the field making it undefined.
336
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
337
+ */
338
+ proto.wechaty.puppet.PostSayable.prototype.clearId = function() {
339
+ return jspb.Message.setOneofField(this, 2, proto.wechaty.puppet.PostSayable.oneofGroups_[0], undefined);
340
+ };
341
+
342
+
343
+ /**
344
+ * Returns whether this field is set.
345
+ * @return {boolean}
346
+ */
347
+ proto.wechaty.puppet.PostSayable.prototype.hasId = function() {
348
+ return jspb.Message.getField(this, 2) != null;
349
+ };
350
+
351
+
352
+ /**
353
+ * optional string text = 3;
354
+ * @return {string}
355
+ */
356
+ proto.wechaty.puppet.PostSayable.prototype.getText = function() {
357
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
358
+ };
359
+
360
+
361
+ /**
362
+ * @param {string} value
363
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
364
+ */
365
+ proto.wechaty.puppet.PostSayable.prototype.setText = function(value) {
366
+ return jspb.Message.setOneofField(this, 3, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
367
+ };
368
+
369
+
370
+ /**
371
+ * Clears the field making it undefined.
372
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
373
+ */
374
+ proto.wechaty.puppet.PostSayable.prototype.clearText = function() {
375
+ return jspb.Message.setOneofField(this, 3, proto.wechaty.puppet.PostSayable.oneofGroups_[0], undefined);
376
+ };
377
+
378
+
379
+ /**
380
+ * Returns whether this field is set.
381
+ * @return {boolean}
382
+ */
383
+ proto.wechaty.puppet.PostSayable.prototype.hasText = function() {
384
+ return jspb.Message.getField(this, 3) != null;
385
+ };
386
+
387
+
388
+ /**
389
+ * optional string file_box = 4;
390
+ * @return {string}
391
+ */
392
+ proto.wechaty.puppet.PostSayable.prototype.getFileBox = function() {
393
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
394
+ };
395
+
396
+
397
+ /**
398
+ * @param {string} value
399
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
400
+ */
401
+ proto.wechaty.puppet.PostSayable.prototype.setFileBox = function(value) {
402
+ return jspb.Message.setOneofField(this, 4, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
403
+ };
404
+
405
+
406
+ /**
407
+ * Clears the field making it undefined.
408
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
409
+ */
410
+ proto.wechaty.puppet.PostSayable.prototype.clearFileBox = function() {
411
+ return jspb.Message.setOneofField(this, 4, proto.wechaty.puppet.PostSayable.oneofGroups_[0], undefined);
412
+ };
413
+
414
+
415
+ /**
416
+ * Returns whether this field is set.
417
+ * @return {boolean}
418
+ */
419
+ proto.wechaty.puppet.PostSayable.prototype.hasFileBox = function() {
420
+ return jspb.Message.getField(this, 4) != null;
421
+ };
422
+
423
+
424
+ /**
425
+ * optional UrlLinkPayload url_link = 5;
426
+ * @return {?proto.wechaty.puppet.UrlLinkPayload}
427
+ */
428
+ proto.wechaty.puppet.PostSayable.prototype.getUrlLink = function() {
429
+ return /** @type{?proto.wechaty.puppet.UrlLinkPayload} */ (
430
+ jspb.Message.getWrapperField(this, wechaty_puppet_url$link_pb.UrlLinkPayload, 5));
431
+ };
432
+
433
+
434
+ /**
435
+ * @param {?proto.wechaty.puppet.UrlLinkPayload|undefined} value
436
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
437
+ */
438
+ proto.wechaty.puppet.PostSayable.prototype.setUrlLink = function(value) {
439
+ return jspb.Message.setOneofWrapperField(this, 5, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
440
+ };
441
+
442
+
443
+ /**
444
+ * Clears the message field making it undefined.
445
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
446
+ */
447
+ proto.wechaty.puppet.PostSayable.prototype.clearUrlLink = function() {
448
+ return this.setUrlLink(undefined);
449
+ };
450
+
451
+
452
+ /**
453
+ * Returns whether this field is set.
454
+ * @return {boolean}
455
+ */
456
+ proto.wechaty.puppet.PostSayable.prototype.hasUrlLink = function() {
457
+ return jspb.Message.getField(this, 5) != null;
458
+ };
459
+
460
+
461
+ /**
462
+ * optional ChannelPayload cahnel = 6;
463
+ * @return {?proto.wechaty.puppet.ChannelPayload}
464
+ */
465
+ proto.wechaty.puppet.PostSayable.prototype.getCahnel = function() {
466
+ return /** @type{?proto.wechaty.puppet.ChannelPayload} */ (
467
+ jspb.Message.getWrapperField(this, wechaty_puppet_channel_pb.ChannelPayload, 6));
468
+ };
469
+
470
+
471
+ /**
472
+ * @param {?proto.wechaty.puppet.ChannelPayload|undefined} value
473
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
474
+ */
475
+ proto.wechaty.puppet.PostSayable.prototype.setCahnel = function(value) {
476
+ return jspb.Message.setOneofWrapperField(this, 6, proto.wechaty.puppet.PostSayable.oneofGroups_[0], value);
477
+ };
478
+
479
+
480
+ /**
481
+ * Clears the message field making it undefined.
482
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
483
+ */
484
+ proto.wechaty.puppet.PostSayable.prototype.clearCahnel = function() {
485
+ return this.setCahnel(undefined);
486
+ };
487
+
488
+
489
+ /**
490
+ * Returns whether this field is set.
491
+ * @return {boolean}
492
+ */
493
+ proto.wechaty.puppet.PostSayable.prototype.hasCahnel = function() {
494
+ return jspb.Message.getField(this, 6) != null;
495
+ };
496
+
497
+
498
+
499
+ /**
500
+ * List of repeated fields within this message type.
501
+ * @private {!Array<number>}
502
+ * @const
503
+ */
504
+ proto.wechaty.puppet.PostPayloadClient.repeatedFields_ = [4];
505
+
506
+
507
+
508
+ if (jspb.Message.GENERATE_TO_OBJECT) {
509
+ /**
510
+ * Creates an object representation of this proto.
511
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
512
+ * Optional fields that are not set will be set to undefined.
513
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
514
+ * For the list of reserved names please see:
515
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
516
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
517
+ * JSPB instance for transitional soy proto support:
518
+ * http://goto/soy-param-migration
519
+ * @return {!Object}
520
+ */
521
+ proto.wechaty.puppet.PostPayloadClient.prototype.toObject = function(opt_includeInstance) {
522
+ return proto.wechaty.puppet.PostPayloadClient.toObject(opt_includeInstance, this);
523
+ };
524
+
525
+
526
+ /**
527
+ * Static version of the {@see toObject} method.
528
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
529
+ * the JSPB instance for transitional soy proto support:
530
+ * http://goto/soy-param-migration
531
+ * @param {!proto.wechaty.puppet.PostPayloadClient} msg The msg instance to transform.
532
+ * @return {!Object}
533
+ * @suppress {unusedLocalVariables} f is only used for nested messages
534
+ */
535
+ proto.wechaty.puppet.PostPayloadClient.toObject = function(includeInstance, msg) {
536
+ var f, obj = {
537
+ parentId: jspb.Message.getFieldWithDefault(msg, 1, ""),
538
+ rootId: jspb.Message.getFieldWithDefault(msg, 2, ""),
539
+ type: jspb.Message.getFieldWithDefault(msg, 3, 0),
540
+ sayableListList: jspb.Message.toObjectList(msg.getSayableListList(),
541
+ proto.wechaty.puppet.PostSayable.toObject, includeInstance)
542
+ };
543
+
544
+ if (includeInstance) {
545
+ obj.$jspbMessageInstance = msg;
546
+ }
547
+ return obj;
548
+ };
549
+ }
550
+
551
+
552
+ /**
553
+ * Deserializes binary data (in protobuf wire format).
554
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
555
+ * @return {!proto.wechaty.puppet.PostPayloadClient}
556
+ */
557
+ proto.wechaty.puppet.PostPayloadClient.deserializeBinary = function(bytes) {
558
+ var reader = new jspb.BinaryReader(bytes);
559
+ var msg = new proto.wechaty.puppet.PostPayloadClient;
560
+ return proto.wechaty.puppet.PostPayloadClient.deserializeBinaryFromReader(msg, reader);
561
+ };
562
+
563
+
564
+ /**
565
+ * Deserializes binary data (in protobuf wire format) from the
566
+ * given reader into the given message object.
567
+ * @param {!proto.wechaty.puppet.PostPayloadClient} msg The message object to deserialize into.
568
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
569
+ * @return {!proto.wechaty.puppet.PostPayloadClient}
570
+ */
571
+ proto.wechaty.puppet.PostPayloadClient.deserializeBinaryFromReader = function(msg, reader) {
572
+ while (reader.nextField()) {
573
+ if (reader.isEndGroup()) {
574
+ break;
575
+ }
576
+ var field = reader.getFieldNumber();
577
+ switch (field) {
578
+ case 1:
579
+ var value = /** @type {string} */ (reader.readString());
580
+ msg.setParentId(value);
581
+ break;
582
+ case 2:
583
+ var value = /** @type {string} */ (reader.readString());
584
+ msg.setRootId(value);
585
+ break;
586
+ case 3:
587
+ var value = /** @type {!proto.wechaty.puppet.PostType} */ (reader.readEnum());
588
+ msg.setType(value);
589
+ break;
590
+ case 4:
591
+ var value = new proto.wechaty.puppet.PostSayable;
592
+ reader.readMessage(value,proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader);
593
+ msg.addSayableList(value);
594
+ break;
595
+ default:
596
+ reader.skipField();
597
+ break;
598
+ }
599
+ }
600
+ return msg;
601
+ };
602
+
603
+
604
+ /**
605
+ * Serializes the message to binary data (in protobuf wire format).
606
+ * @return {!Uint8Array}
607
+ */
608
+ proto.wechaty.puppet.PostPayloadClient.prototype.serializeBinary = function() {
609
+ var writer = new jspb.BinaryWriter();
610
+ proto.wechaty.puppet.PostPayloadClient.serializeBinaryToWriter(this, writer);
611
+ return writer.getResultBuffer();
612
+ };
613
+
614
+
615
+ /**
616
+ * Serializes the given message to binary data (in protobuf wire
617
+ * format), writing to the given BinaryWriter.
618
+ * @param {!proto.wechaty.puppet.PostPayloadClient} message
619
+ * @param {!jspb.BinaryWriter} writer
620
+ * @suppress {unusedLocalVariables} f is only used for nested messages
621
+ */
622
+ proto.wechaty.puppet.PostPayloadClient.serializeBinaryToWriter = function(message, writer) {
623
+ var f = undefined;
624
+ f = message.getParentId();
625
+ if (f.length > 0) {
626
+ writer.writeString(
627
+ 1,
628
+ f
629
+ );
630
+ }
631
+ f = message.getRootId();
632
+ if (f.length > 0) {
633
+ writer.writeString(
634
+ 2,
635
+ f
636
+ );
637
+ }
638
+ f = message.getType();
639
+ if (f !== 0.0) {
640
+ writer.writeEnum(
641
+ 3,
642
+ f
643
+ );
644
+ }
645
+ f = message.getSayableListList();
646
+ if (f.length > 0) {
647
+ writer.writeRepeatedMessage(
648
+ 4,
649
+ f,
650
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter
651
+ );
652
+ }
653
+ };
654
+
655
+
656
+ /**
657
+ * optional string parent_id = 1;
658
+ * @return {string}
659
+ */
660
+ proto.wechaty.puppet.PostPayloadClient.prototype.getParentId = function() {
661
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
662
+ };
663
+
664
+
665
+ /**
666
+ * @param {string} value
667
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
668
+ */
669
+ proto.wechaty.puppet.PostPayloadClient.prototype.setParentId = function(value) {
670
+ return jspb.Message.setProto3StringField(this, 1, value);
671
+ };
672
+
673
+
674
+ /**
675
+ * optional string root_id = 2;
676
+ * @return {string}
677
+ */
678
+ proto.wechaty.puppet.PostPayloadClient.prototype.getRootId = function() {
679
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
680
+ };
681
+
682
+
683
+ /**
684
+ * @param {string} value
685
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
686
+ */
687
+ proto.wechaty.puppet.PostPayloadClient.prototype.setRootId = function(value) {
688
+ return jspb.Message.setProto3StringField(this, 2, value);
689
+ };
690
+
691
+
692
+ /**
693
+ * optional PostType type = 3;
694
+ * @return {!proto.wechaty.puppet.PostType}
695
+ */
696
+ proto.wechaty.puppet.PostPayloadClient.prototype.getType = function() {
697
+ return /** @type {!proto.wechaty.puppet.PostType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
698
+ };
699
+
700
+
701
+ /**
702
+ * @param {!proto.wechaty.puppet.PostType} value
703
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
704
+ */
705
+ proto.wechaty.puppet.PostPayloadClient.prototype.setType = function(value) {
706
+ return jspb.Message.setProto3EnumField(this, 3, value);
707
+ };
708
+
709
+
710
+ /**
711
+ * repeated PostSayable sayable_list = 4;
712
+ * @return {!Array<!proto.wechaty.puppet.PostSayable>}
713
+ */
714
+ proto.wechaty.puppet.PostPayloadClient.prototype.getSayableListList = function() {
715
+ return /** @type{!Array<!proto.wechaty.puppet.PostSayable>} */ (
716
+ jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.PostSayable, 4));
717
+ };
718
+
719
+
720
+ /**
721
+ * @param {!Array<!proto.wechaty.puppet.PostSayable>} value
722
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
723
+ */
724
+ proto.wechaty.puppet.PostPayloadClient.prototype.setSayableListList = function(value) {
725
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
726
+ };
727
+
728
+
729
+ /**
730
+ * @param {!proto.wechaty.puppet.PostSayable=} opt_value
731
+ * @param {number=} opt_index
732
+ * @return {!proto.wechaty.puppet.PostSayable}
733
+ */
734
+ proto.wechaty.puppet.PostPayloadClient.prototype.addSayableList = function(opt_value, opt_index) {
735
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.wechaty.puppet.PostSayable, opt_index);
736
+ };
737
+
738
+
739
+ /**
740
+ * Clears the list making it empty but non-null.
741
+ * @return {!proto.wechaty.puppet.PostPayloadClient} returns this
742
+ */
743
+ proto.wechaty.puppet.PostPayloadClient.prototype.clearSayableListList = function() {
744
+ return this.setSayableListList([]);
745
+ };
746
+
747
+
748
+
749
+ /**
750
+ * List of repeated fields within this message type.
751
+ * @private {!Array<number>}
752
+ * @const
753
+ */
754
+ proto.wechaty.puppet.PostPayloadServer.repeatedFields_ = [4];
755
+
756
+
757
+
758
+ if (jspb.Message.GENERATE_TO_OBJECT) {
759
+ /**
760
+ * Creates an object representation of this proto.
761
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
762
+ * Optional fields that are not set will be set to undefined.
763
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
764
+ * For the list of reserved names please see:
765
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
766
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
767
+ * JSPB instance for transitional soy proto support:
768
+ * http://goto/soy-param-migration
769
+ * @return {!Object}
770
+ */
771
+ proto.wechaty.puppet.PostPayloadServer.prototype.toObject = function(opt_includeInstance) {
772
+ return proto.wechaty.puppet.PostPayloadServer.toObject(opt_includeInstance, this);
773
+ };
774
+
775
+
776
+ /**
777
+ * Static version of the {@see toObject} method.
778
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
779
+ * the JSPB instance for transitional soy proto support:
780
+ * http://goto/soy-param-migration
781
+ * @param {!proto.wechaty.puppet.PostPayloadServer} msg The msg instance to transform.
782
+ * @return {!Object}
783
+ * @suppress {unusedLocalVariables} f is only used for nested messages
784
+ */
785
+ proto.wechaty.puppet.PostPayloadServer.toObject = function(includeInstance, msg) {
786
+ var f, obj = {
787
+ parentId: jspb.Message.getFieldWithDefault(msg, 1, ""),
788
+ rootId: jspb.Message.getFieldWithDefault(msg, 2, ""),
789
+ type: jspb.Message.getFieldWithDefault(msg, 3, 0),
790
+ sayableListList: jspb.Message.toObjectList(msg.getSayableListList(),
791
+ proto.wechaty.puppet.PostSayable.toObject, includeInstance),
792
+ contactId: jspb.Message.getFieldWithDefault(msg, 5, ""),
793
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
794
+ children: jspb.Message.getFieldWithDefault(msg, 7, 0),
795
+ descendant: jspb.Message.getFieldWithDefault(msg, 8, 0),
796
+ like: jspb.Message.getFieldWithDefault(msg, 9, 0)
797
+ };
798
+
799
+ if (includeInstance) {
800
+ obj.$jspbMessageInstance = msg;
801
+ }
802
+ return obj;
803
+ };
804
+ }
805
+
806
+
807
+ /**
808
+ * Deserializes binary data (in protobuf wire format).
809
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
810
+ * @return {!proto.wechaty.puppet.PostPayloadServer}
811
+ */
812
+ proto.wechaty.puppet.PostPayloadServer.deserializeBinary = function(bytes) {
813
+ var reader = new jspb.BinaryReader(bytes);
814
+ var msg = new proto.wechaty.puppet.PostPayloadServer;
815
+ return proto.wechaty.puppet.PostPayloadServer.deserializeBinaryFromReader(msg, reader);
816
+ };
817
+
818
+
819
+ /**
820
+ * Deserializes binary data (in protobuf wire format) from the
821
+ * given reader into the given message object.
822
+ * @param {!proto.wechaty.puppet.PostPayloadServer} msg The message object to deserialize into.
823
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
824
+ * @return {!proto.wechaty.puppet.PostPayloadServer}
825
+ */
826
+ proto.wechaty.puppet.PostPayloadServer.deserializeBinaryFromReader = function(msg, reader) {
827
+ while (reader.nextField()) {
828
+ if (reader.isEndGroup()) {
829
+ break;
830
+ }
831
+ var field = reader.getFieldNumber();
832
+ switch (field) {
833
+ case 1:
834
+ var value = /** @type {string} */ (reader.readString());
835
+ msg.setParentId(value);
836
+ break;
837
+ case 2:
838
+ var value = /** @type {string} */ (reader.readString());
839
+ msg.setRootId(value);
840
+ break;
841
+ case 3:
842
+ var value = /** @type {!proto.wechaty.puppet.PostType} */ (reader.readEnum());
843
+ msg.setType(value);
844
+ break;
845
+ case 4:
846
+ var value = new proto.wechaty.puppet.PostSayable;
847
+ reader.readMessage(value,proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader);
848
+ msg.addSayableList(value);
849
+ break;
850
+ case 5:
851
+ var value = /** @type {string} */ (reader.readString());
852
+ msg.setContactId(value);
853
+ break;
854
+ case 6:
855
+ var value = new google_protobuf_timestamp_pb.Timestamp;
856
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
857
+ msg.setTimestamp(value);
858
+ break;
859
+ case 7:
860
+ var value = /** @type {number} */ (reader.readInt32());
861
+ msg.setChildren(value);
862
+ break;
863
+ case 8:
864
+ var value = /** @type {number} */ (reader.readInt32());
865
+ msg.setDescendant(value);
866
+ break;
867
+ case 9:
868
+ var value = /** @type {number} */ (reader.readInt32());
869
+ msg.setLike(value);
870
+ break;
871
+ default:
872
+ reader.skipField();
873
+ break;
874
+ }
875
+ }
876
+ return msg;
877
+ };
878
+
879
+
880
+ /**
881
+ * Serializes the message to binary data (in protobuf wire format).
882
+ * @return {!Uint8Array}
883
+ */
884
+ proto.wechaty.puppet.PostPayloadServer.prototype.serializeBinary = function() {
885
+ var writer = new jspb.BinaryWriter();
886
+ proto.wechaty.puppet.PostPayloadServer.serializeBinaryToWriter(this, writer);
887
+ return writer.getResultBuffer();
888
+ };
889
+
890
+
891
+ /**
892
+ * Serializes the given message to binary data (in protobuf wire
893
+ * format), writing to the given BinaryWriter.
894
+ * @param {!proto.wechaty.puppet.PostPayloadServer} message
895
+ * @param {!jspb.BinaryWriter} writer
896
+ * @suppress {unusedLocalVariables} f is only used for nested messages
897
+ */
898
+ proto.wechaty.puppet.PostPayloadServer.serializeBinaryToWriter = function(message, writer) {
899
+ var f = undefined;
900
+ f = message.getParentId();
901
+ if (f.length > 0) {
902
+ writer.writeString(
903
+ 1,
904
+ f
905
+ );
906
+ }
907
+ f = message.getRootId();
908
+ if (f.length > 0) {
909
+ writer.writeString(
910
+ 2,
911
+ f
912
+ );
913
+ }
914
+ f = message.getType();
915
+ if (f !== 0.0) {
916
+ writer.writeEnum(
917
+ 3,
918
+ f
919
+ );
920
+ }
921
+ f = message.getSayableListList();
922
+ if (f.length > 0) {
923
+ writer.writeRepeatedMessage(
924
+ 4,
925
+ f,
926
+ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter
927
+ );
928
+ }
929
+ f = message.getContactId();
930
+ if (f.length > 0) {
931
+ writer.writeString(
932
+ 5,
933
+ f
934
+ );
935
+ }
936
+ f = message.getTimestamp();
937
+ if (f != null) {
938
+ writer.writeMessage(
939
+ 6,
940
+ f,
941
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
942
+ );
943
+ }
944
+ f = message.getChildren();
945
+ if (f !== 0) {
946
+ writer.writeInt32(
947
+ 7,
948
+ f
949
+ );
950
+ }
951
+ f = message.getDescendant();
952
+ if (f !== 0) {
953
+ writer.writeInt32(
954
+ 8,
955
+ f
956
+ );
957
+ }
958
+ f = message.getLike();
959
+ if (f !== 0) {
960
+ writer.writeInt32(
961
+ 9,
962
+ f
963
+ );
964
+ }
965
+ };
966
+
967
+
968
+ /**
969
+ * optional string parent_id = 1;
970
+ * @return {string}
971
+ */
972
+ proto.wechaty.puppet.PostPayloadServer.prototype.getParentId = function() {
973
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
974
+ };
975
+
976
+
977
+ /**
978
+ * @param {string} value
979
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
980
+ */
981
+ proto.wechaty.puppet.PostPayloadServer.prototype.setParentId = function(value) {
982
+ return jspb.Message.setProto3StringField(this, 1, value);
983
+ };
984
+
985
+
986
+ /**
987
+ * optional string root_id = 2;
988
+ * @return {string}
989
+ */
990
+ proto.wechaty.puppet.PostPayloadServer.prototype.getRootId = function() {
991
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
992
+ };
993
+
994
+
995
+ /**
996
+ * @param {string} value
997
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
998
+ */
999
+ proto.wechaty.puppet.PostPayloadServer.prototype.setRootId = function(value) {
1000
+ return jspb.Message.setProto3StringField(this, 2, value);
1001
+ };
1002
+
1003
+
1004
+ /**
1005
+ * optional PostType type = 3;
1006
+ * @return {!proto.wechaty.puppet.PostType}
1007
+ */
1008
+ proto.wechaty.puppet.PostPayloadServer.prototype.getType = function() {
1009
+ return /** @type {!proto.wechaty.puppet.PostType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1010
+ };
1011
+
1012
+
1013
+ /**
1014
+ * @param {!proto.wechaty.puppet.PostType} value
1015
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1016
+ */
1017
+ proto.wechaty.puppet.PostPayloadServer.prototype.setType = function(value) {
1018
+ return jspb.Message.setProto3EnumField(this, 3, value);
1019
+ };
1020
+
1021
+
1022
+ /**
1023
+ * repeated PostSayable sayable_list = 4;
1024
+ * @return {!Array<!proto.wechaty.puppet.PostSayable>}
1025
+ */
1026
+ proto.wechaty.puppet.PostPayloadServer.prototype.getSayableListList = function() {
1027
+ return /** @type{!Array<!proto.wechaty.puppet.PostSayable>} */ (
1028
+ jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.PostSayable, 4));
1029
+ };
1030
+
1031
+
1032
+ /**
1033
+ * @param {!Array<!proto.wechaty.puppet.PostSayable>} value
1034
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1035
+ */
1036
+ proto.wechaty.puppet.PostPayloadServer.prototype.setSayableListList = function(value) {
1037
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
1038
+ };
1039
+
1040
+
1041
+ /**
1042
+ * @param {!proto.wechaty.puppet.PostSayable=} opt_value
1043
+ * @param {number=} opt_index
1044
+ * @return {!proto.wechaty.puppet.PostSayable}
1045
+ */
1046
+ proto.wechaty.puppet.PostPayloadServer.prototype.addSayableList = function(opt_value, opt_index) {
1047
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.wechaty.puppet.PostSayable, opt_index);
1048
+ };
1049
+
1050
+
1051
+ /**
1052
+ * Clears the list making it empty but non-null.
1053
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1054
+ */
1055
+ proto.wechaty.puppet.PostPayloadServer.prototype.clearSayableListList = function() {
1056
+ return this.setSayableListList([]);
1057
+ };
1058
+
1059
+
1060
+ /**
1061
+ * optional string contact_id = 5;
1062
+ * @return {string}
1063
+ */
1064
+ proto.wechaty.puppet.PostPayloadServer.prototype.getContactId = function() {
1065
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1066
+ };
1067
+
1068
+
1069
+ /**
1070
+ * @param {string} value
1071
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1072
+ */
1073
+ proto.wechaty.puppet.PostPayloadServer.prototype.setContactId = function(value) {
1074
+ return jspb.Message.setProto3StringField(this, 5, value);
1075
+ };
1076
+
1077
+
1078
+ /**
1079
+ * optional google.protobuf.Timestamp timestamp = 6;
1080
+ * @return {?proto.google.protobuf.Timestamp}
1081
+ */
1082
+ proto.wechaty.puppet.PostPayloadServer.prototype.getTimestamp = function() {
1083
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1084
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
1085
+ };
1086
+
1087
+
1088
+ /**
1089
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1090
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1091
+ */
1092
+ proto.wechaty.puppet.PostPayloadServer.prototype.setTimestamp = function(value) {
1093
+ return jspb.Message.setWrapperField(this, 6, value);
1094
+ };
1095
+
1096
+
1097
+ /**
1098
+ * Clears the message field making it undefined.
1099
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1100
+ */
1101
+ proto.wechaty.puppet.PostPayloadServer.prototype.clearTimestamp = function() {
1102
+ return this.setTimestamp(undefined);
1103
+ };
1104
+
1105
+
1106
+ /**
1107
+ * Returns whether this field is set.
1108
+ * @return {boolean}
1109
+ */
1110
+ proto.wechaty.puppet.PostPayloadServer.prototype.hasTimestamp = function() {
1111
+ return jspb.Message.getField(this, 6) != null;
1112
+ };
1113
+
1114
+
1115
+ /**
1116
+ * optional int32 children = 7;
1117
+ * @return {number}
1118
+ */
1119
+ proto.wechaty.puppet.PostPayloadServer.prototype.getChildren = function() {
1120
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1121
+ };
1122
+
1123
+
1124
+ /**
1125
+ * @param {number} value
1126
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1127
+ */
1128
+ proto.wechaty.puppet.PostPayloadServer.prototype.setChildren = function(value) {
1129
+ return jspb.Message.setProto3IntField(this, 7, value);
1130
+ };
1131
+
1132
+
1133
+ /**
1134
+ * optional int32 descendant = 8;
1135
+ * @return {number}
1136
+ */
1137
+ proto.wechaty.puppet.PostPayloadServer.prototype.getDescendant = function() {
1138
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1139
+ };
1140
+
1141
+
1142
+ /**
1143
+ * @param {number} value
1144
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1145
+ */
1146
+ proto.wechaty.puppet.PostPayloadServer.prototype.setDescendant = function(value) {
1147
+ return jspb.Message.setProto3IntField(this, 8, value);
1148
+ };
1149
+
1150
+
1151
+ /**
1152
+ * optional int32 like = 9;
1153
+ * @return {number}
1154
+ */
1155
+ proto.wechaty.puppet.PostPayloadServer.prototype.getLike = function() {
1156
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1157
+ };
1158
+
1159
+
1160
+ /**
1161
+ * @param {number} value
1162
+ * @return {!proto.wechaty.puppet.PostPayloadServer} returns this
1163
+ */
1164
+ proto.wechaty.puppet.PostPayloadServer.prototype.setLike = function(value) {
1165
+ return jspb.Message.setProto3IntField(this, 9, value);
1166
+ };
1167
+
1168
+
1169
+ /**
1170
+ * @enum {number}
1171
+ */
1172
+ proto.wechaty.puppet.PostType = {
1173
+ POST_TYPE_UNSPECIFIED: 0,
1174
+ POST_TYPE_MOMENT: 1,
1175
+ POST_TYPE_CHANNEL: 2,
1176
+ POST_TYPE_MESSAGE: 3
1177
+ };
1178
+
1179
+ /**
1180
+ * @enum {number}
1181
+ */
1182
+ proto.wechaty.puppet.SayableType = {
1183
+ SAYABLE_TYPE_TEXT: 0,
1184
+ SAYABLE_TYPE_FILE: 1,
1185
+ SAYABLE_TYPE_URL: 2,
1186
+ SAYABLE_TYPE_CHANNEL: 3
1187
+ };
1188
+
1189
+ goog.object.extend(exports, proto.wechaty.puppet);