@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,953 @@
1
+ // source: wechaty/puppet/moment.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 wechaty_puppet_post_pb = require('../../wechaty/puppet/post_pb.js');
19
+ goog.object.extend(proto, wechaty_puppet_post_pb);
20
+ goog.exportSymbol('proto.wechaty.puppet.MomentCoverageRequest', null, global);
21
+ goog.exportSymbol('proto.wechaty.puppet.MomentCoverageResponse', null, global);
22
+ goog.exportSymbol('proto.wechaty.puppet.MomentPublishRequest', null, global);
23
+ goog.exportSymbol('proto.wechaty.puppet.MomentPublishResponse', null, global);
24
+ goog.exportSymbol('proto.wechaty.puppet.MomentSignatureRequest', null, global);
25
+ goog.exportSymbol('proto.wechaty.puppet.MomentSignatureResponse', null, global);
26
+ /**
27
+ * Generated by JsPbCodeGenerator.
28
+ * @param {Array=} opt_data Optional initial data array, typically from a
29
+ * server response, or constructed directly in Javascript. The array is used
30
+ * in place and becomes part of the constructed object. It is not cloned.
31
+ * If no data is provided, the constructed object will be empty, but still
32
+ * valid.
33
+ * @extends {jspb.Message}
34
+ * @constructor
35
+ */
36
+ proto.wechaty.puppet.MomentPublishRequest = function(opt_data) {
37
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
38
+ };
39
+ goog.inherits(proto.wechaty.puppet.MomentPublishRequest, jspb.Message);
40
+ if (goog.DEBUG && !COMPILED) {
41
+ /**
42
+ * @public
43
+ * @override
44
+ */
45
+ proto.wechaty.puppet.MomentPublishRequest.displayName = 'proto.wechaty.puppet.MomentPublishRequest';
46
+ }
47
+ /**
48
+ * Generated by JsPbCodeGenerator.
49
+ * @param {Array=} opt_data Optional initial data array, typically from a
50
+ * server response, or constructed directly in Javascript. The array is used
51
+ * in place and becomes part of the constructed object. It is not cloned.
52
+ * If no data is provided, the constructed object will be empty, but still
53
+ * valid.
54
+ * @extends {jspb.Message}
55
+ * @constructor
56
+ */
57
+ proto.wechaty.puppet.MomentPublishResponse = function(opt_data) {
58
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
59
+ };
60
+ goog.inherits(proto.wechaty.puppet.MomentPublishResponse, jspb.Message);
61
+ if (goog.DEBUG && !COMPILED) {
62
+ /**
63
+ * @public
64
+ * @override
65
+ */
66
+ proto.wechaty.puppet.MomentPublishResponse.displayName = 'proto.wechaty.puppet.MomentPublishResponse';
67
+ }
68
+ /**
69
+ * Generated by JsPbCodeGenerator.
70
+ * @param {Array=} opt_data Optional initial data array, typically from a
71
+ * server response, or constructed directly in Javascript. The array is used
72
+ * in place and becomes part of the constructed object. It is not cloned.
73
+ * If no data is provided, the constructed object will be empty, but still
74
+ * valid.
75
+ * @extends {jspb.Message}
76
+ * @constructor
77
+ */
78
+ proto.wechaty.puppet.MomentSignatureRequest = function(opt_data) {
79
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
80
+ };
81
+ goog.inherits(proto.wechaty.puppet.MomentSignatureRequest, jspb.Message);
82
+ if (goog.DEBUG && !COMPILED) {
83
+ /**
84
+ * @public
85
+ * @override
86
+ */
87
+ proto.wechaty.puppet.MomentSignatureRequest.displayName = 'proto.wechaty.puppet.MomentSignatureRequest';
88
+ }
89
+ /**
90
+ * Generated by JsPbCodeGenerator.
91
+ * @param {Array=} opt_data Optional initial data array, typically from a
92
+ * server response, or constructed directly in Javascript. The array is used
93
+ * in place and becomes part of the constructed object. It is not cloned.
94
+ * If no data is provided, the constructed object will be empty, but still
95
+ * valid.
96
+ * @extends {jspb.Message}
97
+ * @constructor
98
+ */
99
+ proto.wechaty.puppet.MomentSignatureResponse = function(opt_data) {
100
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
101
+ };
102
+ goog.inherits(proto.wechaty.puppet.MomentSignatureResponse, jspb.Message);
103
+ if (goog.DEBUG && !COMPILED) {
104
+ /**
105
+ * @public
106
+ * @override
107
+ */
108
+ proto.wechaty.puppet.MomentSignatureResponse.displayName = 'proto.wechaty.puppet.MomentSignatureResponse';
109
+ }
110
+ /**
111
+ * Generated by JsPbCodeGenerator.
112
+ * @param {Array=} opt_data Optional initial data array, typically from a
113
+ * server response, or constructed directly in Javascript. The array is used
114
+ * in place and becomes part of the constructed object. It is not cloned.
115
+ * If no data is provided, the constructed object will be empty, but still
116
+ * valid.
117
+ * @extends {jspb.Message}
118
+ * @constructor
119
+ */
120
+ proto.wechaty.puppet.MomentCoverageRequest = function(opt_data) {
121
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
122
+ };
123
+ goog.inherits(proto.wechaty.puppet.MomentCoverageRequest, jspb.Message);
124
+ if (goog.DEBUG && !COMPILED) {
125
+ /**
126
+ * @public
127
+ * @override
128
+ */
129
+ proto.wechaty.puppet.MomentCoverageRequest.displayName = 'proto.wechaty.puppet.MomentCoverageRequest';
130
+ }
131
+ /**
132
+ * Generated by JsPbCodeGenerator.
133
+ * @param {Array=} opt_data Optional initial data array, typically from a
134
+ * server response, or constructed directly in Javascript. The array is used
135
+ * in place and becomes part of the constructed object. It is not cloned.
136
+ * If no data is provided, the constructed object will be empty, but still
137
+ * valid.
138
+ * @extends {jspb.Message}
139
+ * @constructor
140
+ */
141
+ proto.wechaty.puppet.MomentCoverageResponse = function(opt_data) {
142
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
143
+ };
144
+ goog.inherits(proto.wechaty.puppet.MomentCoverageResponse, jspb.Message);
145
+ if (goog.DEBUG && !COMPILED) {
146
+ /**
147
+ * @public
148
+ * @override
149
+ */
150
+ proto.wechaty.puppet.MomentCoverageResponse.displayName = 'proto.wechaty.puppet.MomentCoverageResponse';
151
+ }
152
+
153
+
154
+
155
+ if (jspb.Message.GENERATE_TO_OBJECT) {
156
+ /**
157
+ * Creates an object representation of this proto.
158
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
159
+ * Optional fields that are not set will be set to undefined.
160
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
161
+ * For the list of reserved names please see:
162
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
163
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
164
+ * JSPB instance for transitional soy proto support:
165
+ * http://goto/soy-param-migration
166
+ * @return {!Object}
167
+ */
168
+ proto.wechaty.puppet.MomentPublishRequest.prototype.toObject = function(opt_includeInstance) {
169
+ return proto.wechaty.puppet.MomentPublishRequest.toObject(opt_includeInstance, this);
170
+ };
171
+
172
+
173
+ /**
174
+ * Static version of the {@see toObject} method.
175
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
176
+ * the JSPB instance for transitional soy proto support:
177
+ * http://goto/soy-param-migration
178
+ * @param {!proto.wechaty.puppet.MomentPublishRequest} msg The msg instance to transform.
179
+ * @return {!Object}
180
+ * @suppress {unusedLocalVariables} f is only used for nested messages
181
+ */
182
+ proto.wechaty.puppet.MomentPublishRequest.toObject = function(includeInstance, msg) {
183
+ var f, obj = {
184
+ post: (f = msg.getPost()) && wechaty_puppet_post_pb.PostPayloadClient.toObject(includeInstance, f)
185
+ };
186
+
187
+ if (includeInstance) {
188
+ obj.$jspbMessageInstance = msg;
189
+ }
190
+ return obj;
191
+ };
192
+ }
193
+
194
+
195
+ /**
196
+ * Deserializes binary data (in protobuf wire format).
197
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
198
+ * @return {!proto.wechaty.puppet.MomentPublishRequest}
199
+ */
200
+ proto.wechaty.puppet.MomentPublishRequest.deserializeBinary = function(bytes) {
201
+ var reader = new jspb.BinaryReader(bytes);
202
+ var msg = new proto.wechaty.puppet.MomentPublishRequest;
203
+ return proto.wechaty.puppet.MomentPublishRequest.deserializeBinaryFromReader(msg, reader);
204
+ };
205
+
206
+
207
+ /**
208
+ * Deserializes binary data (in protobuf wire format) from the
209
+ * given reader into the given message object.
210
+ * @param {!proto.wechaty.puppet.MomentPublishRequest} msg The message object to deserialize into.
211
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
212
+ * @return {!proto.wechaty.puppet.MomentPublishRequest}
213
+ */
214
+ proto.wechaty.puppet.MomentPublishRequest.deserializeBinaryFromReader = function(msg, reader) {
215
+ while (reader.nextField()) {
216
+ if (reader.isEndGroup()) {
217
+ break;
218
+ }
219
+ var field = reader.getFieldNumber();
220
+ switch (field) {
221
+ case 1:
222
+ var value = new wechaty_puppet_post_pb.PostPayloadClient;
223
+ reader.readMessage(value,wechaty_puppet_post_pb.PostPayloadClient.deserializeBinaryFromReader);
224
+ msg.setPost(value);
225
+ break;
226
+ default:
227
+ reader.skipField();
228
+ break;
229
+ }
230
+ }
231
+ return msg;
232
+ };
233
+
234
+
235
+ /**
236
+ * Serializes the message to binary data (in protobuf wire format).
237
+ * @return {!Uint8Array}
238
+ */
239
+ proto.wechaty.puppet.MomentPublishRequest.prototype.serializeBinary = function() {
240
+ var writer = new jspb.BinaryWriter();
241
+ proto.wechaty.puppet.MomentPublishRequest.serializeBinaryToWriter(this, writer);
242
+ return writer.getResultBuffer();
243
+ };
244
+
245
+
246
+ /**
247
+ * Serializes the given message to binary data (in protobuf wire
248
+ * format), writing to the given BinaryWriter.
249
+ * @param {!proto.wechaty.puppet.MomentPublishRequest} message
250
+ * @param {!jspb.BinaryWriter} writer
251
+ * @suppress {unusedLocalVariables} f is only used for nested messages
252
+ */
253
+ proto.wechaty.puppet.MomentPublishRequest.serializeBinaryToWriter = function(message, writer) {
254
+ var f = undefined;
255
+ f = message.getPost();
256
+ if (f != null) {
257
+ writer.writeMessage(
258
+ 1,
259
+ f,
260
+ wechaty_puppet_post_pb.PostPayloadClient.serializeBinaryToWriter
261
+ );
262
+ }
263
+ };
264
+
265
+
266
+ /**
267
+ * optional PostPayloadClient post = 1;
268
+ * @return {?proto.wechaty.puppet.PostPayloadClient}
269
+ */
270
+ proto.wechaty.puppet.MomentPublishRequest.prototype.getPost = function() {
271
+ return /** @type{?proto.wechaty.puppet.PostPayloadClient} */ (
272
+ jspb.Message.getWrapperField(this, wechaty_puppet_post_pb.PostPayloadClient, 1));
273
+ };
274
+
275
+
276
+ /**
277
+ * @param {?proto.wechaty.puppet.PostPayloadClient|undefined} value
278
+ * @return {!proto.wechaty.puppet.MomentPublishRequest} returns this
279
+ */
280
+ proto.wechaty.puppet.MomentPublishRequest.prototype.setPost = function(value) {
281
+ return jspb.Message.setWrapperField(this, 1, value);
282
+ };
283
+
284
+
285
+ /**
286
+ * Clears the message field making it undefined.
287
+ * @return {!proto.wechaty.puppet.MomentPublishRequest} returns this
288
+ */
289
+ proto.wechaty.puppet.MomentPublishRequest.prototype.clearPost = function() {
290
+ return this.setPost(undefined);
291
+ };
292
+
293
+
294
+ /**
295
+ * Returns whether this field is set.
296
+ * @return {boolean}
297
+ */
298
+ proto.wechaty.puppet.MomentPublishRequest.prototype.hasPost = function() {
299
+ return jspb.Message.getField(this, 1) != null;
300
+ };
301
+
302
+
303
+
304
+
305
+
306
+ if (jspb.Message.GENERATE_TO_OBJECT) {
307
+ /**
308
+ * Creates an object representation of this proto.
309
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
310
+ * Optional fields that are not set will be set to undefined.
311
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
312
+ * For the list of reserved names please see:
313
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
314
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
315
+ * JSPB instance for transitional soy proto support:
316
+ * http://goto/soy-param-migration
317
+ * @return {!Object}
318
+ */
319
+ proto.wechaty.puppet.MomentPublishResponse.prototype.toObject = function(opt_includeInstance) {
320
+ return proto.wechaty.puppet.MomentPublishResponse.toObject(opt_includeInstance, this);
321
+ };
322
+
323
+
324
+ /**
325
+ * Static version of the {@see toObject} method.
326
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
327
+ * the JSPB instance for transitional soy proto support:
328
+ * http://goto/soy-param-migration
329
+ * @param {!proto.wechaty.puppet.MomentPublishResponse} msg The msg instance to transform.
330
+ * @return {!Object}
331
+ * @suppress {unusedLocalVariables} f is only used for nested messages
332
+ */
333
+ proto.wechaty.puppet.MomentPublishResponse.toObject = function(includeInstance, msg) {
334
+ var f, obj = {
335
+ momentId: jspb.Message.getFieldWithDefault(msg, 1, "")
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.MomentPublishResponse}
350
+ */
351
+ proto.wechaty.puppet.MomentPublishResponse.deserializeBinary = function(bytes) {
352
+ var reader = new jspb.BinaryReader(bytes);
353
+ var msg = new proto.wechaty.puppet.MomentPublishResponse;
354
+ return proto.wechaty.puppet.MomentPublishResponse.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.MomentPublishResponse} msg The message object to deserialize into.
362
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
363
+ * @return {!proto.wechaty.puppet.MomentPublishResponse}
364
+ */
365
+ proto.wechaty.puppet.MomentPublishResponse.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 {string} */ (reader.readString());
374
+ msg.setMomentId(value);
375
+ break;
376
+ default:
377
+ reader.skipField();
378
+ break;
379
+ }
380
+ }
381
+ return msg;
382
+ };
383
+
384
+
385
+ /**
386
+ * Serializes the message to binary data (in protobuf wire format).
387
+ * @return {!Uint8Array}
388
+ */
389
+ proto.wechaty.puppet.MomentPublishResponse.prototype.serializeBinary = function() {
390
+ var writer = new jspb.BinaryWriter();
391
+ proto.wechaty.puppet.MomentPublishResponse.serializeBinaryToWriter(this, writer);
392
+ return writer.getResultBuffer();
393
+ };
394
+
395
+
396
+ /**
397
+ * Serializes the given message to binary data (in protobuf wire
398
+ * format), writing to the given BinaryWriter.
399
+ * @param {!proto.wechaty.puppet.MomentPublishResponse} message
400
+ * @param {!jspb.BinaryWriter} writer
401
+ * @suppress {unusedLocalVariables} f is only used for nested messages
402
+ */
403
+ proto.wechaty.puppet.MomentPublishResponse.serializeBinaryToWriter = function(message, writer) {
404
+ var f = undefined;
405
+ f = message.getMomentId();
406
+ if (f.length > 0) {
407
+ writer.writeString(
408
+ 1,
409
+ f
410
+ );
411
+ }
412
+ };
413
+
414
+
415
+ /**
416
+ * optional string moment_id = 1;
417
+ * @return {string}
418
+ */
419
+ proto.wechaty.puppet.MomentPublishResponse.prototype.getMomentId = function() {
420
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
421
+ };
422
+
423
+
424
+ /**
425
+ * @param {string} value
426
+ * @return {!proto.wechaty.puppet.MomentPublishResponse} returns this
427
+ */
428
+ proto.wechaty.puppet.MomentPublishResponse.prototype.setMomentId = function(value) {
429
+ return jspb.Message.setProto3StringField(this, 1, value);
430
+ };
431
+
432
+
433
+
434
+
435
+
436
+ if (jspb.Message.GENERATE_TO_OBJECT) {
437
+ /**
438
+ * Creates an object representation of this proto.
439
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
440
+ * Optional fields that are not set will be set to undefined.
441
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
442
+ * For the list of reserved names please see:
443
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
444
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
445
+ * JSPB instance for transitional soy proto support:
446
+ * http://goto/soy-param-migration
447
+ * @return {!Object}
448
+ */
449
+ proto.wechaty.puppet.MomentSignatureRequest.prototype.toObject = function(opt_includeInstance) {
450
+ return proto.wechaty.puppet.MomentSignatureRequest.toObject(opt_includeInstance, this);
451
+ };
452
+
453
+
454
+ /**
455
+ * Static version of the {@see toObject} method.
456
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
457
+ * the JSPB instance for transitional soy proto support:
458
+ * http://goto/soy-param-migration
459
+ * @param {!proto.wechaty.puppet.MomentSignatureRequest} msg The msg instance to transform.
460
+ * @return {!Object}
461
+ * @suppress {unusedLocalVariables} f is only used for nested messages
462
+ */
463
+ proto.wechaty.puppet.MomentSignatureRequest.toObject = function(includeInstance, msg) {
464
+ var f, obj = {
465
+ text: jspb.Message.getFieldWithDefault(msg, 1, "")
466
+ };
467
+
468
+ if (includeInstance) {
469
+ obj.$jspbMessageInstance = msg;
470
+ }
471
+ return obj;
472
+ };
473
+ }
474
+
475
+
476
+ /**
477
+ * Deserializes binary data (in protobuf wire format).
478
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
479
+ * @return {!proto.wechaty.puppet.MomentSignatureRequest}
480
+ */
481
+ proto.wechaty.puppet.MomentSignatureRequest.deserializeBinary = function(bytes) {
482
+ var reader = new jspb.BinaryReader(bytes);
483
+ var msg = new proto.wechaty.puppet.MomentSignatureRequest;
484
+ return proto.wechaty.puppet.MomentSignatureRequest.deserializeBinaryFromReader(msg, reader);
485
+ };
486
+
487
+
488
+ /**
489
+ * Deserializes binary data (in protobuf wire format) from the
490
+ * given reader into the given message object.
491
+ * @param {!proto.wechaty.puppet.MomentSignatureRequest} msg The message object to deserialize into.
492
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
493
+ * @return {!proto.wechaty.puppet.MomentSignatureRequest}
494
+ */
495
+ proto.wechaty.puppet.MomentSignatureRequest.deserializeBinaryFromReader = function(msg, reader) {
496
+ while (reader.nextField()) {
497
+ if (reader.isEndGroup()) {
498
+ break;
499
+ }
500
+ var field = reader.getFieldNumber();
501
+ switch (field) {
502
+ case 1:
503
+ var value = /** @type {string} */ (reader.readString());
504
+ msg.setText(value);
505
+ break;
506
+ default:
507
+ reader.skipField();
508
+ break;
509
+ }
510
+ }
511
+ return msg;
512
+ };
513
+
514
+
515
+ /**
516
+ * Serializes the message to binary data (in protobuf wire format).
517
+ * @return {!Uint8Array}
518
+ */
519
+ proto.wechaty.puppet.MomentSignatureRequest.prototype.serializeBinary = function() {
520
+ var writer = new jspb.BinaryWriter();
521
+ proto.wechaty.puppet.MomentSignatureRequest.serializeBinaryToWriter(this, writer);
522
+ return writer.getResultBuffer();
523
+ };
524
+
525
+
526
+ /**
527
+ * Serializes the given message to binary data (in protobuf wire
528
+ * format), writing to the given BinaryWriter.
529
+ * @param {!proto.wechaty.puppet.MomentSignatureRequest} message
530
+ * @param {!jspb.BinaryWriter} writer
531
+ * @suppress {unusedLocalVariables} f is only used for nested messages
532
+ */
533
+ proto.wechaty.puppet.MomentSignatureRequest.serializeBinaryToWriter = function(message, writer) {
534
+ var f = undefined;
535
+ f = message.getText();
536
+ if (f.length > 0) {
537
+ writer.writeString(
538
+ 1,
539
+ f
540
+ );
541
+ }
542
+ };
543
+
544
+
545
+ /**
546
+ * optional string text = 1;
547
+ * @return {string}
548
+ */
549
+ proto.wechaty.puppet.MomentSignatureRequest.prototype.getText = function() {
550
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
551
+ };
552
+
553
+
554
+ /**
555
+ * @param {string} value
556
+ * @return {!proto.wechaty.puppet.MomentSignatureRequest} returns this
557
+ */
558
+ proto.wechaty.puppet.MomentSignatureRequest.prototype.setText = function(value) {
559
+ return jspb.Message.setProto3StringField(this, 1, value);
560
+ };
561
+
562
+
563
+
564
+
565
+
566
+ if (jspb.Message.GENERATE_TO_OBJECT) {
567
+ /**
568
+ * Creates an object representation of this proto.
569
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
570
+ * Optional fields that are not set will be set to undefined.
571
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
572
+ * For the list of reserved names please see:
573
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
574
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
575
+ * JSPB instance for transitional soy proto support:
576
+ * http://goto/soy-param-migration
577
+ * @return {!Object}
578
+ */
579
+ proto.wechaty.puppet.MomentSignatureResponse.prototype.toObject = function(opt_includeInstance) {
580
+ return proto.wechaty.puppet.MomentSignatureResponse.toObject(opt_includeInstance, this);
581
+ };
582
+
583
+
584
+ /**
585
+ * Static version of the {@see toObject} method.
586
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
587
+ * the JSPB instance for transitional soy proto support:
588
+ * http://goto/soy-param-migration
589
+ * @param {!proto.wechaty.puppet.MomentSignatureResponse} msg The msg instance to transform.
590
+ * @return {!Object}
591
+ * @suppress {unusedLocalVariables} f is only used for nested messages
592
+ */
593
+ proto.wechaty.puppet.MomentSignatureResponse.toObject = function(includeInstance, msg) {
594
+ var f, obj = {
595
+ text: jspb.Message.getFieldWithDefault(msg, 1, "")
596
+ };
597
+
598
+ if (includeInstance) {
599
+ obj.$jspbMessageInstance = msg;
600
+ }
601
+ return obj;
602
+ };
603
+ }
604
+
605
+
606
+ /**
607
+ * Deserializes binary data (in protobuf wire format).
608
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
609
+ * @return {!proto.wechaty.puppet.MomentSignatureResponse}
610
+ */
611
+ proto.wechaty.puppet.MomentSignatureResponse.deserializeBinary = function(bytes) {
612
+ var reader = new jspb.BinaryReader(bytes);
613
+ var msg = new proto.wechaty.puppet.MomentSignatureResponse;
614
+ return proto.wechaty.puppet.MomentSignatureResponse.deserializeBinaryFromReader(msg, reader);
615
+ };
616
+
617
+
618
+ /**
619
+ * Deserializes binary data (in protobuf wire format) from the
620
+ * given reader into the given message object.
621
+ * @param {!proto.wechaty.puppet.MomentSignatureResponse} msg The message object to deserialize into.
622
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
623
+ * @return {!proto.wechaty.puppet.MomentSignatureResponse}
624
+ */
625
+ proto.wechaty.puppet.MomentSignatureResponse.deserializeBinaryFromReader = function(msg, reader) {
626
+ while (reader.nextField()) {
627
+ if (reader.isEndGroup()) {
628
+ break;
629
+ }
630
+ var field = reader.getFieldNumber();
631
+ switch (field) {
632
+ case 1:
633
+ var value = /** @type {string} */ (reader.readString());
634
+ msg.setText(value);
635
+ break;
636
+ default:
637
+ reader.skipField();
638
+ break;
639
+ }
640
+ }
641
+ return msg;
642
+ };
643
+
644
+
645
+ /**
646
+ * Serializes the message to binary data (in protobuf wire format).
647
+ * @return {!Uint8Array}
648
+ */
649
+ proto.wechaty.puppet.MomentSignatureResponse.prototype.serializeBinary = function() {
650
+ var writer = new jspb.BinaryWriter();
651
+ proto.wechaty.puppet.MomentSignatureResponse.serializeBinaryToWriter(this, writer);
652
+ return writer.getResultBuffer();
653
+ };
654
+
655
+
656
+ /**
657
+ * Serializes the given message to binary data (in protobuf wire
658
+ * format), writing to the given BinaryWriter.
659
+ * @param {!proto.wechaty.puppet.MomentSignatureResponse} message
660
+ * @param {!jspb.BinaryWriter} writer
661
+ * @suppress {unusedLocalVariables} f is only used for nested messages
662
+ */
663
+ proto.wechaty.puppet.MomentSignatureResponse.serializeBinaryToWriter = function(message, writer) {
664
+ var f = undefined;
665
+ f = message.getText();
666
+ if (f.length > 0) {
667
+ writer.writeString(
668
+ 1,
669
+ f
670
+ );
671
+ }
672
+ };
673
+
674
+
675
+ /**
676
+ * optional string text = 1;
677
+ * @return {string}
678
+ */
679
+ proto.wechaty.puppet.MomentSignatureResponse.prototype.getText = function() {
680
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
681
+ };
682
+
683
+
684
+ /**
685
+ * @param {string} value
686
+ * @return {!proto.wechaty.puppet.MomentSignatureResponse} returns this
687
+ */
688
+ proto.wechaty.puppet.MomentSignatureResponse.prototype.setText = function(value) {
689
+ return jspb.Message.setProto3StringField(this, 1, value);
690
+ };
691
+
692
+
693
+
694
+
695
+
696
+ if (jspb.Message.GENERATE_TO_OBJECT) {
697
+ /**
698
+ * Creates an object representation of this proto.
699
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
700
+ * Optional fields that are not set will be set to undefined.
701
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
702
+ * For the list of reserved names please see:
703
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
704
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
705
+ * JSPB instance for transitional soy proto support:
706
+ * http://goto/soy-param-migration
707
+ * @return {!Object}
708
+ */
709
+ proto.wechaty.puppet.MomentCoverageRequest.prototype.toObject = function(opt_includeInstance) {
710
+ return proto.wechaty.puppet.MomentCoverageRequest.toObject(opt_includeInstance, this);
711
+ };
712
+
713
+
714
+ /**
715
+ * Static version of the {@see toObject} method.
716
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
717
+ * the JSPB instance for transitional soy proto support:
718
+ * http://goto/soy-param-migration
719
+ * @param {!proto.wechaty.puppet.MomentCoverageRequest} msg The msg instance to transform.
720
+ * @return {!Object}
721
+ * @suppress {unusedLocalVariables} f is only used for nested messages
722
+ */
723
+ proto.wechaty.puppet.MomentCoverageRequest.toObject = function(includeInstance, msg) {
724
+ var f, obj = {
725
+ fileBox: jspb.Message.getFieldWithDefault(msg, 1, "")
726
+ };
727
+
728
+ if (includeInstance) {
729
+ obj.$jspbMessageInstance = msg;
730
+ }
731
+ return obj;
732
+ };
733
+ }
734
+
735
+
736
+ /**
737
+ * Deserializes binary data (in protobuf wire format).
738
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
739
+ * @return {!proto.wechaty.puppet.MomentCoverageRequest}
740
+ */
741
+ proto.wechaty.puppet.MomentCoverageRequest.deserializeBinary = function(bytes) {
742
+ var reader = new jspb.BinaryReader(bytes);
743
+ var msg = new proto.wechaty.puppet.MomentCoverageRequest;
744
+ return proto.wechaty.puppet.MomentCoverageRequest.deserializeBinaryFromReader(msg, reader);
745
+ };
746
+
747
+
748
+ /**
749
+ * Deserializes binary data (in protobuf wire format) from the
750
+ * given reader into the given message object.
751
+ * @param {!proto.wechaty.puppet.MomentCoverageRequest} msg The message object to deserialize into.
752
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
753
+ * @return {!proto.wechaty.puppet.MomentCoverageRequest}
754
+ */
755
+ proto.wechaty.puppet.MomentCoverageRequest.deserializeBinaryFromReader = function(msg, reader) {
756
+ while (reader.nextField()) {
757
+ if (reader.isEndGroup()) {
758
+ break;
759
+ }
760
+ var field = reader.getFieldNumber();
761
+ switch (field) {
762
+ case 1:
763
+ var value = /** @type {string} */ (reader.readString());
764
+ msg.setFileBox(value);
765
+ break;
766
+ default:
767
+ reader.skipField();
768
+ break;
769
+ }
770
+ }
771
+ return msg;
772
+ };
773
+
774
+
775
+ /**
776
+ * Serializes the message to binary data (in protobuf wire format).
777
+ * @return {!Uint8Array}
778
+ */
779
+ proto.wechaty.puppet.MomentCoverageRequest.prototype.serializeBinary = function() {
780
+ var writer = new jspb.BinaryWriter();
781
+ proto.wechaty.puppet.MomentCoverageRequest.serializeBinaryToWriter(this, writer);
782
+ return writer.getResultBuffer();
783
+ };
784
+
785
+
786
+ /**
787
+ * Serializes the given message to binary data (in protobuf wire
788
+ * format), writing to the given BinaryWriter.
789
+ * @param {!proto.wechaty.puppet.MomentCoverageRequest} message
790
+ * @param {!jspb.BinaryWriter} writer
791
+ * @suppress {unusedLocalVariables} f is only used for nested messages
792
+ */
793
+ proto.wechaty.puppet.MomentCoverageRequest.serializeBinaryToWriter = function(message, writer) {
794
+ var f = undefined;
795
+ f = message.getFileBox();
796
+ if (f.length > 0) {
797
+ writer.writeString(
798
+ 1,
799
+ f
800
+ );
801
+ }
802
+ };
803
+
804
+
805
+ /**
806
+ * optional string file_box = 1;
807
+ * @return {string}
808
+ */
809
+ proto.wechaty.puppet.MomentCoverageRequest.prototype.getFileBox = function() {
810
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
811
+ };
812
+
813
+
814
+ /**
815
+ * @param {string} value
816
+ * @return {!proto.wechaty.puppet.MomentCoverageRequest} returns this
817
+ */
818
+ proto.wechaty.puppet.MomentCoverageRequest.prototype.setFileBox = function(value) {
819
+ return jspb.Message.setProto3StringField(this, 1, value);
820
+ };
821
+
822
+
823
+
824
+
825
+
826
+ if (jspb.Message.GENERATE_TO_OBJECT) {
827
+ /**
828
+ * Creates an object representation of this proto.
829
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
830
+ * Optional fields that are not set will be set to undefined.
831
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
832
+ * For the list of reserved names please see:
833
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
834
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
835
+ * JSPB instance for transitional soy proto support:
836
+ * http://goto/soy-param-migration
837
+ * @return {!Object}
838
+ */
839
+ proto.wechaty.puppet.MomentCoverageResponse.prototype.toObject = function(opt_includeInstance) {
840
+ return proto.wechaty.puppet.MomentCoverageResponse.toObject(opt_includeInstance, this);
841
+ };
842
+
843
+
844
+ /**
845
+ * Static version of the {@see toObject} method.
846
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
847
+ * the JSPB instance for transitional soy proto support:
848
+ * http://goto/soy-param-migration
849
+ * @param {!proto.wechaty.puppet.MomentCoverageResponse} msg The msg instance to transform.
850
+ * @return {!Object}
851
+ * @suppress {unusedLocalVariables} f is only used for nested messages
852
+ */
853
+ proto.wechaty.puppet.MomentCoverageResponse.toObject = function(includeInstance, msg) {
854
+ var f, obj = {
855
+ fileBox: jspb.Message.getFieldWithDefault(msg, 1, "")
856
+ };
857
+
858
+ if (includeInstance) {
859
+ obj.$jspbMessageInstance = msg;
860
+ }
861
+ return obj;
862
+ };
863
+ }
864
+
865
+
866
+ /**
867
+ * Deserializes binary data (in protobuf wire format).
868
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
869
+ * @return {!proto.wechaty.puppet.MomentCoverageResponse}
870
+ */
871
+ proto.wechaty.puppet.MomentCoverageResponse.deserializeBinary = function(bytes) {
872
+ var reader = new jspb.BinaryReader(bytes);
873
+ var msg = new proto.wechaty.puppet.MomentCoverageResponse;
874
+ return proto.wechaty.puppet.MomentCoverageResponse.deserializeBinaryFromReader(msg, reader);
875
+ };
876
+
877
+
878
+ /**
879
+ * Deserializes binary data (in protobuf wire format) from the
880
+ * given reader into the given message object.
881
+ * @param {!proto.wechaty.puppet.MomentCoverageResponse} msg The message object to deserialize into.
882
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
883
+ * @return {!proto.wechaty.puppet.MomentCoverageResponse}
884
+ */
885
+ proto.wechaty.puppet.MomentCoverageResponse.deserializeBinaryFromReader = function(msg, reader) {
886
+ while (reader.nextField()) {
887
+ if (reader.isEndGroup()) {
888
+ break;
889
+ }
890
+ var field = reader.getFieldNumber();
891
+ switch (field) {
892
+ case 1:
893
+ var value = /** @type {string} */ (reader.readString());
894
+ msg.setFileBox(value);
895
+ break;
896
+ default:
897
+ reader.skipField();
898
+ break;
899
+ }
900
+ }
901
+ return msg;
902
+ };
903
+
904
+
905
+ /**
906
+ * Serializes the message to binary data (in protobuf wire format).
907
+ * @return {!Uint8Array}
908
+ */
909
+ proto.wechaty.puppet.MomentCoverageResponse.prototype.serializeBinary = function() {
910
+ var writer = new jspb.BinaryWriter();
911
+ proto.wechaty.puppet.MomentCoverageResponse.serializeBinaryToWriter(this, writer);
912
+ return writer.getResultBuffer();
913
+ };
914
+
915
+
916
+ /**
917
+ * Serializes the given message to binary data (in protobuf wire
918
+ * format), writing to the given BinaryWriter.
919
+ * @param {!proto.wechaty.puppet.MomentCoverageResponse} message
920
+ * @param {!jspb.BinaryWriter} writer
921
+ * @suppress {unusedLocalVariables} f is only used for nested messages
922
+ */
923
+ proto.wechaty.puppet.MomentCoverageResponse.serializeBinaryToWriter = function(message, writer) {
924
+ var f = undefined;
925
+ f = message.getFileBox();
926
+ if (f.length > 0) {
927
+ writer.writeString(
928
+ 1,
929
+ f
930
+ );
931
+ }
932
+ };
933
+
934
+
935
+ /**
936
+ * optional string file_box = 1;
937
+ * @return {string}
938
+ */
939
+ proto.wechaty.puppet.MomentCoverageResponse.prototype.getFileBox = function() {
940
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
941
+ };
942
+
943
+
944
+ /**
945
+ * @param {string} value
946
+ * @return {!proto.wechaty.puppet.MomentCoverageResponse} returns this
947
+ */
948
+ proto.wechaty.puppet.MomentCoverageResponse.prototype.setFileBox = function(value) {
949
+ return jspb.Message.setProto3StringField(this, 1, value);
950
+ };
951
+
952
+
953
+ goog.object.extend(exports, proto.wechaty.puppet);