@juzi/wechaty-grpc 1.0.42 → 1.0.43

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 (57) hide show
  1. package/dist/cjs/commonjs/generated/puppet.cjs +0 -2
  2. package/dist/cjs/commonjs/generated/puppet.cjs.d.ts +0 -2
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +1 -142
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +1 -194
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +0 -50
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +0 -102
  7. package/dist/cjs/out/wechaty/puppet_pb.d.ts +0 -1
  8. package/dist/cjs/out/wechaty/puppet_pb.js +0 -2
  9. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +0 -34
  10. package/dist/cjs/out/wechaty/puppet_pb_service.js +0 -147
  11. package/dist/cjs/proto/wechaty/puppet.proto +0 -9
  12. package/dist/cjs/src/package-json.js +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  14. package/dist/cjs/tests/puppet-server-impl.js +0 -13
  15. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  16. package/dist/esm/commonjs/generated/puppet.cjs +0 -2
  17. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +0 -2
  18. package/dist/esm/out/wechaty/puppet.openapi.yaml +1 -142
  19. package/dist/esm/out/wechaty/puppet.swagger.json +1 -194
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +0 -50
  21. package/dist/esm/out/wechaty/puppet_grpc_pb.js +0 -102
  22. package/dist/esm/out/wechaty/puppet_pb.d.ts +0 -1
  23. package/dist/esm/out/wechaty/puppet_pb.js +0 -2
  24. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +0 -34
  25. package/dist/esm/out/wechaty/puppet_pb_service.js +0 -147
  26. package/dist/esm/proto/wechaty/puppet.proto +0 -9
  27. package/dist/esm/src/package-json.js +1 -1
  28. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  29. package/dist/esm/tests/puppet-server-impl.js +0 -13
  30. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  31. package/out/wechaty/puppet.openapi.yaml +1 -142
  32. package/out/wechaty/puppet.swagger.json +1 -194
  33. package/out/wechaty/puppet_grpc_pb.d.ts +0 -50
  34. package/out/wechaty/puppet_grpc_pb.js +0 -102
  35. package/out/wechaty/puppet_pb.d.ts +0 -1
  36. package/out/wechaty/puppet_pb.js +0 -2
  37. package/out/wechaty/puppet_pb_service.d.ts +0 -34
  38. package/out/wechaty/puppet_pb_service.js +0 -147
  39. package/package.json +1 -1
  40. package/src/package-json.ts +1 -1
  41. package/dist/cjs/out/wechaty/deprecated/file-box_grpc_pb.js +0 -1
  42. package/dist/cjs/out/wechaty/deprecated/file-box_pb.d.ts +0 -179
  43. package/dist/cjs/out/wechaty/deprecated/file-box_pb.js +0 -1368
  44. package/dist/cjs/out/wechaty/deprecated/file-box_pb_service.d.ts +0 -3
  45. package/dist/cjs/out/wechaty/deprecated/file-box_pb_service.js +0 -3
  46. package/dist/cjs/proto/wechaty/deprecated/file-box.proto +0 -61
  47. package/dist/esm/out/wechaty/deprecated/file-box_grpc_pb.js +0 -1
  48. package/dist/esm/out/wechaty/deprecated/file-box_pb.d.ts +0 -179
  49. package/dist/esm/out/wechaty/deprecated/file-box_pb.js +0 -1368
  50. package/dist/esm/out/wechaty/deprecated/file-box_pb_service.d.ts +0 -3
  51. package/dist/esm/out/wechaty/deprecated/file-box_pb_service.js +0 -3
  52. package/dist/esm/proto/wechaty/deprecated/file-box.proto +0 -61
  53. package/out/wechaty/deprecated/file-box_grpc_pb.js +0 -1
  54. package/out/wechaty/deprecated/file-box_pb.d.ts +0 -179
  55. package/out/wechaty/deprecated/file-box_pb.js +0 -1368
  56. package/out/wechaty/deprecated/file-box_pb_service.d.ts +0 -3
  57. package/out/wechaty/deprecated/file-box_pb_service.js +0 -3
@@ -1,1368 +0,0 @@
1
- // source: wechaty/deprecated/file-box.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_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
- goog.object.extend(proto, google_protobuf_wrappers_pb);
20
- var wechaty_puppet_image_pb = require('../../wechaty/puppet/image_pb.js');
21
- goog.object.extend(proto, wechaty_puppet_image_pb);
22
- goog.exportSymbol('proto.wechaty.puppet.FileBoxChunk', null, global);
23
- goog.exportSymbol('proto.wechaty.puppet.MessageFileStreamRequest', null, global);
24
- goog.exportSymbol('proto.wechaty.puppet.MessageFileStreamResponse', null, global);
25
- goog.exportSymbol('proto.wechaty.puppet.MessageImageStreamRequest', null, global);
26
- goog.exportSymbol('proto.wechaty.puppet.MessageImageStreamResponse', null, global);
27
- goog.exportSymbol('proto.wechaty.puppet.MessageSendFileStreamRequest', null, global);
28
- goog.exportSymbol('proto.wechaty.puppet.MessageSendFileStreamResponse', null, global);
29
- /**
30
- * Generated by JsPbCodeGenerator.
31
- * @param {Array=} opt_data Optional initial data array, typically from a
32
- * server response, or constructed directly in Javascript. The array is used
33
- * in place and becomes part of the constructed object. It is not cloned.
34
- * If no data is provided, the constructed object will be empty, but still
35
- * valid.
36
- * @extends {jspb.Message}
37
- * @constructor
38
- */
39
- proto.wechaty.puppet.FileBoxChunk = function(opt_data) {
40
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
41
- };
42
- goog.inherits(proto.wechaty.puppet.FileBoxChunk, jspb.Message);
43
- if (goog.DEBUG && !COMPILED) {
44
- /**
45
- * @public
46
- * @override
47
- */
48
- proto.wechaty.puppet.FileBoxChunk.displayName = 'proto.wechaty.puppet.FileBoxChunk';
49
- }
50
- /**
51
- * Generated by JsPbCodeGenerator.
52
- * @param {Array=} opt_data Optional initial data array, typically from a
53
- * server response, or constructed directly in Javascript. The array is used
54
- * in place and becomes part of the constructed object. It is not cloned.
55
- * If no data is provided, the constructed object will be empty, but still
56
- * valid.
57
- * @extends {jspb.Message}
58
- * @constructor
59
- */
60
- proto.wechaty.puppet.MessageImageStreamRequest = function(opt_data) {
61
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
62
- };
63
- goog.inherits(proto.wechaty.puppet.MessageImageStreamRequest, jspb.Message);
64
- if (goog.DEBUG && !COMPILED) {
65
- /**
66
- * @public
67
- * @override
68
- */
69
- proto.wechaty.puppet.MessageImageStreamRequest.displayName = 'proto.wechaty.puppet.MessageImageStreamRequest';
70
- }
71
- /**
72
- * Generated by JsPbCodeGenerator.
73
- * @param {Array=} opt_data Optional initial data array, typically from a
74
- * server response, or constructed directly in Javascript. The array is used
75
- * in place and becomes part of the constructed object. It is not cloned.
76
- * If no data is provided, the constructed object will be empty, but still
77
- * valid.
78
- * @extends {jspb.Message}
79
- * @constructor
80
- */
81
- proto.wechaty.puppet.MessageImageStreamResponse = function(opt_data) {
82
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
83
- };
84
- goog.inherits(proto.wechaty.puppet.MessageImageStreamResponse, jspb.Message);
85
- if (goog.DEBUG && !COMPILED) {
86
- /**
87
- * @public
88
- * @override
89
- */
90
- proto.wechaty.puppet.MessageImageStreamResponse.displayName = 'proto.wechaty.puppet.MessageImageStreamResponse';
91
- }
92
- /**
93
- * Generated by JsPbCodeGenerator.
94
- * @param {Array=} opt_data Optional initial data array, typically from a
95
- * server response, or constructed directly in Javascript. The array is used
96
- * in place and becomes part of the constructed object. It is not cloned.
97
- * If no data is provided, the constructed object will be empty, but still
98
- * valid.
99
- * @extends {jspb.Message}
100
- * @constructor
101
- */
102
- proto.wechaty.puppet.MessageFileStreamRequest = function(opt_data) {
103
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
104
- };
105
- goog.inherits(proto.wechaty.puppet.MessageFileStreamRequest, jspb.Message);
106
- if (goog.DEBUG && !COMPILED) {
107
- /**
108
- * @public
109
- * @override
110
- */
111
- proto.wechaty.puppet.MessageFileStreamRequest.displayName = 'proto.wechaty.puppet.MessageFileStreamRequest';
112
- }
113
- /**
114
- * Generated by JsPbCodeGenerator.
115
- * @param {Array=} opt_data Optional initial data array, typically from a
116
- * server response, or constructed directly in Javascript. The array is used
117
- * in place and becomes part of the constructed object. It is not cloned.
118
- * If no data is provided, the constructed object will be empty, but still
119
- * valid.
120
- * @extends {jspb.Message}
121
- * @constructor
122
- */
123
- proto.wechaty.puppet.MessageFileStreamResponse = function(opt_data) {
124
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
125
- };
126
- goog.inherits(proto.wechaty.puppet.MessageFileStreamResponse, jspb.Message);
127
- if (goog.DEBUG && !COMPILED) {
128
- /**
129
- * @public
130
- * @override
131
- */
132
- proto.wechaty.puppet.MessageFileStreamResponse.displayName = 'proto.wechaty.puppet.MessageFileStreamResponse';
133
- }
134
- /**
135
- * Generated by JsPbCodeGenerator.
136
- * @param {Array=} opt_data Optional initial data array, typically from a
137
- * server response, or constructed directly in Javascript. The array is used
138
- * in place and becomes part of the constructed object. It is not cloned.
139
- * If no data is provided, the constructed object will be empty, but still
140
- * valid.
141
- * @extends {jspb.Message}
142
- * @constructor
143
- */
144
- proto.wechaty.puppet.MessageSendFileStreamRequest = function(opt_data) {
145
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
146
- };
147
- goog.inherits(proto.wechaty.puppet.MessageSendFileStreamRequest, jspb.Message);
148
- if (goog.DEBUG && !COMPILED) {
149
- /**
150
- * @public
151
- * @override
152
- */
153
- proto.wechaty.puppet.MessageSendFileStreamRequest.displayName = 'proto.wechaty.puppet.MessageSendFileStreamRequest';
154
- }
155
- /**
156
- * Generated by JsPbCodeGenerator.
157
- * @param {Array=} opt_data Optional initial data array, typically from a
158
- * server response, or constructed directly in Javascript. The array is used
159
- * in place and becomes part of the constructed object. It is not cloned.
160
- * If no data is provided, the constructed object will be empty, but still
161
- * valid.
162
- * @extends {jspb.Message}
163
- * @constructor
164
- */
165
- proto.wechaty.puppet.MessageSendFileStreamResponse = function(opt_data) {
166
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
167
- };
168
- goog.inherits(proto.wechaty.puppet.MessageSendFileStreamResponse, jspb.Message);
169
- if (goog.DEBUG && !COMPILED) {
170
- /**
171
- * @public
172
- * @override
173
- */
174
- proto.wechaty.puppet.MessageSendFileStreamResponse.displayName = 'proto.wechaty.puppet.MessageSendFileStreamResponse';
175
- }
176
-
177
-
178
-
179
- if (jspb.Message.GENERATE_TO_OBJECT) {
180
- /**
181
- * Creates an object representation of this proto.
182
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
183
- * Optional fields that are not set will be set to undefined.
184
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
185
- * For the list of reserved names please see:
186
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
187
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
188
- * JSPB instance for transitional soy proto support:
189
- * http://goto/soy-param-migration
190
- * @return {!Object}
191
- */
192
- proto.wechaty.puppet.FileBoxChunk.prototype.toObject = function(opt_includeInstance) {
193
- return proto.wechaty.puppet.FileBoxChunk.toObject(opt_includeInstance, this);
194
- };
195
-
196
-
197
- /**
198
- * Static version of the {@see toObject} method.
199
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
200
- * the JSPB instance for transitional soy proto support:
201
- * http://goto/soy-param-migration
202
- * @param {!proto.wechaty.puppet.FileBoxChunk} msg The msg instance to transform.
203
- * @return {!Object}
204
- * @suppress {unusedLocalVariables} f is only used for nested messages
205
- */
206
- proto.wechaty.puppet.FileBoxChunk.toObject = function(includeInstance, msg) {
207
- var f, obj = {
208
- data: msg.getData_asB64(),
209
- name: jspb.Message.getFieldWithDefault(msg, 2, "")
210
- };
211
-
212
- if (includeInstance) {
213
- obj.$jspbMessageInstance = msg;
214
- }
215
- return obj;
216
- };
217
- }
218
-
219
-
220
- /**
221
- * Deserializes binary data (in protobuf wire format).
222
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
223
- * @return {!proto.wechaty.puppet.FileBoxChunk}
224
- */
225
- proto.wechaty.puppet.FileBoxChunk.deserializeBinary = function(bytes) {
226
- var reader = new jspb.BinaryReader(bytes);
227
- var msg = new proto.wechaty.puppet.FileBoxChunk;
228
- return proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader(msg, reader);
229
- };
230
-
231
-
232
- /**
233
- * Deserializes binary data (in protobuf wire format) from the
234
- * given reader into the given message object.
235
- * @param {!proto.wechaty.puppet.FileBoxChunk} msg The message object to deserialize into.
236
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
237
- * @return {!proto.wechaty.puppet.FileBoxChunk}
238
- */
239
- proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader = function(msg, reader) {
240
- while (reader.nextField()) {
241
- if (reader.isEndGroup()) {
242
- break;
243
- }
244
- var field = reader.getFieldNumber();
245
- switch (field) {
246
- case 1:
247
- var value = /** @type {!Uint8Array} */ (reader.readBytes());
248
- msg.setData(value);
249
- break;
250
- case 2:
251
- var value = /** @type {string} */ (reader.readString());
252
- msg.setName(value);
253
- break;
254
- default:
255
- reader.skipField();
256
- break;
257
- }
258
- }
259
- return msg;
260
- };
261
-
262
-
263
- /**
264
- * Serializes the message to binary data (in protobuf wire format).
265
- * @return {!Uint8Array}
266
- */
267
- proto.wechaty.puppet.FileBoxChunk.prototype.serializeBinary = function() {
268
- var writer = new jspb.BinaryWriter();
269
- proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter(this, writer);
270
- return writer.getResultBuffer();
271
- };
272
-
273
-
274
- /**
275
- * Serializes the given message to binary data (in protobuf wire
276
- * format), writing to the given BinaryWriter.
277
- * @param {!proto.wechaty.puppet.FileBoxChunk} message
278
- * @param {!jspb.BinaryWriter} writer
279
- * @suppress {unusedLocalVariables} f is only used for nested messages
280
- */
281
- proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter = function(message, writer) {
282
- var f = undefined;
283
- f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1));
284
- if (f != null) {
285
- writer.writeBytes(
286
- 1,
287
- f
288
- );
289
- }
290
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
291
- if (f != null) {
292
- writer.writeString(
293
- 2,
294
- f
295
- );
296
- }
297
- };
298
-
299
-
300
- /**
301
- * optional bytes data = 1;
302
- * @return {!(string|Uint8Array)}
303
- */
304
- proto.wechaty.puppet.FileBoxChunk.prototype.getData = function() {
305
- return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
306
- };
307
-
308
-
309
- /**
310
- * optional bytes data = 1;
311
- * This is a type-conversion wrapper around `getData()`
312
- * @return {string}
313
- */
314
- proto.wechaty.puppet.FileBoxChunk.prototype.getData_asB64 = function() {
315
- return /** @type {string} */ (jspb.Message.bytesAsB64(
316
- this.getData()));
317
- };
318
-
319
-
320
- /**
321
- * optional bytes data = 1;
322
- * Note that Uint8Array is not supported on all browsers.
323
- * @see http://caniuse.com/Uint8Array
324
- * This is a type-conversion wrapper around `getData()`
325
- * @return {!Uint8Array}
326
- */
327
- proto.wechaty.puppet.FileBoxChunk.prototype.getData_asU8 = function() {
328
- return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
329
- this.getData()));
330
- };
331
-
332
-
333
- /**
334
- * @param {!(string|Uint8Array)} value
335
- * @return {!proto.wechaty.puppet.FileBoxChunk} returns this
336
- */
337
- proto.wechaty.puppet.FileBoxChunk.prototype.setData = function(value) {
338
- return jspb.Message.setField(this, 1, value);
339
- };
340
-
341
-
342
- /**
343
- * Clears the field making it undefined.
344
- * @return {!proto.wechaty.puppet.FileBoxChunk} returns this
345
- */
346
- proto.wechaty.puppet.FileBoxChunk.prototype.clearData = function() {
347
- return jspb.Message.setField(this, 1, undefined);
348
- };
349
-
350
-
351
- /**
352
- * Returns whether this field is set.
353
- * @return {boolean}
354
- */
355
- proto.wechaty.puppet.FileBoxChunk.prototype.hasData = function() {
356
- return jspb.Message.getField(this, 1) != null;
357
- };
358
-
359
-
360
- /**
361
- * optional string name = 2;
362
- * @return {string}
363
- */
364
- proto.wechaty.puppet.FileBoxChunk.prototype.getName = function() {
365
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
366
- };
367
-
368
-
369
- /**
370
- * @param {string} value
371
- * @return {!proto.wechaty.puppet.FileBoxChunk} returns this
372
- */
373
- proto.wechaty.puppet.FileBoxChunk.prototype.setName = function(value) {
374
- return jspb.Message.setField(this, 2, value);
375
- };
376
-
377
-
378
- /**
379
- * Clears the field making it undefined.
380
- * @return {!proto.wechaty.puppet.FileBoxChunk} returns this
381
- */
382
- proto.wechaty.puppet.FileBoxChunk.prototype.clearName = function() {
383
- return jspb.Message.setField(this, 2, undefined);
384
- };
385
-
386
-
387
- /**
388
- * Returns whether this field is set.
389
- * @return {boolean}
390
- */
391
- proto.wechaty.puppet.FileBoxChunk.prototype.hasName = function() {
392
- return jspb.Message.getField(this, 2) != null;
393
- };
394
-
395
-
396
-
397
-
398
-
399
- if (jspb.Message.GENERATE_TO_OBJECT) {
400
- /**
401
- * Creates an object representation of this proto.
402
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
403
- * Optional fields that are not set will be set to undefined.
404
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
405
- * For the list of reserved names please see:
406
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
407
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
408
- * JSPB instance for transitional soy proto support:
409
- * http://goto/soy-param-migration
410
- * @return {!Object}
411
- */
412
- proto.wechaty.puppet.MessageImageStreamRequest.prototype.toObject = function(opt_includeInstance) {
413
- return proto.wechaty.puppet.MessageImageStreamRequest.toObject(opt_includeInstance, this);
414
- };
415
-
416
-
417
- /**
418
- * Static version of the {@see toObject} method.
419
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
420
- * the JSPB instance for transitional soy proto support:
421
- * http://goto/soy-param-migration
422
- * @param {!proto.wechaty.puppet.MessageImageStreamRequest} msg The msg instance to transform.
423
- * @return {!Object}
424
- * @suppress {unusedLocalVariables} f is only used for nested messages
425
- */
426
- proto.wechaty.puppet.MessageImageStreamRequest.toObject = function(includeInstance, msg) {
427
- var f, obj = {
428
- id: jspb.Message.getFieldWithDefault(msg, 1, ""),
429
- type: jspb.Message.getFieldWithDefault(msg, 2, 0)
430
- };
431
-
432
- if (includeInstance) {
433
- obj.$jspbMessageInstance = msg;
434
- }
435
- return obj;
436
- };
437
- }
438
-
439
-
440
- /**
441
- * Deserializes binary data (in protobuf wire format).
442
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
443
- * @return {!proto.wechaty.puppet.MessageImageStreamRequest}
444
- */
445
- proto.wechaty.puppet.MessageImageStreamRequest.deserializeBinary = function(bytes) {
446
- var reader = new jspb.BinaryReader(bytes);
447
- var msg = new proto.wechaty.puppet.MessageImageStreamRequest;
448
- return proto.wechaty.puppet.MessageImageStreamRequest.deserializeBinaryFromReader(msg, reader);
449
- };
450
-
451
-
452
- /**
453
- * Deserializes binary data (in protobuf wire format) from the
454
- * given reader into the given message object.
455
- * @param {!proto.wechaty.puppet.MessageImageStreamRequest} msg The message object to deserialize into.
456
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
457
- * @return {!proto.wechaty.puppet.MessageImageStreamRequest}
458
- */
459
- proto.wechaty.puppet.MessageImageStreamRequest.deserializeBinaryFromReader = function(msg, reader) {
460
- while (reader.nextField()) {
461
- if (reader.isEndGroup()) {
462
- break;
463
- }
464
- var field = reader.getFieldNumber();
465
- switch (field) {
466
- case 1:
467
- var value = /** @type {string} */ (reader.readString());
468
- msg.setId(value);
469
- break;
470
- case 2:
471
- var value = /** @type {!proto.wechaty.puppet.ImageType} */ (reader.readEnum());
472
- msg.setType(value);
473
- break;
474
- default:
475
- reader.skipField();
476
- break;
477
- }
478
- }
479
- return msg;
480
- };
481
-
482
-
483
- /**
484
- * Serializes the message to binary data (in protobuf wire format).
485
- * @return {!Uint8Array}
486
- */
487
- proto.wechaty.puppet.MessageImageStreamRequest.prototype.serializeBinary = function() {
488
- var writer = new jspb.BinaryWriter();
489
- proto.wechaty.puppet.MessageImageStreamRequest.serializeBinaryToWriter(this, writer);
490
- return writer.getResultBuffer();
491
- };
492
-
493
-
494
- /**
495
- * Serializes the given message to binary data (in protobuf wire
496
- * format), writing to the given BinaryWriter.
497
- * @param {!proto.wechaty.puppet.MessageImageStreamRequest} message
498
- * @param {!jspb.BinaryWriter} writer
499
- * @suppress {unusedLocalVariables} f is only used for nested messages
500
- */
501
- proto.wechaty.puppet.MessageImageStreamRequest.serializeBinaryToWriter = function(message, writer) {
502
- var f = undefined;
503
- f = message.getId();
504
- if (f.length > 0) {
505
- writer.writeString(
506
- 1,
507
- f
508
- );
509
- }
510
- f = message.getType();
511
- if (f !== 0.0) {
512
- writer.writeEnum(
513
- 2,
514
- f
515
- );
516
- }
517
- };
518
-
519
-
520
- /**
521
- * optional string id = 1;
522
- * @return {string}
523
- */
524
- proto.wechaty.puppet.MessageImageStreamRequest.prototype.getId = function() {
525
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
526
- };
527
-
528
-
529
- /**
530
- * @param {string} value
531
- * @return {!proto.wechaty.puppet.MessageImageStreamRequest} returns this
532
- */
533
- proto.wechaty.puppet.MessageImageStreamRequest.prototype.setId = function(value) {
534
- return jspb.Message.setProto3StringField(this, 1, value);
535
- };
536
-
537
-
538
- /**
539
- * optional ImageType type = 2;
540
- * @return {!proto.wechaty.puppet.ImageType}
541
- */
542
- proto.wechaty.puppet.MessageImageStreamRequest.prototype.getType = function() {
543
- return /** @type {!proto.wechaty.puppet.ImageType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
544
- };
545
-
546
-
547
- /**
548
- * @param {!proto.wechaty.puppet.ImageType} value
549
- * @return {!proto.wechaty.puppet.MessageImageStreamRequest} returns this
550
- */
551
- proto.wechaty.puppet.MessageImageStreamRequest.prototype.setType = function(value) {
552
- return jspb.Message.setProto3EnumField(this, 2, value);
553
- };
554
-
555
-
556
-
557
-
558
-
559
- if (jspb.Message.GENERATE_TO_OBJECT) {
560
- /**
561
- * Creates an object representation of this proto.
562
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
563
- * Optional fields that are not set will be set to undefined.
564
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
565
- * For the list of reserved names please see:
566
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
567
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
568
- * JSPB instance for transitional soy proto support:
569
- * http://goto/soy-param-migration
570
- * @return {!Object}
571
- */
572
- proto.wechaty.puppet.MessageImageStreamResponse.prototype.toObject = function(opt_includeInstance) {
573
- return proto.wechaty.puppet.MessageImageStreamResponse.toObject(opt_includeInstance, this);
574
- };
575
-
576
-
577
- /**
578
- * Static version of the {@see toObject} method.
579
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
580
- * the JSPB instance for transitional soy proto support:
581
- * http://goto/soy-param-migration
582
- * @param {!proto.wechaty.puppet.MessageImageStreamResponse} msg The msg instance to transform.
583
- * @return {!Object}
584
- * @suppress {unusedLocalVariables} f is only used for nested messages
585
- */
586
- proto.wechaty.puppet.MessageImageStreamResponse.toObject = function(includeInstance, msg) {
587
- var f, obj = {
588
- fileBoxChunk: (f = msg.getFileBoxChunk()) && proto.wechaty.puppet.FileBoxChunk.toObject(includeInstance, f)
589
- };
590
-
591
- if (includeInstance) {
592
- obj.$jspbMessageInstance = msg;
593
- }
594
- return obj;
595
- };
596
- }
597
-
598
-
599
- /**
600
- * Deserializes binary data (in protobuf wire format).
601
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
602
- * @return {!proto.wechaty.puppet.MessageImageStreamResponse}
603
- */
604
- proto.wechaty.puppet.MessageImageStreamResponse.deserializeBinary = function(bytes) {
605
- var reader = new jspb.BinaryReader(bytes);
606
- var msg = new proto.wechaty.puppet.MessageImageStreamResponse;
607
- return proto.wechaty.puppet.MessageImageStreamResponse.deserializeBinaryFromReader(msg, reader);
608
- };
609
-
610
-
611
- /**
612
- * Deserializes binary data (in protobuf wire format) from the
613
- * given reader into the given message object.
614
- * @param {!proto.wechaty.puppet.MessageImageStreamResponse} msg The message object to deserialize into.
615
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
616
- * @return {!proto.wechaty.puppet.MessageImageStreamResponse}
617
- */
618
- proto.wechaty.puppet.MessageImageStreamResponse.deserializeBinaryFromReader = function(msg, reader) {
619
- while (reader.nextField()) {
620
- if (reader.isEndGroup()) {
621
- break;
622
- }
623
- var field = reader.getFieldNumber();
624
- switch (field) {
625
- case 1:
626
- var value = new proto.wechaty.puppet.FileBoxChunk;
627
- reader.readMessage(value,proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader);
628
- msg.setFileBoxChunk(value);
629
- break;
630
- default:
631
- reader.skipField();
632
- break;
633
- }
634
- }
635
- return msg;
636
- };
637
-
638
-
639
- /**
640
- * Serializes the message to binary data (in protobuf wire format).
641
- * @return {!Uint8Array}
642
- */
643
- proto.wechaty.puppet.MessageImageStreamResponse.prototype.serializeBinary = function() {
644
- var writer = new jspb.BinaryWriter();
645
- proto.wechaty.puppet.MessageImageStreamResponse.serializeBinaryToWriter(this, writer);
646
- return writer.getResultBuffer();
647
- };
648
-
649
-
650
- /**
651
- * Serializes the given message to binary data (in protobuf wire
652
- * format), writing to the given BinaryWriter.
653
- * @param {!proto.wechaty.puppet.MessageImageStreamResponse} message
654
- * @param {!jspb.BinaryWriter} writer
655
- * @suppress {unusedLocalVariables} f is only used for nested messages
656
- */
657
- proto.wechaty.puppet.MessageImageStreamResponse.serializeBinaryToWriter = function(message, writer) {
658
- var f = undefined;
659
- f = message.getFileBoxChunk();
660
- if (f != null) {
661
- writer.writeMessage(
662
- 1,
663
- f,
664
- proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter
665
- );
666
- }
667
- };
668
-
669
-
670
- /**
671
- * optional FileBoxChunk file_box_chunk = 1;
672
- * @return {?proto.wechaty.puppet.FileBoxChunk}
673
- */
674
- proto.wechaty.puppet.MessageImageStreamResponse.prototype.getFileBoxChunk = function() {
675
- return /** @type{?proto.wechaty.puppet.FileBoxChunk} */ (
676
- jspb.Message.getWrapperField(this, proto.wechaty.puppet.FileBoxChunk, 1));
677
- };
678
-
679
-
680
- /**
681
- * @param {?proto.wechaty.puppet.FileBoxChunk|undefined} value
682
- * @return {!proto.wechaty.puppet.MessageImageStreamResponse} returns this
683
- */
684
- proto.wechaty.puppet.MessageImageStreamResponse.prototype.setFileBoxChunk = function(value) {
685
- return jspb.Message.setWrapperField(this, 1, value);
686
- };
687
-
688
-
689
- /**
690
- * Clears the message field making it undefined.
691
- * @return {!proto.wechaty.puppet.MessageImageStreamResponse} returns this
692
- */
693
- proto.wechaty.puppet.MessageImageStreamResponse.prototype.clearFileBoxChunk = function() {
694
- return this.setFileBoxChunk(undefined);
695
- };
696
-
697
-
698
- /**
699
- * Returns whether this field is set.
700
- * @return {boolean}
701
- */
702
- proto.wechaty.puppet.MessageImageStreamResponse.prototype.hasFileBoxChunk = function() {
703
- return jspb.Message.getField(this, 1) != null;
704
- };
705
-
706
-
707
-
708
-
709
-
710
- if (jspb.Message.GENERATE_TO_OBJECT) {
711
- /**
712
- * Creates an object representation of this proto.
713
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
714
- * Optional fields that are not set will be set to undefined.
715
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
716
- * For the list of reserved names please see:
717
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
718
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
719
- * JSPB instance for transitional soy proto support:
720
- * http://goto/soy-param-migration
721
- * @return {!Object}
722
- */
723
- proto.wechaty.puppet.MessageFileStreamRequest.prototype.toObject = function(opt_includeInstance) {
724
- return proto.wechaty.puppet.MessageFileStreamRequest.toObject(opt_includeInstance, this);
725
- };
726
-
727
-
728
- /**
729
- * Static version of the {@see toObject} method.
730
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
731
- * the JSPB instance for transitional soy proto support:
732
- * http://goto/soy-param-migration
733
- * @param {!proto.wechaty.puppet.MessageFileStreamRequest} msg The msg instance to transform.
734
- * @return {!Object}
735
- * @suppress {unusedLocalVariables} f is only used for nested messages
736
- */
737
- proto.wechaty.puppet.MessageFileStreamRequest.toObject = function(includeInstance, msg) {
738
- var f, obj = {
739
- id: jspb.Message.getFieldWithDefault(msg, 1, "")
740
- };
741
-
742
- if (includeInstance) {
743
- obj.$jspbMessageInstance = msg;
744
- }
745
- return obj;
746
- };
747
- }
748
-
749
-
750
- /**
751
- * Deserializes binary data (in protobuf wire format).
752
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
753
- * @return {!proto.wechaty.puppet.MessageFileStreamRequest}
754
- */
755
- proto.wechaty.puppet.MessageFileStreamRequest.deserializeBinary = function(bytes) {
756
- var reader = new jspb.BinaryReader(bytes);
757
- var msg = new proto.wechaty.puppet.MessageFileStreamRequest;
758
- return proto.wechaty.puppet.MessageFileStreamRequest.deserializeBinaryFromReader(msg, reader);
759
- };
760
-
761
-
762
- /**
763
- * Deserializes binary data (in protobuf wire format) from the
764
- * given reader into the given message object.
765
- * @param {!proto.wechaty.puppet.MessageFileStreamRequest} msg The message object to deserialize into.
766
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
767
- * @return {!proto.wechaty.puppet.MessageFileStreamRequest}
768
- */
769
- proto.wechaty.puppet.MessageFileStreamRequest.deserializeBinaryFromReader = function(msg, reader) {
770
- while (reader.nextField()) {
771
- if (reader.isEndGroup()) {
772
- break;
773
- }
774
- var field = reader.getFieldNumber();
775
- switch (field) {
776
- case 1:
777
- var value = /** @type {string} */ (reader.readString());
778
- msg.setId(value);
779
- break;
780
- default:
781
- reader.skipField();
782
- break;
783
- }
784
- }
785
- return msg;
786
- };
787
-
788
-
789
- /**
790
- * Serializes the message to binary data (in protobuf wire format).
791
- * @return {!Uint8Array}
792
- */
793
- proto.wechaty.puppet.MessageFileStreamRequest.prototype.serializeBinary = function() {
794
- var writer = new jspb.BinaryWriter();
795
- proto.wechaty.puppet.MessageFileStreamRequest.serializeBinaryToWriter(this, writer);
796
- return writer.getResultBuffer();
797
- };
798
-
799
-
800
- /**
801
- * Serializes the given message to binary data (in protobuf wire
802
- * format), writing to the given BinaryWriter.
803
- * @param {!proto.wechaty.puppet.MessageFileStreamRequest} message
804
- * @param {!jspb.BinaryWriter} writer
805
- * @suppress {unusedLocalVariables} f is only used for nested messages
806
- */
807
- proto.wechaty.puppet.MessageFileStreamRequest.serializeBinaryToWriter = function(message, writer) {
808
- var f = undefined;
809
- f = message.getId();
810
- if (f.length > 0) {
811
- writer.writeString(
812
- 1,
813
- f
814
- );
815
- }
816
- };
817
-
818
-
819
- /**
820
- * optional string id = 1;
821
- * @return {string}
822
- */
823
- proto.wechaty.puppet.MessageFileStreamRequest.prototype.getId = function() {
824
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
825
- };
826
-
827
-
828
- /**
829
- * @param {string} value
830
- * @return {!proto.wechaty.puppet.MessageFileStreamRequest} returns this
831
- */
832
- proto.wechaty.puppet.MessageFileStreamRequest.prototype.setId = function(value) {
833
- return jspb.Message.setProto3StringField(this, 1, value);
834
- };
835
-
836
-
837
-
838
-
839
-
840
- if (jspb.Message.GENERATE_TO_OBJECT) {
841
- /**
842
- * Creates an object representation of this proto.
843
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
844
- * Optional fields that are not set will be set to undefined.
845
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
846
- * For the list of reserved names please see:
847
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
848
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
849
- * JSPB instance for transitional soy proto support:
850
- * http://goto/soy-param-migration
851
- * @return {!Object}
852
- */
853
- proto.wechaty.puppet.MessageFileStreamResponse.prototype.toObject = function(opt_includeInstance) {
854
- return proto.wechaty.puppet.MessageFileStreamResponse.toObject(opt_includeInstance, this);
855
- };
856
-
857
-
858
- /**
859
- * Static version of the {@see toObject} method.
860
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
861
- * the JSPB instance for transitional soy proto support:
862
- * http://goto/soy-param-migration
863
- * @param {!proto.wechaty.puppet.MessageFileStreamResponse} msg The msg instance to transform.
864
- * @return {!Object}
865
- * @suppress {unusedLocalVariables} f is only used for nested messages
866
- */
867
- proto.wechaty.puppet.MessageFileStreamResponse.toObject = function(includeInstance, msg) {
868
- var f, obj = {
869
- fileBoxChunk: (f = msg.getFileBoxChunk()) && proto.wechaty.puppet.FileBoxChunk.toObject(includeInstance, f)
870
- };
871
-
872
- if (includeInstance) {
873
- obj.$jspbMessageInstance = msg;
874
- }
875
- return obj;
876
- };
877
- }
878
-
879
-
880
- /**
881
- * Deserializes binary data (in protobuf wire format).
882
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
883
- * @return {!proto.wechaty.puppet.MessageFileStreamResponse}
884
- */
885
- proto.wechaty.puppet.MessageFileStreamResponse.deserializeBinary = function(bytes) {
886
- var reader = new jspb.BinaryReader(bytes);
887
- var msg = new proto.wechaty.puppet.MessageFileStreamResponse;
888
- return proto.wechaty.puppet.MessageFileStreamResponse.deserializeBinaryFromReader(msg, reader);
889
- };
890
-
891
-
892
- /**
893
- * Deserializes binary data (in protobuf wire format) from the
894
- * given reader into the given message object.
895
- * @param {!proto.wechaty.puppet.MessageFileStreamResponse} msg The message object to deserialize into.
896
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
897
- * @return {!proto.wechaty.puppet.MessageFileStreamResponse}
898
- */
899
- proto.wechaty.puppet.MessageFileStreamResponse.deserializeBinaryFromReader = function(msg, reader) {
900
- while (reader.nextField()) {
901
- if (reader.isEndGroup()) {
902
- break;
903
- }
904
- var field = reader.getFieldNumber();
905
- switch (field) {
906
- case 1:
907
- var value = new proto.wechaty.puppet.FileBoxChunk;
908
- reader.readMessage(value,proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader);
909
- msg.setFileBoxChunk(value);
910
- break;
911
- default:
912
- reader.skipField();
913
- break;
914
- }
915
- }
916
- return msg;
917
- };
918
-
919
-
920
- /**
921
- * Serializes the message to binary data (in protobuf wire format).
922
- * @return {!Uint8Array}
923
- */
924
- proto.wechaty.puppet.MessageFileStreamResponse.prototype.serializeBinary = function() {
925
- var writer = new jspb.BinaryWriter();
926
- proto.wechaty.puppet.MessageFileStreamResponse.serializeBinaryToWriter(this, writer);
927
- return writer.getResultBuffer();
928
- };
929
-
930
-
931
- /**
932
- * Serializes the given message to binary data (in protobuf wire
933
- * format), writing to the given BinaryWriter.
934
- * @param {!proto.wechaty.puppet.MessageFileStreamResponse} message
935
- * @param {!jspb.BinaryWriter} writer
936
- * @suppress {unusedLocalVariables} f is only used for nested messages
937
- */
938
- proto.wechaty.puppet.MessageFileStreamResponse.serializeBinaryToWriter = function(message, writer) {
939
- var f = undefined;
940
- f = message.getFileBoxChunk();
941
- if (f != null) {
942
- writer.writeMessage(
943
- 1,
944
- f,
945
- proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter
946
- );
947
- }
948
- };
949
-
950
-
951
- /**
952
- * optional FileBoxChunk file_box_chunk = 1;
953
- * @return {?proto.wechaty.puppet.FileBoxChunk}
954
- */
955
- proto.wechaty.puppet.MessageFileStreamResponse.prototype.getFileBoxChunk = function() {
956
- return /** @type{?proto.wechaty.puppet.FileBoxChunk} */ (
957
- jspb.Message.getWrapperField(this, proto.wechaty.puppet.FileBoxChunk, 1));
958
- };
959
-
960
-
961
- /**
962
- * @param {?proto.wechaty.puppet.FileBoxChunk|undefined} value
963
- * @return {!proto.wechaty.puppet.MessageFileStreamResponse} returns this
964
- */
965
- proto.wechaty.puppet.MessageFileStreamResponse.prototype.setFileBoxChunk = function(value) {
966
- return jspb.Message.setWrapperField(this, 1, value);
967
- };
968
-
969
-
970
- /**
971
- * Clears the message field making it undefined.
972
- * @return {!proto.wechaty.puppet.MessageFileStreamResponse} returns this
973
- */
974
- proto.wechaty.puppet.MessageFileStreamResponse.prototype.clearFileBoxChunk = function() {
975
- return this.setFileBoxChunk(undefined);
976
- };
977
-
978
-
979
- /**
980
- * Returns whether this field is set.
981
- * @return {boolean}
982
- */
983
- proto.wechaty.puppet.MessageFileStreamResponse.prototype.hasFileBoxChunk = function() {
984
- return jspb.Message.getField(this, 1) != null;
985
- };
986
-
987
-
988
-
989
-
990
-
991
- if (jspb.Message.GENERATE_TO_OBJECT) {
992
- /**
993
- * Creates an object representation of this proto.
994
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
995
- * Optional fields that are not set will be set to undefined.
996
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
997
- * For the list of reserved names please see:
998
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
999
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1000
- * JSPB instance for transitional soy proto support:
1001
- * http://goto/soy-param-migration
1002
- * @return {!Object}
1003
- */
1004
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.toObject = function(opt_includeInstance) {
1005
- return proto.wechaty.puppet.MessageSendFileStreamRequest.toObject(opt_includeInstance, this);
1006
- };
1007
-
1008
-
1009
- /**
1010
- * Static version of the {@see toObject} method.
1011
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1012
- * the JSPB instance for transitional soy proto support:
1013
- * http://goto/soy-param-migration
1014
- * @param {!proto.wechaty.puppet.MessageSendFileStreamRequest} msg The msg instance to transform.
1015
- * @return {!Object}
1016
- * @suppress {unusedLocalVariables} f is only used for nested messages
1017
- */
1018
- proto.wechaty.puppet.MessageSendFileStreamRequest.toObject = function(includeInstance, msg) {
1019
- var f, obj = {
1020
- conversationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1021
- fileBoxChunk: (f = msg.getFileBoxChunk()) && proto.wechaty.puppet.FileBoxChunk.toObject(includeInstance, f)
1022
- };
1023
-
1024
- if (includeInstance) {
1025
- obj.$jspbMessageInstance = msg;
1026
- }
1027
- return obj;
1028
- };
1029
- }
1030
-
1031
-
1032
- /**
1033
- * Deserializes binary data (in protobuf wire format).
1034
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1035
- * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest}
1036
- */
1037
- proto.wechaty.puppet.MessageSendFileStreamRequest.deserializeBinary = function(bytes) {
1038
- var reader = new jspb.BinaryReader(bytes);
1039
- var msg = new proto.wechaty.puppet.MessageSendFileStreamRequest;
1040
- return proto.wechaty.puppet.MessageSendFileStreamRequest.deserializeBinaryFromReader(msg, reader);
1041
- };
1042
-
1043
-
1044
- /**
1045
- * Deserializes binary data (in protobuf wire format) from the
1046
- * given reader into the given message object.
1047
- * @param {!proto.wechaty.puppet.MessageSendFileStreamRequest} msg The message object to deserialize into.
1048
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1049
- * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest}
1050
- */
1051
- proto.wechaty.puppet.MessageSendFileStreamRequest.deserializeBinaryFromReader = function(msg, reader) {
1052
- while (reader.nextField()) {
1053
- if (reader.isEndGroup()) {
1054
- break;
1055
- }
1056
- var field = reader.getFieldNumber();
1057
- switch (field) {
1058
- case 1:
1059
- var value = /** @type {string} */ (reader.readString());
1060
- msg.setConversationId(value);
1061
- break;
1062
- case 2:
1063
- var value = new proto.wechaty.puppet.FileBoxChunk;
1064
- reader.readMessage(value,proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader);
1065
- msg.setFileBoxChunk(value);
1066
- break;
1067
- default:
1068
- reader.skipField();
1069
- break;
1070
- }
1071
- }
1072
- return msg;
1073
- };
1074
-
1075
-
1076
- /**
1077
- * Serializes the message to binary data (in protobuf wire format).
1078
- * @return {!Uint8Array}
1079
- */
1080
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.serializeBinary = function() {
1081
- var writer = new jspb.BinaryWriter();
1082
- proto.wechaty.puppet.MessageSendFileStreamRequest.serializeBinaryToWriter(this, writer);
1083
- return writer.getResultBuffer();
1084
- };
1085
-
1086
-
1087
- /**
1088
- * Serializes the given message to binary data (in protobuf wire
1089
- * format), writing to the given BinaryWriter.
1090
- * @param {!proto.wechaty.puppet.MessageSendFileStreamRequest} message
1091
- * @param {!jspb.BinaryWriter} writer
1092
- * @suppress {unusedLocalVariables} f is only used for nested messages
1093
- */
1094
- proto.wechaty.puppet.MessageSendFileStreamRequest.serializeBinaryToWriter = function(message, writer) {
1095
- var f = undefined;
1096
- f = /** @type {string} */ (jspb.Message.getField(message, 1));
1097
- if (f != null) {
1098
- writer.writeString(
1099
- 1,
1100
- f
1101
- );
1102
- }
1103
- f = message.getFileBoxChunk();
1104
- if (f != null) {
1105
- writer.writeMessage(
1106
- 2,
1107
- f,
1108
- proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter
1109
- );
1110
- }
1111
- };
1112
-
1113
-
1114
- /**
1115
- * optional string conversation_id = 1;
1116
- * @return {string}
1117
- */
1118
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.getConversationId = function() {
1119
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1120
- };
1121
-
1122
-
1123
- /**
1124
- * @param {string} value
1125
- * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this
1126
- */
1127
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.setConversationId = function(value) {
1128
- return jspb.Message.setField(this, 1, value);
1129
- };
1130
-
1131
-
1132
- /**
1133
- * Clears the field making it undefined.
1134
- * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this
1135
- */
1136
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.clearConversationId = function() {
1137
- return jspb.Message.setField(this, 1, undefined);
1138
- };
1139
-
1140
-
1141
- /**
1142
- * Returns whether this field is set.
1143
- * @return {boolean}
1144
- */
1145
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.hasConversationId = function() {
1146
- return jspb.Message.getField(this, 1) != null;
1147
- };
1148
-
1149
-
1150
- /**
1151
- * optional FileBoxChunk file_box_chunk = 2;
1152
- * @return {?proto.wechaty.puppet.FileBoxChunk}
1153
- */
1154
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.getFileBoxChunk = function() {
1155
- return /** @type{?proto.wechaty.puppet.FileBoxChunk} */ (
1156
- jspb.Message.getWrapperField(this, proto.wechaty.puppet.FileBoxChunk, 2));
1157
- };
1158
-
1159
-
1160
- /**
1161
- * @param {?proto.wechaty.puppet.FileBoxChunk|undefined} value
1162
- * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this
1163
- */
1164
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.setFileBoxChunk = function(value) {
1165
- return jspb.Message.setWrapperField(this, 2, value);
1166
- };
1167
-
1168
-
1169
- /**
1170
- * Clears the message field making it undefined.
1171
- * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this
1172
- */
1173
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.clearFileBoxChunk = function() {
1174
- return this.setFileBoxChunk(undefined);
1175
- };
1176
-
1177
-
1178
- /**
1179
- * Returns whether this field is set.
1180
- * @return {boolean}
1181
- */
1182
- proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.hasFileBoxChunk = function() {
1183
- return jspb.Message.getField(this, 2) != null;
1184
- };
1185
-
1186
-
1187
-
1188
-
1189
-
1190
- if (jspb.Message.GENERATE_TO_OBJECT) {
1191
- /**
1192
- * Creates an object representation of this proto.
1193
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1194
- * Optional fields that are not set will be set to undefined.
1195
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1196
- * For the list of reserved names please see:
1197
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1198
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1199
- * JSPB instance for transitional soy proto support:
1200
- * http://goto/soy-param-migration
1201
- * @return {!Object}
1202
- */
1203
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.toObject = function(opt_includeInstance) {
1204
- return proto.wechaty.puppet.MessageSendFileStreamResponse.toObject(opt_includeInstance, this);
1205
- };
1206
-
1207
-
1208
- /**
1209
- * Static version of the {@see toObject} method.
1210
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1211
- * the JSPB instance for transitional soy proto support:
1212
- * http://goto/soy-param-migration
1213
- * @param {!proto.wechaty.puppet.MessageSendFileStreamResponse} msg The msg instance to transform.
1214
- * @return {!Object}
1215
- * @suppress {unusedLocalVariables} f is only used for nested messages
1216
- */
1217
- proto.wechaty.puppet.MessageSendFileStreamResponse.toObject = function(includeInstance, msg) {
1218
- var f, obj = {
1219
- idStringValueDeprecated: (f = msg.getIdStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f),
1220
- id: jspb.Message.getFieldWithDefault(msg, 2, "")
1221
- };
1222
-
1223
- if (includeInstance) {
1224
- obj.$jspbMessageInstance = msg;
1225
- }
1226
- return obj;
1227
- };
1228
- }
1229
-
1230
-
1231
- /**
1232
- * Deserializes binary data (in protobuf wire format).
1233
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1234
- * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse}
1235
- */
1236
- proto.wechaty.puppet.MessageSendFileStreamResponse.deserializeBinary = function(bytes) {
1237
- var reader = new jspb.BinaryReader(bytes);
1238
- var msg = new proto.wechaty.puppet.MessageSendFileStreamResponse;
1239
- return proto.wechaty.puppet.MessageSendFileStreamResponse.deserializeBinaryFromReader(msg, reader);
1240
- };
1241
-
1242
-
1243
- /**
1244
- * Deserializes binary data (in protobuf wire format) from the
1245
- * given reader into the given message object.
1246
- * @param {!proto.wechaty.puppet.MessageSendFileStreamResponse} msg The message object to deserialize into.
1247
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1248
- * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse}
1249
- */
1250
- proto.wechaty.puppet.MessageSendFileStreamResponse.deserializeBinaryFromReader = function(msg, reader) {
1251
- while (reader.nextField()) {
1252
- if (reader.isEndGroup()) {
1253
- break;
1254
- }
1255
- var field = reader.getFieldNumber();
1256
- switch (field) {
1257
- case 1:
1258
- var value = new google_protobuf_wrappers_pb.StringValue;
1259
- reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader);
1260
- msg.setIdStringValueDeprecated(value);
1261
- break;
1262
- case 2:
1263
- var value = /** @type {string} */ (reader.readString());
1264
- msg.setId(value);
1265
- break;
1266
- default:
1267
- reader.skipField();
1268
- break;
1269
- }
1270
- }
1271
- return msg;
1272
- };
1273
-
1274
-
1275
- /**
1276
- * Serializes the message to binary data (in protobuf wire format).
1277
- * @return {!Uint8Array}
1278
- */
1279
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.serializeBinary = function() {
1280
- var writer = new jspb.BinaryWriter();
1281
- proto.wechaty.puppet.MessageSendFileStreamResponse.serializeBinaryToWriter(this, writer);
1282
- return writer.getResultBuffer();
1283
- };
1284
-
1285
-
1286
- /**
1287
- * Serializes the given message to binary data (in protobuf wire
1288
- * format), writing to the given BinaryWriter.
1289
- * @param {!proto.wechaty.puppet.MessageSendFileStreamResponse} message
1290
- * @param {!jspb.BinaryWriter} writer
1291
- * @suppress {unusedLocalVariables} f is only used for nested messages
1292
- */
1293
- proto.wechaty.puppet.MessageSendFileStreamResponse.serializeBinaryToWriter = function(message, writer) {
1294
- var f = undefined;
1295
- f = message.getIdStringValueDeprecated();
1296
- if (f != null) {
1297
- writer.writeMessage(
1298
- 1,
1299
- f,
1300
- google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter
1301
- );
1302
- }
1303
- f = message.getId();
1304
- if (f.length > 0) {
1305
- writer.writeString(
1306
- 2,
1307
- f
1308
- );
1309
- }
1310
- };
1311
-
1312
-
1313
- /**
1314
- * optional google.protobuf.StringValue id_string_value_deprecated = 1;
1315
- * @return {?proto.google.protobuf.StringValue}
1316
- */
1317
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.getIdStringValueDeprecated = function() {
1318
- return /** @type{?proto.google.protobuf.StringValue} */ (
1319
- jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 1));
1320
- };
1321
-
1322
-
1323
- /**
1324
- * @param {?proto.google.protobuf.StringValue|undefined} value
1325
- * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} returns this
1326
- */
1327
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.setIdStringValueDeprecated = function(value) {
1328
- return jspb.Message.setWrapperField(this, 1, value);
1329
- };
1330
-
1331
-
1332
- /**
1333
- * Clears the message field making it undefined.
1334
- * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} returns this
1335
- */
1336
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.clearIdStringValueDeprecated = function() {
1337
- return this.setIdStringValueDeprecated(undefined);
1338
- };
1339
-
1340
-
1341
- /**
1342
- * Returns whether this field is set.
1343
- * @return {boolean}
1344
- */
1345
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.hasIdStringValueDeprecated = function() {
1346
- return jspb.Message.getField(this, 1) != null;
1347
- };
1348
-
1349
-
1350
- /**
1351
- * optional string id = 2;
1352
- * @return {string}
1353
- */
1354
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.getId = function() {
1355
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1356
- };
1357
-
1358
-
1359
- /**
1360
- * @param {string} value
1361
- * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} returns this
1362
- */
1363
- proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.setId = function(value) {
1364
- return jspb.Message.setProto3StringField(this, 2, value);
1365
- };
1366
-
1367
-
1368
- goog.object.extend(exports, proto.wechaty.puppet);