@juzi/wechaty-grpc 1.0.101 → 1.0.103

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 (68) hide show
  1. package/dist/cjs/out/wechaty/puppet/base_pb.d.ts +3 -0
  2. package/dist/cjs/out/wechaty/puppet/base_pb.js +4 -1
  3. package/dist/cjs/out/wechaty/puppet/call_pb.d.ts +361 -0
  4. package/dist/cjs/out/wechaty/puppet/call_pb.js +2869 -79
  5. package/dist/cjs/out/wechaty/puppet/channel_pb.d.ts +70 -0
  6. package/dist/cjs/out/wechaty/puppet/channel_pb.js +544 -2
  7. package/dist/cjs/out/wechaty/puppet/event_pb.d.ts +1 -0
  8. package/dist/cjs/out/wechaty/puppet/event_pb.js +2 -1
  9. package/dist/cjs/out/wechaty/puppet.openapi.yaml +376 -2
  10. package/dist/cjs/out/wechaty/puppet.swagger.json +537 -10
  11. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +137 -0
  12. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +266 -0
  13. package/dist/cjs/out/wechaty/puppet_pb.d.ts +1 -0
  14. package/dist/cjs/out/wechaty/puppet_pb.js +2 -0
  15. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +153 -0
  16. package/dist/cjs/out/wechaty/puppet_pb_service.js +321 -0
  17. package/dist/cjs/proto/wechaty/puppet/base.proto +4 -0
  18. package/dist/cjs/proto/wechaty/puppet/call.proto +101 -1
  19. package/dist/cjs/proto/wechaty/puppet/channel.proto +19 -0
  20. package/dist/cjs/proto/wechaty/puppet/event.proto +1 -0
  21. package/dist/cjs/proto/wechaty/puppet.proto +49 -0
  22. package/dist/cjs/src/package-json.js +1 -1
  23. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  24. package/dist/cjs/tests/puppet-server-impl.js +40 -0
  25. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  26. package/dist/esm/out/wechaty/puppet/base_pb.d.ts +3 -0
  27. package/dist/esm/out/wechaty/puppet/base_pb.js +4 -1
  28. package/dist/esm/out/wechaty/puppet/call_pb.d.ts +361 -0
  29. package/dist/esm/out/wechaty/puppet/call_pb.js +2869 -79
  30. package/dist/esm/out/wechaty/puppet/channel_pb.d.ts +70 -0
  31. package/dist/esm/out/wechaty/puppet/channel_pb.js +544 -2
  32. package/dist/esm/out/wechaty/puppet/event_pb.d.ts +1 -0
  33. package/dist/esm/out/wechaty/puppet/event_pb.js +2 -1
  34. package/dist/esm/out/wechaty/puppet.openapi.yaml +376 -2
  35. package/dist/esm/out/wechaty/puppet.swagger.json +537 -10
  36. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +137 -0
  37. package/dist/esm/out/wechaty/puppet_grpc_pb.js +266 -0
  38. package/dist/esm/out/wechaty/puppet_pb.d.ts +1 -0
  39. package/dist/esm/out/wechaty/puppet_pb.js +2 -0
  40. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +153 -0
  41. package/dist/esm/out/wechaty/puppet_pb_service.js +321 -0
  42. package/dist/esm/proto/wechaty/puppet/base.proto +4 -0
  43. package/dist/esm/proto/wechaty/puppet/call.proto +101 -1
  44. package/dist/esm/proto/wechaty/puppet/channel.proto +19 -0
  45. package/dist/esm/proto/wechaty/puppet/event.proto +1 -0
  46. package/dist/esm/proto/wechaty/puppet.proto +49 -0
  47. package/dist/esm/src/package-json.js +1 -1
  48. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  49. package/dist/esm/tests/puppet-server-impl.js +40 -0
  50. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  51. package/out/wechaty/puppet/base_pb.d.ts +3 -0
  52. package/out/wechaty/puppet/base_pb.js +4 -1
  53. package/out/wechaty/puppet/call_pb.d.ts +361 -0
  54. package/out/wechaty/puppet/call_pb.js +2869 -79
  55. package/out/wechaty/puppet/channel_pb.d.ts +70 -0
  56. package/out/wechaty/puppet/channel_pb.js +544 -2
  57. package/out/wechaty/puppet/event_pb.d.ts +1 -0
  58. package/out/wechaty/puppet/event_pb.js +2 -1
  59. package/out/wechaty/puppet.openapi.yaml +376 -2
  60. package/out/wechaty/puppet.swagger.json +537 -10
  61. package/out/wechaty/puppet_grpc_pb.d.ts +137 -0
  62. package/out/wechaty/puppet_grpc_pb.js +266 -0
  63. package/out/wechaty/puppet_pb.d.ts +1 -0
  64. package/out/wechaty/puppet_pb.js +2 -0
  65. package/out/wechaty/puppet_pb_service.d.ts +153 -0
  66. package/out/wechaty/puppet_pb_service.js +321 -0
  67. package/package.json +1 -1
  68. package/src/package-json.ts +1 -1
@@ -15,7 +15,25 @@ var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
16
  var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
17
 
18
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
19
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
20
+ goog.exportSymbol('proto.wechaty.puppet.CallAcceptRequest', null, global);
21
+ goog.exportSymbol('proto.wechaty.puppet.CallAcceptResponse', null, global);
22
+ goog.exportSymbol('proto.wechaty.puppet.CallAddRequest', null, global);
23
+ goog.exportSymbol('proto.wechaty.puppet.CallAddResponse', null, global);
24
+ goog.exportSymbol('proto.wechaty.puppet.CallCancelRequest', null, global);
25
+ goog.exportSymbol('proto.wechaty.puppet.CallCancelResponse', null, global);
26
+ goog.exportSymbol('proto.wechaty.puppet.CallHangupRequest', null, global);
27
+ goog.exportSymbol('proto.wechaty.puppet.CallHangupResponse', null, global);
28
+ goog.exportSymbol('proto.wechaty.puppet.CallInviteRequest', null, global);
29
+ goog.exportSymbol('proto.wechaty.puppet.CallInviteResponse', null, global);
30
+ goog.exportSymbol('proto.wechaty.puppet.CallMediaEndpointRequest', null, global);
31
+ goog.exportSymbol('proto.wechaty.puppet.CallMediaEndpointResponse', null, global);
32
+ goog.exportSymbol('proto.wechaty.puppet.CallPayloadRequest', null, global);
33
+ goog.exportSymbol('proto.wechaty.puppet.CallPayloadResponse', null, global);
18
34
  goog.exportSymbol('proto.wechaty.puppet.CallRecordPayload', null, global);
35
+ goog.exportSymbol('proto.wechaty.puppet.CallRejectRequest', null, global);
36
+ goog.exportSymbol('proto.wechaty.puppet.CallRejectResponse', null, global);
19
37
  goog.exportSymbol('proto.wechaty.puppet.CallStatus', null, global);
20
38
  goog.exportSymbol('proto.wechaty.puppet.CallType', null, global);
21
39
  /**
@@ -39,13 +57,2713 @@ if (goog.DEBUG && !COMPILED) {
39
57
  */
40
58
  proto.wechaty.puppet.CallRecordPayload.displayName = 'proto.wechaty.puppet.CallRecordPayload';
41
59
  }
60
+ /**
61
+ * Generated by JsPbCodeGenerator.
62
+ * @param {Array=} opt_data Optional initial data array, typically from a
63
+ * server response, or constructed directly in Javascript. The array is used
64
+ * in place and becomes part of the constructed object. It is not cloned.
65
+ * If no data is provided, the constructed object will be empty, but still
66
+ * valid.
67
+ * @extends {jspb.Message}
68
+ * @constructor
69
+ */
70
+ proto.wechaty.puppet.CallInviteRequest = function(opt_data) {
71
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.CallInviteRequest.repeatedFields_, null);
72
+ };
73
+ goog.inherits(proto.wechaty.puppet.CallInviteRequest, jspb.Message);
74
+ if (goog.DEBUG && !COMPILED) {
75
+ /**
76
+ * @public
77
+ * @override
78
+ */
79
+ proto.wechaty.puppet.CallInviteRequest.displayName = 'proto.wechaty.puppet.CallInviteRequest';
80
+ }
81
+ /**
82
+ * Generated by JsPbCodeGenerator.
83
+ * @param {Array=} opt_data Optional initial data array, typically from a
84
+ * server response, or constructed directly in Javascript. The array is used
85
+ * in place and becomes part of the constructed object. It is not cloned.
86
+ * If no data is provided, the constructed object will be empty, but still
87
+ * valid.
88
+ * @extends {jspb.Message}
89
+ * @constructor
90
+ */
91
+ proto.wechaty.puppet.CallInviteResponse = function(opt_data) {
92
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
93
+ };
94
+ goog.inherits(proto.wechaty.puppet.CallInviteResponse, jspb.Message);
95
+ if (goog.DEBUG && !COMPILED) {
96
+ /**
97
+ * @public
98
+ * @override
99
+ */
100
+ proto.wechaty.puppet.CallInviteResponse.displayName = 'proto.wechaty.puppet.CallInviteResponse';
101
+ }
102
+ /**
103
+ * Generated by JsPbCodeGenerator.
104
+ * @param {Array=} opt_data Optional initial data array, typically from a
105
+ * server response, or constructed directly in Javascript. The array is used
106
+ * in place and becomes part of the constructed object. It is not cloned.
107
+ * If no data is provided, the constructed object will be empty, but still
108
+ * valid.
109
+ * @extends {jspb.Message}
110
+ * @constructor
111
+ */
112
+ proto.wechaty.puppet.CallAddRequest = function(opt_data) {
113
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.CallAddRequest.repeatedFields_, null);
114
+ };
115
+ goog.inherits(proto.wechaty.puppet.CallAddRequest, jspb.Message);
116
+ if (goog.DEBUG && !COMPILED) {
117
+ /**
118
+ * @public
119
+ * @override
120
+ */
121
+ proto.wechaty.puppet.CallAddRequest.displayName = 'proto.wechaty.puppet.CallAddRequest';
122
+ }
123
+ /**
124
+ * Generated by JsPbCodeGenerator.
125
+ * @param {Array=} opt_data Optional initial data array, typically from a
126
+ * server response, or constructed directly in Javascript. The array is used
127
+ * in place and becomes part of the constructed object. It is not cloned.
128
+ * If no data is provided, the constructed object will be empty, but still
129
+ * valid.
130
+ * @extends {jspb.Message}
131
+ * @constructor
132
+ */
133
+ proto.wechaty.puppet.CallAddResponse = function(opt_data) {
134
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
135
+ };
136
+ goog.inherits(proto.wechaty.puppet.CallAddResponse, jspb.Message);
137
+ if (goog.DEBUG && !COMPILED) {
138
+ /**
139
+ * @public
140
+ * @override
141
+ */
142
+ proto.wechaty.puppet.CallAddResponse.displayName = 'proto.wechaty.puppet.CallAddResponse';
143
+ }
144
+ /**
145
+ * Generated by JsPbCodeGenerator.
146
+ * @param {Array=} opt_data Optional initial data array, typically from a
147
+ * server response, or constructed directly in Javascript. The array is used
148
+ * in place and becomes part of the constructed object. It is not cloned.
149
+ * If no data is provided, the constructed object will be empty, but still
150
+ * valid.
151
+ * @extends {jspb.Message}
152
+ * @constructor
153
+ */
154
+ proto.wechaty.puppet.CallAcceptRequest = function(opt_data) {
155
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
156
+ };
157
+ goog.inherits(proto.wechaty.puppet.CallAcceptRequest, jspb.Message);
158
+ if (goog.DEBUG && !COMPILED) {
159
+ /**
160
+ * @public
161
+ * @override
162
+ */
163
+ proto.wechaty.puppet.CallAcceptRequest.displayName = 'proto.wechaty.puppet.CallAcceptRequest';
164
+ }
165
+ /**
166
+ * Generated by JsPbCodeGenerator.
167
+ * @param {Array=} opt_data Optional initial data array, typically from a
168
+ * server response, or constructed directly in Javascript. The array is used
169
+ * in place and becomes part of the constructed object. It is not cloned.
170
+ * If no data is provided, the constructed object will be empty, but still
171
+ * valid.
172
+ * @extends {jspb.Message}
173
+ * @constructor
174
+ */
175
+ proto.wechaty.puppet.CallAcceptResponse = function(opt_data) {
176
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
177
+ };
178
+ goog.inherits(proto.wechaty.puppet.CallAcceptResponse, jspb.Message);
179
+ if (goog.DEBUG && !COMPILED) {
180
+ /**
181
+ * @public
182
+ * @override
183
+ */
184
+ proto.wechaty.puppet.CallAcceptResponse.displayName = 'proto.wechaty.puppet.CallAcceptResponse';
185
+ }
186
+ /**
187
+ * Generated by JsPbCodeGenerator.
188
+ * @param {Array=} opt_data Optional initial data array, typically from a
189
+ * server response, or constructed directly in Javascript. The array is used
190
+ * in place and becomes part of the constructed object. It is not cloned.
191
+ * If no data is provided, the constructed object will be empty, but still
192
+ * valid.
193
+ * @extends {jspb.Message}
194
+ * @constructor
195
+ */
196
+ proto.wechaty.puppet.CallRejectRequest = function(opt_data) {
197
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
198
+ };
199
+ goog.inherits(proto.wechaty.puppet.CallRejectRequest, jspb.Message);
200
+ if (goog.DEBUG && !COMPILED) {
201
+ /**
202
+ * @public
203
+ * @override
204
+ */
205
+ proto.wechaty.puppet.CallRejectRequest.displayName = 'proto.wechaty.puppet.CallRejectRequest';
206
+ }
207
+ /**
208
+ * Generated by JsPbCodeGenerator.
209
+ * @param {Array=} opt_data Optional initial data array, typically from a
210
+ * server response, or constructed directly in Javascript. The array is used
211
+ * in place and becomes part of the constructed object. It is not cloned.
212
+ * If no data is provided, the constructed object will be empty, but still
213
+ * valid.
214
+ * @extends {jspb.Message}
215
+ * @constructor
216
+ */
217
+ proto.wechaty.puppet.CallRejectResponse = function(opt_data) {
218
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
219
+ };
220
+ goog.inherits(proto.wechaty.puppet.CallRejectResponse, jspb.Message);
221
+ if (goog.DEBUG && !COMPILED) {
222
+ /**
223
+ * @public
224
+ * @override
225
+ */
226
+ proto.wechaty.puppet.CallRejectResponse.displayName = 'proto.wechaty.puppet.CallRejectResponse';
227
+ }
228
+ /**
229
+ * Generated by JsPbCodeGenerator.
230
+ * @param {Array=} opt_data Optional initial data array, typically from a
231
+ * server response, or constructed directly in Javascript. The array is used
232
+ * in place and becomes part of the constructed object. It is not cloned.
233
+ * If no data is provided, the constructed object will be empty, but still
234
+ * valid.
235
+ * @extends {jspb.Message}
236
+ * @constructor
237
+ */
238
+ proto.wechaty.puppet.CallCancelRequest = function(opt_data) {
239
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
240
+ };
241
+ goog.inherits(proto.wechaty.puppet.CallCancelRequest, jspb.Message);
242
+ if (goog.DEBUG && !COMPILED) {
243
+ /**
244
+ * @public
245
+ * @override
246
+ */
247
+ proto.wechaty.puppet.CallCancelRequest.displayName = 'proto.wechaty.puppet.CallCancelRequest';
248
+ }
249
+ /**
250
+ * Generated by JsPbCodeGenerator.
251
+ * @param {Array=} opt_data Optional initial data array, typically from a
252
+ * server response, or constructed directly in Javascript. The array is used
253
+ * in place and becomes part of the constructed object. It is not cloned.
254
+ * If no data is provided, the constructed object will be empty, but still
255
+ * valid.
256
+ * @extends {jspb.Message}
257
+ * @constructor
258
+ */
259
+ proto.wechaty.puppet.CallCancelResponse = function(opt_data) {
260
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
261
+ };
262
+ goog.inherits(proto.wechaty.puppet.CallCancelResponse, jspb.Message);
263
+ if (goog.DEBUG && !COMPILED) {
264
+ /**
265
+ * @public
266
+ * @override
267
+ */
268
+ proto.wechaty.puppet.CallCancelResponse.displayName = 'proto.wechaty.puppet.CallCancelResponse';
269
+ }
270
+ /**
271
+ * Generated by JsPbCodeGenerator.
272
+ * @param {Array=} opt_data Optional initial data array, typically from a
273
+ * server response, or constructed directly in Javascript. The array is used
274
+ * in place and becomes part of the constructed object. It is not cloned.
275
+ * If no data is provided, the constructed object will be empty, but still
276
+ * valid.
277
+ * @extends {jspb.Message}
278
+ * @constructor
279
+ */
280
+ proto.wechaty.puppet.CallHangupRequest = function(opt_data) {
281
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
282
+ };
283
+ goog.inherits(proto.wechaty.puppet.CallHangupRequest, jspb.Message);
284
+ if (goog.DEBUG && !COMPILED) {
285
+ /**
286
+ * @public
287
+ * @override
288
+ */
289
+ proto.wechaty.puppet.CallHangupRequest.displayName = 'proto.wechaty.puppet.CallHangupRequest';
290
+ }
291
+ /**
292
+ * Generated by JsPbCodeGenerator.
293
+ * @param {Array=} opt_data Optional initial data array, typically from a
294
+ * server response, or constructed directly in Javascript. The array is used
295
+ * in place and becomes part of the constructed object. It is not cloned.
296
+ * If no data is provided, the constructed object will be empty, but still
297
+ * valid.
298
+ * @extends {jspb.Message}
299
+ * @constructor
300
+ */
301
+ proto.wechaty.puppet.CallHangupResponse = function(opt_data) {
302
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
303
+ };
304
+ goog.inherits(proto.wechaty.puppet.CallHangupResponse, jspb.Message);
305
+ if (goog.DEBUG && !COMPILED) {
306
+ /**
307
+ * @public
308
+ * @override
309
+ */
310
+ proto.wechaty.puppet.CallHangupResponse.displayName = 'proto.wechaty.puppet.CallHangupResponse';
311
+ }
312
+ /**
313
+ * Generated by JsPbCodeGenerator.
314
+ * @param {Array=} opt_data Optional initial data array, typically from a
315
+ * server response, or constructed directly in Javascript. The array is used
316
+ * in place and becomes part of the constructed object. It is not cloned.
317
+ * If no data is provided, the constructed object will be empty, but still
318
+ * valid.
319
+ * @extends {jspb.Message}
320
+ * @constructor
321
+ */
322
+ proto.wechaty.puppet.CallMediaEndpointRequest = function(opt_data) {
323
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
324
+ };
325
+ goog.inherits(proto.wechaty.puppet.CallMediaEndpointRequest, jspb.Message);
326
+ if (goog.DEBUG && !COMPILED) {
327
+ /**
328
+ * @public
329
+ * @override
330
+ */
331
+ proto.wechaty.puppet.CallMediaEndpointRequest.displayName = 'proto.wechaty.puppet.CallMediaEndpointRequest';
332
+ }
333
+ /**
334
+ * Generated by JsPbCodeGenerator.
335
+ * @param {Array=} opt_data Optional initial data array, typically from a
336
+ * server response, or constructed directly in Javascript. The array is used
337
+ * in place and becomes part of the constructed object. It is not cloned.
338
+ * If no data is provided, the constructed object will be empty, but still
339
+ * valid.
340
+ * @extends {jspb.Message}
341
+ * @constructor
342
+ */
343
+ proto.wechaty.puppet.CallMediaEndpointResponse = function(opt_data) {
344
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
345
+ };
346
+ goog.inherits(proto.wechaty.puppet.CallMediaEndpointResponse, jspb.Message);
347
+ if (goog.DEBUG && !COMPILED) {
348
+ /**
349
+ * @public
350
+ * @override
351
+ */
352
+ proto.wechaty.puppet.CallMediaEndpointResponse.displayName = 'proto.wechaty.puppet.CallMediaEndpointResponse';
353
+ }
354
+ /**
355
+ * Generated by JsPbCodeGenerator.
356
+ * @param {Array=} opt_data Optional initial data array, typically from a
357
+ * server response, or constructed directly in Javascript. The array is used
358
+ * in place and becomes part of the constructed object. It is not cloned.
359
+ * If no data is provided, the constructed object will be empty, but still
360
+ * valid.
361
+ * @extends {jspb.Message}
362
+ * @constructor
363
+ */
364
+ proto.wechaty.puppet.CallPayloadRequest = function(opt_data) {
365
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
366
+ };
367
+ goog.inherits(proto.wechaty.puppet.CallPayloadRequest, jspb.Message);
368
+ if (goog.DEBUG && !COMPILED) {
369
+ /**
370
+ * @public
371
+ * @override
372
+ */
373
+ proto.wechaty.puppet.CallPayloadRequest.displayName = 'proto.wechaty.puppet.CallPayloadRequest';
374
+ }
375
+ /**
376
+ * Generated by JsPbCodeGenerator.
377
+ * @param {Array=} opt_data Optional initial data array, typically from a
378
+ * server response, or constructed directly in Javascript. The array is used
379
+ * in place and becomes part of the constructed object. It is not cloned.
380
+ * If no data is provided, the constructed object will be empty, but still
381
+ * valid.
382
+ * @extends {jspb.Message}
383
+ * @constructor
384
+ */
385
+ proto.wechaty.puppet.CallPayloadResponse = function(opt_data) {
386
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.CallPayloadResponse.repeatedFields_, null);
387
+ };
388
+ goog.inherits(proto.wechaty.puppet.CallPayloadResponse, jspb.Message);
389
+ if (goog.DEBUG && !COMPILED) {
390
+ /**
391
+ * @public
392
+ * @override
393
+ */
394
+ proto.wechaty.puppet.CallPayloadResponse.displayName = 'proto.wechaty.puppet.CallPayloadResponse';
395
+ }
396
+
397
+ /**
398
+ * List of repeated fields within this message type.
399
+ * @private {!Array<number>}
400
+ * @const
401
+ */
402
+ proto.wechaty.puppet.CallRecordPayload.repeatedFields_ = [2];
403
+
404
+
405
+
406
+ if (jspb.Message.GENERATE_TO_OBJECT) {
407
+ /**
408
+ * Creates an object representation of this proto.
409
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
410
+ * Optional fields that are not set will be set to undefined.
411
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
412
+ * For the list of reserved names please see:
413
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
414
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
415
+ * JSPB instance for transitional soy proto support:
416
+ * http://goto/soy-param-migration
417
+ * @return {!Object}
418
+ */
419
+ proto.wechaty.puppet.CallRecordPayload.prototype.toObject = function(opt_includeInstance) {
420
+ return proto.wechaty.puppet.CallRecordPayload.toObject(opt_includeInstance, this);
421
+ };
422
+
423
+
424
+ /**
425
+ * Static version of the {@see toObject} method.
426
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
427
+ * the JSPB instance for transitional soy proto support:
428
+ * http://goto/soy-param-migration
429
+ * @param {!proto.wechaty.puppet.CallRecordPayload} msg The msg instance to transform.
430
+ * @return {!Object}
431
+ * @suppress {unusedLocalVariables} f is only used for nested messages
432
+ */
433
+ proto.wechaty.puppet.CallRecordPayload.toObject = function(includeInstance, msg) {
434
+ var f, obj = {
435
+ starterId: jspb.Message.getFieldWithDefault(msg, 1, ""),
436
+ participantIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
437
+ length: jspb.Message.getFieldWithDefault(msg, 3, 0),
438
+ type: jspb.Message.getFieldWithDefault(msg, 4, 0),
439
+ status: jspb.Message.getFieldWithDefault(msg, 5, 0)
440
+ };
441
+
442
+ if (includeInstance) {
443
+ obj.$jspbMessageInstance = msg;
444
+ }
445
+ return obj;
446
+ };
447
+ }
448
+
449
+
450
+ /**
451
+ * Deserializes binary data (in protobuf wire format).
452
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
453
+ * @return {!proto.wechaty.puppet.CallRecordPayload}
454
+ */
455
+ proto.wechaty.puppet.CallRecordPayload.deserializeBinary = function(bytes) {
456
+ var reader = new jspb.BinaryReader(bytes);
457
+ var msg = new proto.wechaty.puppet.CallRecordPayload;
458
+ return proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader(msg, reader);
459
+ };
460
+
461
+
462
+ /**
463
+ * Deserializes binary data (in protobuf wire format) from the
464
+ * given reader into the given message object.
465
+ * @param {!proto.wechaty.puppet.CallRecordPayload} msg The message object to deserialize into.
466
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
467
+ * @return {!proto.wechaty.puppet.CallRecordPayload}
468
+ */
469
+ proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader = function(msg, reader) {
470
+ while (reader.nextField()) {
471
+ if (reader.isEndGroup()) {
472
+ break;
473
+ }
474
+ var field = reader.getFieldNumber();
475
+ switch (field) {
476
+ case 1:
477
+ var value = /** @type {string} */ (reader.readString());
478
+ msg.setStarterId(value);
479
+ break;
480
+ case 2:
481
+ var value = /** @type {string} */ (reader.readString());
482
+ msg.addParticipantIds(value);
483
+ break;
484
+ case 3:
485
+ var value = /** @type {number} */ (reader.readInt32());
486
+ msg.setLength(value);
487
+ break;
488
+ case 4:
489
+ var value = /** @type {!proto.wechaty.puppet.CallType} */ (reader.readEnum());
490
+ msg.setType(value);
491
+ break;
492
+ case 5:
493
+ var value = /** @type {!proto.wechaty.puppet.CallStatus} */ (reader.readEnum());
494
+ msg.setStatus(value);
495
+ break;
496
+ default:
497
+ reader.skipField();
498
+ break;
499
+ }
500
+ }
501
+ return msg;
502
+ };
503
+
504
+
505
+ /**
506
+ * Serializes the message to binary data (in protobuf wire format).
507
+ * @return {!Uint8Array}
508
+ */
509
+ proto.wechaty.puppet.CallRecordPayload.prototype.serializeBinary = function() {
510
+ var writer = new jspb.BinaryWriter();
511
+ proto.wechaty.puppet.CallRecordPayload.serializeBinaryToWriter(this, writer);
512
+ return writer.getResultBuffer();
513
+ };
514
+
515
+
516
+ /**
517
+ * Serializes the given message to binary data (in protobuf wire
518
+ * format), writing to the given BinaryWriter.
519
+ * @param {!proto.wechaty.puppet.CallRecordPayload} message
520
+ * @param {!jspb.BinaryWriter} writer
521
+ * @suppress {unusedLocalVariables} f is only used for nested messages
522
+ */
523
+ proto.wechaty.puppet.CallRecordPayload.serializeBinaryToWriter = function(message, writer) {
524
+ var f = undefined;
525
+ f = message.getStarterId();
526
+ if (f.length > 0) {
527
+ writer.writeString(
528
+ 1,
529
+ f
530
+ );
531
+ }
532
+ f = message.getParticipantIdsList();
533
+ if (f.length > 0) {
534
+ writer.writeRepeatedString(
535
+ 2,
536
+ f
537
+ );
538
+ }
539
+ f = message.getLength();
540
+ if (f !== 0) {
541
+ writer.writeInt32(
542
+ 3,
543
+ f
544
+ );
545
+ }
546
+ f = message.getType();
547
+ if (f !== 0.0) {
548
+ writer.writeEnum(
549
+ 4,
550
+ f
551
+ );
552
+ }
553
+ f = message.getStatus();
554
+ if (f !== 0.0) {
555
+ writer.writeEnum(
556
+ 5,
557
+ f
558
+ );
559
+ }
560
+ };
561
+
562
+
563
+ /**
564
+ * optional string starter_id = 1;
565
+ * @return {string}
566
+ */
567
+ proto.wechaty.puppet.CallRecordPayload.prototype.getStarterId = function() {
568
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
569
+ };
570
+
571
+
572
+ /**
573
+ * @param {string} value
574
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
575
+ */
576
+ proto.wechaty.puppet.CallRecordPayload.prototype.setStarterId = function(value) {
577
+ return jspb.Message.setProto3StringField(this, 1, value);
578
+ };
579
+
580
+
581
+ /**
582
+ * repeated string participant_ids = 2;
583
+ * @return {!Array<string>}
584
+ */
585
+ proto.wechaty.puppet.CallRecordPayload.prototype.getParticipantIdsList = function() {
586
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
587
+ };
588
+
589
+
590
+ /**
591
+ * @param {!Array<string>} value
592
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
593
+ */
594
+ proto.wechaty.puppet.CallRecordPayload.prototype.setParticipantIdsList = function(value) {
595
+ return jspb.Message.setField(this, 2, value || []);
596
+ };
597
+
598
+
599
+ /**
600
+ * @param {string} value
601
+ * @param {number=} opt_index
602
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
603
+ */
604
+ proto.wechaty.puppet.CallRecordPayload.prototype.addParticipantIds = function(value, opt_index) {
605
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
606
+ };
607
+
608
+
609
+ /**
610
+ * Clears the list making it empty but non-null.
611
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
612
+ */
613
+ proto.wechaty.puppet.CallRecordPayload.prototype.clearParticipantIdsList = function() {
614
+ return this.setParticipantIdsList([]);
615
+ };
616
+
617
+
618
+ /**
619
+ * optional int32 length = 3;
620
+ * @return {number}
621
+ */
622
+ proto.wechaty.puppet.CallRecordPayload.prototype.getLength = function() {
623
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
624
+ };
625
+
626
+
627
+ /**
628
+ * @param {number} value
629
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
630
+ */
631
+ proto.wechaty.puppet.CallRecordPayload.prototype.setLength = function(value) {
632
+ return jspb.Message.setProto3IntField(this, 3, value);
633
+ };
634
+
635
+
636
+ /**
637
+ * optional CallType type = 4;
638
+ * @return {!proto.wechaty.puppet.CallType}
639
+ */
640
+ proto.wechaty.puppet.CallRecordPayload.prototype.getType = function() {
641
+ return /** @type {!proto.wechaty.puppet.CallType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
642
+ };
643
+
644
+
645
+ /**
646
+ * @param {!proto.wechaty.puppet.CallType} value
647
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
648
+ */
649
+ proto.wechaty.puppet.CallRecordPayload.prototype.setType = function(value) {
650
+ return jspb.Message.setProto3EnumField(this, 4, value);
651
+ };
652
+
653
+
654
+ /**
655
+ * optional CallStatus status = 5;
656
+ * @return {!proto.wechaty.puppet.CallStatus}
657
+ */
658
+ proto.wechaty.puppet.CallRecordPayload.prototype.getStatus = function() {
659
+ return /** @type {!proto.wechaty.puppet.CallStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
660
+ };
661
+
662
+
663
+ /**
664
+ * @param {!proto.wechaty.puppet.CallStatus} value
665
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
666
+ */
667
+ proto.wechaty.puppet.CallRecordPayload.prototype.setStatus = function(value) {
668
+ return jspb.Message.setProto3EnumField(this, 5, value);
669
+ };
670
+
671
+
672
+
673
+ /**
674
+ * List of repeated fields within this message type.
675
+ * @private {!Array<number>}
676
+ * @const
677
+ */
678
+ proto.wechaty.puppet.CallInviteRequest.repeatedFields_ = [1];
679
+
680
+
681
+
682
+ if (jspb.Message.GENERATE_TO_OBJECT) {
683
+ /**
684
+ * Creates an object representation of this proto.
685
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
686
+ * Optional fields that are not set will be set to undefined.
687
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
688
+ * For the list of reserved names please see:
689
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
690
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
691
+ * JSPB instance for transitional soy proto support:
692
+ * http://goto/soy-param-migration
693
+ * @return {!Object}
694
+ */
695
+ proto.wechaty.puppet.CallInviteRequest.prototype.toObject = function(opt_includeInstance) {
696
+ return proto.wechaty.puppet.CallInviteRequest.toObject(opt_includeInstance, this);
697
+ };
698
+
699
+
700
+ /**
701
+ * Static version of the {@see toObject} method.
702
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
703
+ * the JSPB instance for transitional soy proto support:
704
+ * http://goto/soy-param-migration
705
+ * @param {!proto.wechaty.puppet.CallInviteRequest} msg The msg instance to transform.
706
+ * @return {!Object}
707
+ * @suppress {unusedLocalVariables} f is only used for nested messages
708
+ */
709
+ proto.wechaty.puppet.CallInviteRequest.toObject = function(includeInstance, msg) {
710
+ var f, obj = {
711
+ contactIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
712
+ media: jspb.Message.getFieldWithDefault(msg, 2, 0)
713
+ };
714
+
715
+ if (includeInstance) {
716
+ obj.$jspbMessageInstance = msg;
717
+ }
718
+ return obj;
719
+ };
720
+ }
721
+
722
+
723
+ /**
724
+ * Deserializes binary data (in protobuf wire format).
725
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
726
+ * @return {!proto.wechaty.puppet.CallInviteRequest}
727
+ */
728
+ proto.wechaty.puppet.CallInviteRequest.deserializeBinary = function(bytes) {
729
+ var reader = new jspb.BinaryReader(bytes);
730
+ var msg = new proto.wechaty.puppet.CallInviteRequest;
731
+ return proto.wechaty.puppet.CallInviteRequest.deserializeBinaryFromReader(msg, reader);
732
+ };
733
+
734
+
735
+ /**
736
+ * Deserializes binary data (in protobuf wire format) from the
737
+ * given reader into the given message object.
738
+ * @param {!proto.wechaty.puppet.CallInviteRequest} msg The message object to deserialize into.
739
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
740
+ * @return {!proto.wechaty.puppet.CallInviteRequest}
741
+ */
742
+ proto.wechaty.puppet.CallInviteRequest.deserializeBinaryFromReader = function(msg, reader) {
743
+ while (reader.nextField()) {
744
+ if (reader.isEndGroup()) {
745
+ break;
746
+ }
747
+ var field = reader.getFieldNumber();
748
+ switch (field) {
749
+ case 1:
750
+ var value = /** @type {string} */ (reader.readString());
751
+ msg.addContactIds(value);
752
+ break;
753
+ case 2:
754
+ var value = /** @type {!proto.wechaty.puppet.CallType} */ (reader.readEnum());
755
+ msg.setMedia(value);
756
+ break;
757
+ default:
758
+ reader.skipField();
759
+ break;
760
+ }
761
+ }
762
+ return msg;
763
+ };
764
+
765
+
766
+ /**
767
+ * Serializes the message to binary data (in protobuf wire format).
768
+ * @return {!Uint8Array}
769
+ */
770
+ proto.wechaty.puppet.CallInviteRequest.prototype.serializeBinary = function() {
771
+ var writer = new jspb.BinaryWriter();
772
+ proto.wechaty.puppet.CallInviteRequest.serializeBinaryToWriter(this, writer);
773
+ return writer.getResultBuffer();
774
+ };
775
+
776
+
777
+ /**
778
+ * Serializes the given message to binary data (in protobuf wire
779
+ * format), writing to the given BinaryWriter.
780
+ * @param {!proto.wechaty.puppet.CallInviteRequest} message
781
+ * @param {!jspb.BinaryWriter} writer
782
+ * @suppress {unusedLocalVariables} f is only used for nested messages
783
+ */
784
+ proto.wechaty.puppet.CallInviteRequest.serializeBinaryToWriter = function(message, writer) {
785
+ var f = undefined;
786
+ f = message.getContactIdsList();
787
+ if (f.length > 0) {
788
+ writer.writeRepeatedString(
789
+ 1,
790
+ f
791
+ );
792
+ }
793
+ f = message.getMedia();
794
+ if (f !== 0.0) {
795
+ writer.writeEnum(
796
+ 2,
797
+ f
798
+ );
799
+ }
800
+ };
801
+
802
+
803
+ /**
804
+ * repeated string contact_ids = 1;
805
+ * @return {!Array<string>}
806
+ */
807
+ proto.wechaty.puppet.CallInviteRequest.prototype.getContactIdsList = function() {
808
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
809
+ };
810
+
811
+
812
+ /**
813
+ * @param {!Array<string>} value
814
+ * @return {!proto.wechaty.puppet.CallInviteRequest} returns this
815
+ */
816
+ proto.wechaty.puppet.CallInviteRequest.prototype.setContactIdsList = function(value) {
817
+ return jspb.Message.setField(this, 1, value || []);
818
+ };
819
+
820
+
821
+ /**
822
+ * @param {string} value
823
+ * @param {number=} opt_index
824
+ * @return {!proto.wechaty.puppet.CallInviteRequest} returns this
825
+ */
826
+ proto.wechaty.puppet.CallInviteRequest.prototype.addContactIds = function(value, opt_index) {
827
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
828
+ };
829
+
830
+
831
+ /**
832
+ * Clears the list making it empty but non-null.
833
+ * @return {!proto.wechaty.puppet.CallInviteRequest} returns this
834
+ */
835
+ proto.wechaty.puppet.CallInviteRequest.prototype.clearContactIdsList = function() {
836
+ return this.setContactIdsList([]);
837
+ };
838
+
839
+
840
+ /**
841
+ * optional CallType media = 2;
842
+ * @return {!proto.wechaty.puppet.CallType}
843
+ */
844
+ proto.wechaty.puppet.CallInviteRequest.prototype.getMedia = function() {
845
+ return /** @type {!proto.wechaty.puppet.CallType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
846
+ };
847
+
848
+
849
+ /**
850
+ * @param {!proto.wechaty.puppet.CallType} value
851
+ * @return {!proto.wechaty.puppet.CallInviteRequest} returns this
852
+ */
853
+ proto.wechaty.puppet.CallInviteRequest.prototype.setMedia = function(value) {
854
+ return jspb.Message.setProto3EnumField(this, 2, value);
855
+ };
856
+
857
+
858
+
859
+
860
+
861
+ if (jspb.Message.GENERATE_TO_OBJECT) {
862
+ /**
863
+ * Creates an object representation of this proto.
864
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
865
+ * Optional fields that are not set will be set to undefined.
866
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
867
+ * For the list of reserved names please see:
868
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
869
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
870
+ * JSPB instance for transitional soy proto support:
871
+ * http://goto/soy-param-migration
872
+ * @return {!Object}
873
+ */
874
+ proto.wechaty.puppet.CallInviteResponse.prototype.toObject = function(opt_includeInstance) {
875
+ return proto.wechaty.puppet.CallInviteResponse.toObject(opt_includeInstance, this);
876
+ };
877
+
878
+
879
+ /**
880
+ * Static version of the {@see toObject} method.
881
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
882
+ * the JSPB instance for transitional soy proto support:
883
+ * http://goto/soy-param-migration
884
+ * @param {!proto.wechaty.puppet.CallInviteResponse} msg The msg instance to transform.
885
+ * @return {!Object}
886
+ * @suppress {unusedLocalVariables} f is only used for nested messages
887
+ */
888
+ proto.wechaty.puppet.CallInviteResponse.toObject = function(includeInstance, msg) {
889
+ var f, obj = {
890
+ callId: jspb.Message.getFieldWithDefault(msg, 1, "")
891
+ };
892
+
893
+ if (includeInstance) {
894
+ obj.$jspbMessageInstance = msg;
895
+ }
896
+ return obj;
897
+ };
898
+ }
899
+
900
+
901
+ /**
902
+ * Deserializes binary data (in protobuf wire format).
903
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
904
+ * @return {!proto.wechaty.puppet.CallInviteResponse}
905
+ */
906
+ proto.wechaty.puppet.CallInviteResponse.deserializeBinary = function(bytes) {
907
+ var reader = new jspb.BinaryReader(bytes);
908
+ var msg = new proto.wechaty.puppet.CallInviteResponse;
909
+ return proto.wechaty.puppet.CallInviteResponse.deserializeBinaryFromReader(msg, reader);
910
+ };
911
+
912
+
913
+ /**
914
+ * Deserializes binary data (in protobuf wire format) from the
915
+ * given reader into the given message object.
916
+ * @param {!proto.wechaty.puppet.CallInviteResponse} msg The message object to deserialize into.
917
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
918
+ * @return {!proto.wechaty.puppet.CallInviteResponse}
919
+ */
920
+ proto.wechaty.puppet.CallInviteResponse.deserializeBinaryFromReader = function(msg, reader) {
921
+ while (reader.nextField()) {
922
+ if (reader.isEndGroup()) {
923
+ break;
924
+ }
925
+ var field = reader.getFieldNumber();
926
+ switch (field) {
927
+ case 1:
928
+ var value = /** @type {string} */ (reader.readString());
929
+ msg.setCallId(value);
930
+ break;
931
+ default:
932
+ reader.skipField();
933
+ break;
934
+ }
935
+ }
936
+ return msg;
937
+ };
938
+
939
+
940
+ /**
941
+ * Serializes the message to binary data (in protobuf wire format).
942
+ * @return {!Uint8Array}
943
+ */
944
+ proto.wechaty.puppet.CallInviteResponse.prototype.serializeBinary = function() {
945
+ var writer = new jspb.BinaryWriter();
946
+ proto.wechaty.puppet.CallInviteResponse.serializeBinaryToWriter(this, writer);
947
+ return writer.getResultBuffer();
948
+ };
949
+
950
+
951
+ /**
952
+ * Serializes the given message to binary data (in protobuf wire
953
+ * format), writing to the given BinaryWriter.
954
+ * @param {!proto.wechaty.puppet.CallInviteResponse} message
955
+ * @param {!jspb.BinaryWriter} writer
956
+ * @suppress {unusedLocalVariables} f is only used for nested messages
957
+ */
958
+ proto.wechaty.puppet.CallInviteResponse.serializeBinaryToWriter = function(message, writer) {
959
+ var f = undefined;
960
+ f = message.getCallId();
961
+ if (f.length > 0) {
962
+ writer.writeString(
963
+ 1,
964
+ f
965
+ );
966
+ }
967
+ };
968
+
969
+
970
+ /**
971
+ * optional string call_id = 1;
972
+ * @return {string}
973
+ */
974
+ proto.wechaty.puppet.CallInviteResponse.prototype.getCallId = function() {
975
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
976
+ };
977
+
978
+
979
+ /**
980
+ * @param {string} value
981
+ * @return {!proto.wechaty.puppet.CallInviteResponse} returns this
982
+ */
983
+ proto.wechaty.puppet.CallInviteResponse.prototype.setCallId = function(value) {
984
+ return jspb.Message.setProto3StringField(this, 1, value);
985
+ };
986
+
987
+
988
+
989
+ /**
990
+ * List of repeated fields within this message type.
991
+ * @private {!Array<number>}
992
+ * @const
993
+ */
994
+ proto.wechaty.puppet.CallAddRequest.repeatedFields_ = [2];
995
+
996
+
997
+
998
+ if (jspb.Message.GENERATE_TO_OBJECT) {
999
+ /**
1000
+ * Creates an object representation of this proto.
1001
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1002
+ * Optional fields that are not set will be set to undefined.
1003
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1004
+ * For the list of reserved names please see:
1005
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1006
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1007
+ * JSPB instance for transitional soy proto support:
1008
+ * http://goto/soy-param-migration
1009
+ * @return {!Object}
1010
+ */
1011
+ proto.wechaty.puppet.CallAddRequest.prototype.toObject = function(opt_includeInstance) {
1012
+ return proto.wechaty.puppet.CallAddRequest.toObject(opt_includeInstance, this);
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * Static version of the {@see toObject} method.
1018
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1019
+ * the JSPB instance for transitional soy proto support:
1020
+ * http://goto/soy-param-migration
1021
+ * @param {!proto.wechaty.puppet.CallAddRequest} msg The msg instance to transform.
1022
+ * @return {!Object}
1023
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1024
+ */
1025
+ proto.wechaty.puppet.CallAddRequest.toObject = function(includeInstance, msg) {
1026
+ var f, obj = {
1027
+ callId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1028
+ contactIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
1029
+ };
1030
+
1031
+ if (includeInstance) {
1032
+ obj.$jspbMessageInstance = msg;
1033
+ }
1034
+ return obj;
1035
+ };
1036
+ }
1037
+
1038
+
1039
+ /**
1040
+ * Deserializes binary data (in protobuf wire format).
1041
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1042
+ * @return {!proto.wechaty.puppet.CallAddRequest}
1043
+ */
1044
+ proto.wechaty.puppet.CallAddRequest.deserializeBinary = function(bytes) {
1045
+ var reader = new jspb.BinaryReader(bytes);
1046
+ var msg = new proto.wechaty.puppet.CallAddRequest;
1047
+ return proto.wechaty.puppet.CallAddRequest.deserializeBinaryFromReader(msg, reader);
1048
+ };
1049
+
1050
+
1051
+ /**
1052
+ * Deserializes binary data (in protobuf wire format) from the
1053
+ * given reader into the given message object.
1054
+ * @param {!proto.wechaty.puppet.CallAddRequest} msg The message object to deserialize into.
1055
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1056
+ * @return {!proto.wechaty.puppet.CallAddRequest}
1057
+ */
1058
+ proto.wechaty.puppet.CallAddRequest.deserializeBinaryFromReader = function(msg, reader) {
1059
+ while (reader.nextField()) {
1060
+ if (reader.isEndGroup()) {
1061
+ break;
1062
+ }
1063
+ var field = reader.getFieldNumber();
1064
+ switch (field) {
1065
+ case 1:
1066
+ var value = /** @type {string} */ (reader.readString());
1067
+ msg.setCallId(value);
1068
+ break;
1069
+ case 2:
1070
+ var value = /** @type {string} */ (reader.readString());
1071
+ msg.addContactIds(value);
1072
+ break;
1073
+ default:
1074
+ reader.skipField();
1075
+ break;
1076
+ }
1077
+ }
1078
+ return msg;
1079
+ };
1080
+
1081
+
1082
+ /**
1083
+ * Serializes the message to binary data (in protobuf wire format).
1084
+ * @return {!Uint8Array}
1085
+ */
1086
+ proto.wechaty.puppet.CallAddRequest.prototype.serializeBinary = function() {
1087
+ var writer = new jspb.BinaryWriter();
1088
+ proto.wechaty.puppet.CallAddRequest.serializeBinaryToWriter(this, writer);
1089
+ return writer.getResultBuffer();
1090
+ };
1091
+
1092
+
1093
+ /**
1094
+ * Serializes the given message to binary data (in protobuf wire
1095
+ * format), writing to the given BinaryWriter.
1096
+ * @param {!proto.wechaty.puppet.CallAddRequest} message
1097
+ * @param {!jspb.BinaryWriter} writer
1098
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1099
+ */
1100
+ proto.wechaty.puppet.CallAddRequest.serializeBinaryToWriter = function(message, writer) {
1101
+ var f = undefined;
1102
+ f = message.getCallId();
1103
+ if (f.length > 0) {
1104
+ writer.writeString(
1105
+ 1,
1106
+ f
1107
+ );
1108
+ }
1109
+ f = message.getContactIdsList();
1110
+ if (f.length > 0) {
1111
+ writer.writeRepeatedString(
1112
+ 2,
1113
+ f
1114
+ );
1115
+ }
1116
+ };
1117
+
1118
+
1119
+ /**
1120
+ * optional string call_id = 1;
1121
+ * @return {string}
1122
+ */
1123
+ proto.wechaty.puppet.CallAddRequest.prototype.getCallId = function() {
1124
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1125
+ };
1126
+
1127
+
1128
+ /**
1129
+ * @param {string} value
1130
+ * @return {!proto.wechaty.puppet.CallAddRequest} returns this
1131
+ */
1132
+ proto.wechaty.puppet.CallAddRequest.prototype.setCallId = function(value) {
1133
+ return jspb.Message.setProto3StringField(this, 1, value);
1134
+ };
1135
+
1136
+
1137
+ /**
1138
+ * repeated string contact_ids = 2;
1139
+ * @return {!Array<string>}
1140
+ */
1141
+ proto.wechaty.puppet.CallAddRequest.prototype.getContactIdsList = function() {
1142
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
1143
+ };
1144
+
1145
+
1146
+ /**
1147
+ * @param {!Array<string>} value
1148
+ * @return {!proto.wechaty.puppet.CallAddRequest} returns this
1149
+ */
1150
+ proto.wechaty.puppet.CallAddRequest.prototype.setContactIdsList = function(value) {
1151
+ return jspb.Message.setField(this, 2, value || []);
1152
+ };
1153
+
1154
+
1155
+ /**
1156
+ * @param {string} value
1157
+ * @param {number=} opt_index
1158
+ * @return {!proto.wechaty.puppet.CallAddRequest} returns this
1159
+ */
1160
+ proto.wechaty.puppet.CallAddRequest.prototype.addContactIds = function(value, opt_index) {
1161
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1162
+ };
1163
+
1164
+
1165
+ /**
1166
+ * Clears the list making it empty but non-null.
1167
+ * @return {!proto.wechaty.puppet.CallAddRequest} returns this
1168
+ */
1169
+ proto.wechaty.puppet.CallAddRequest.prototype.clearContactIdsList = function() {
1170
+ return this.setContactIdsList([]);
1171
+ };
1172
+
1173
+
1174
+
1175
+
1176
+
1177
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1178
+ /**
1179
+ * Creates an object representation of this proto.
1180
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1181
+ * Optional fields that are not set will be set to undefined.
1182
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1183
+ * For the list of reserved names please see:
1184
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1185
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1186
+ * JSPB instance for transitional soy proto support:
1187
+ * http://goto/soy-param-migration
1188
+ * @return {!Object}
1189
+ */
1190
+ proto.wechaty.puppet.CallAddResponse.prototype.toObject = function(opt_includeInstance) {
1191
+ return proto.wechaty.puppet.CallAddResponse.toObject(opt_includeInstance, this);
1192
+ };
1193
+
1194
+
1195
+ /**
1196
+ * Static version of the {@see toObject} method.
1197
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1198
+ * the JSPB instance for transitional soy proto support:
1199
+ * http://goto/soy-param-migration
1200
+ * @param {!proto.wechaty.puppet.CallAddResponse} msg The msg instance to transform.
1201
+ * @return {!Object}
1202
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1203
+ */
1204
+ proto.wechaty.puppet.CallAddResponse.toObject = function(includeInstance, msg) {
1205
+ var f, obj = {
1206
+
1207
+ };
1208
+
1209
+ if (includeInstance) {
1210
+ obj.$jspbMessageInstance = msg;
1211
+ }
1212
+ return obj;
1213
+ };
1214
+ }
1215
+
1216
+
1217
+ /**
1218
+ * Deserializes binary data (in protobuf wire format).
1219
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1220
+ * @return {!proto.wechaty.puppet.CallAddResponse}
1221
+ */
1222
+ proto.wechaty.puppet.CallAddResponse.deserializeBinary = function(bytes) {
1223
+ var reader = new jspb.BinaryReader(bytes);
1224
+ var msg = new proto.wechaty.puppet.CallAddResponse;
1225
+ return proto.wechaty.puppet.CallAddResponse.deserializeBinaryFromReader(msg, reader);
1226
+ };
1227
+
1228
+
1229
+ /**
1230
+ * Deserializes binary data (in protobuf wire format) from the
1231
+ * given reader into the given message object.
1232
+ * @param {!proto.wechaty.puppet.CallAddResponse} msg The message object to deserialize into.
1233
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1234
+ * @return {!proto.wechaty.puppet.CallAddResponse}
1235
+ */
1236
+ proto.wechaty.puppet.CallAddResponse.deserializeBinaryFromReader = function(msg, reader) {
1237
+ while (reader.nextField()) {
1238
+ if (reader.isEndGroup()) {
1239
+ break;
1240
+ }
1241
+ var field = reader.getFieldNumber();
1242
+ switch (field) {
1243
+ default:
1244
+ reader.skipField();
1245
+ break;
1246
+ }
1247
+ }
1248
+ return msg;
1249
+ };
1250
+
1251
+
1252
+ /**
1253
+ * Serializes the message to binary data (in protobuf wire format).
1254
+ * @return {!Uint8Array}
1255
+ */
1256
+ proto.wechaty.puppet.CallAddResponse.prototype.serializeBinary = function() {
1257
+ var writer = new jspb.BinaryWriter();
1258
+ proto.wechaty.puppet.CallAddResponse.serializeBinaryToWriter(this, writer);
1259
+ return writer.getResultBuffer();
1260
+ };
1261
+
1262
+
1263
+ /**
1264
+ * Serializes the given message to binary data (in protobuf wire
1265
+ * format), writing to the given BinaryWriter.
1266
+ * @param {!proto.wechaty.puppet.CallAddResponse} message
1267
+ * @param {!jspb.BinaryWriter} writer
1268
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1269
+ */
1270
+ proto.wechaty.puppet.CallAddResponse.serializeBinaryToWriter = function(message, writer) {
1271
+ var f = undefined;
1272
+ };
1273
+
1274
+
1275
+
1276
+
1277
+
1278
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1279
+ /**
1280
+ * Creates an object representation of this proto.
1281
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1282
+ * Optional fields that are not set will be set to undefined.
1283
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1284
+ * For the list of reserved names please see:
1285
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1286
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1287
+ * JSPB instance for transitional soy proto support:
1288
+ * http://goto/soy-param-migration
1289
+ * @return {!Object}
1290
+ */
1291
+ proto.wechaty.puppet.CallAcceptRequest.prototype.toObject = function(opt_includeInstance) {
1292
+ return proto.wechaty.puppet.CallAcceptRequest.toObject(opt_includeInstance, this);
1293
+ };
1294
+
1295
+
1296
+ /**
1297
+ * Static version of the {@see toObject} method.
1298
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1299
+ * the JSPB instance for transitional soy proto support:
1300
+ * http://goto/soy-param-migration
1301
+ * @param {!proto.wechaty.puppet.CallAcceptRequest} msg The msg instance to transform.
1302
+ * @return {!Object}
1303
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1304
+ */
1305
+ proto.wechaty.puppet.CallAcceptRequest.toObject = function(includeInstance, msg) {
1306
+ var f, obj = {
1307
+ callId: jspb.Message.getFieldWithDefault(msg, 1, "")
1308
+ };
1309
+
1310
+ if (includeInstance) {
1311
+ obj.$jspbMessageInstance = msg;
1312
+ }
1313
+ return obj;
1314
+ };
1315
+ }
1316
+
1317
+
1318
+ /**
1319
+ * Deserializes binary data (in protobuf wire format).
1320
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1321
+ * @return {!proto.wechaty.puppet.CallAcceptRequest}
1322
+ */
1323
+ proto.wechaty.puppet.CallAcceptRequest.deserializeBinary = function(bytes) {
1324
+ var reader = new jspb.BinaryReader(bytes);
1325
+ var msg = new proto.wechaty.puppet.CallAcceptRequest;
1326
+ return proto.wechaty.puppet.CallAcceptRequest.deserializeBinaryFromReader(msg, reader);
1327
+ };
1328
+
1329
+
1330
+ /**
1331
+ * Deserializes binary data (in protobuf wire format) from the
1332
+ * given reader into the given message object.
1333
+ * @param {!proto.wechaty.puppet.CallAcceptRequest} msg The message object to deserialize into.
1334
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1335
+ * @return {!proto.wechaty.puppet.CallAcceptRequest}
1336
+ */
1337
+ proto.wechaty.puppet.CallAcceptRequest.deserializeBinaryFromReader = function(msg, reader) {
1338
+ while (reader.nextField()) {
1339
+ if (reader.isEndGroup()) {
1340
+ break;
1341
+ }
1342
+ var field = reader.getFieldNumber();
1343
+ switch (field) {
1344
+ case 1:
1345
+ var value = /** @type {string} */ (reader.readString());
1346
+ msg.setCallId(value);
1347
+ break;
1348
+ default:
1349
+ reader.skipField();
1350
+ break;
1351
+ }
1352
+ }
1353
+ return msg;
1354
+ };
1355
+
1356
+
1357
+ /**
1358
+ * Serializes the message to binary data (in protobuf wire format).
1359
+ * @return {!Uint8Array}
1360
+ */
1361
+ proto.wechaty.puppet.CallAcceptRequest.prototype.serializeBinary = function() {
1362
+ var writer = new jspb.BinaryWriter();
1363
+ proto.wechaty.puppet.CallAcceptRequest.serializeBinaryToWriter(this, writer);
1364
+ return writer.getResultBuffer();
1365
+ };
1366
+
1367
+
1368
+ /**
1369
+ * Serializes the given message to binary data (in protobuf wire
1370
+ * format), writing to the given BinaryWriter.
1371
+ * @param {!proto.wechaty.puppet.CallAcceptRequest} message
1372
+ * @param {!jspb.BinaryWriter} writer
1373
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1374
+ */
1375
+ proto.wechaty.puppet.CallAcceptRequest.serializeBinaryToWriter = function(message, writer) {
1376
+ var f = undefined;
1377
+ f = message.getCallId();
1378
+ if (f.length > 0) {
1379
+ writer.writeString(
1380
+ 1,
1381
+ f
1382
+ );
1383
+ }
1384
+ };
1385
+
1386
+
1387
+ /**
1388
+ * optional string call_id = 1;
1389
+ * @return {string}
1390
+ */
1391
+ proto.wechaty.puppet.CallAcceptRequest.prototype.getCallId = function() {
1392
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1393
+ };
1394
+
1395
+
1396
+ /**
1397
+ * @param {string} value
1398
+ * @return {!proto.wechaty.puppet.CallAcceptRequest} returns this
1399
+ */
1400
+ proto.wechaty.puppet.CallAcceptRequest.prototype.setCallId = function(value) {
1401
+ return jspb.Message.setProto3StringField(this, 1, value);
1402
+ };
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1409
+ /**
1410
+ * Creates an object representation of this proto.
1411
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1412
+ * Optional fields that are not set will be set to undefined.
1413
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1414
+ * For the list of reserved names please see:
1415
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1416
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1417
+ * JSPB instance for transitional soy proto support:
1418
+ * http://goto/soy-param-migration
1419
+ * @return {!Object}
1420
+ */
1421
+ proto.wechaty.puppet.CallAcceptResponse.prototype.toObject = function(opt_includeInstance) {
1422
+ return proto.wechaty.puppet.CallAcceptResponse.toObject(opt_includeInstance, this);
1423
+ };
1424
+
1425
+
1426
+ /**
1427
+ * Static version of the {@see toObject} method.
1428
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1429
+ * the JSPB instance for transitional soy proto support:
1430
+ * http://goto/soy-param-migration
1431
+ * @param {!proto.wechaty.puppet.CallAcceptResponse} msg The msg instance to transform.
1432
+ * @return {!Object}
1433
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1434
+ */
1435
+ proto.wechaty.puppet.CallAcceptResponse.toObject = function(includeInstance, msg) {
1436
+ var f, obj = {
1437
+
1438
+ };
1439
+
1440
+ if (includeInstance) {
1441
+ obj.$jspbMessageInstance = msg;
1442
+ }
1443
+ return obj;
1444
+ };
1445
+ }
1446
+
1447
+
1448
+ /**
1449
+ * Deserializes binary data (in protobuf wire format).
1450
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1451
+ * @return {!proto.wechaty.puppet.CallAcceptResponse}
1452
+ */
1453
+ proto.wechaty.puppet.CallAcceptResponse.deserializeBinary = function(bytes) {
1454
+ var reader = new jspb.BinaryReader(bytes);
1455
+ var msg = new proto.wechaty.puppet.CallAcceptResponse;
1456
+ return proto.wechaty.puppet.CallAcceptResponse.deserializeBinaryFromReader(msg, reader);
1457
+ };
1458
+
1459
+
1460
+ /**
1461
+ * Deserializes binary data (in protobuf wire format) from the
1462
+ * given reader into the given message object.
1463
+ * @param {!proto.wechaty.puppet.CallAcceptResponse} msg The message object to deserialize into.
1464
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1465
+ * @return {!proto.wechaty.puppet.CallAcceptResponse}
1466
+ */
1467
+ proto.wechaty.puppet.CallAcceptResponse.deserializeBinaryFromReader = function(msg, reader) {
1468
+ while (reader.nextField()) {
1469
+ if (reader.isEndGroup()) {
1470
+ break;
1471
+ }
1472
+ var field = reader.getFieldNumber();
1473
+ switch (field) {
1474
+ default:
1475
+ reader.skipField();
1476
+ break;
1477
+ }
1478
+ }
1479
+ return msg;
1480
+ };
1481
+
1482
+
1483
+ /**
1484
+ * Serializes the message to binary data (in protobuf wire format).
1485
+ * @return {!Uint8Array}
1486
+ */
1487
+ proto.wechaty.puppet.CallAcceptResponse.prototype.serializeBinary = function() {
1488
+ var writer = new jspb.BinaryWriter();
1489
+ proto.wechaty.puppet.CallAcceptResponse.serializeBinaryToWriter(this, writer);
1490
+ return writer.getResultBuffer();
1491
+ };
1492
+
1493
+
1494
+ /**
1495
+ * Serializes the given message to binary data (in protobuf wire
1496
+ * format), writing to the given BinaryWriter.
1497
+ * @param {!proto.wechaty.puppet.CallAcceptResponse} message
1498
+ * @param {!jspb.BinaryWriter} writer
1499
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1500
+ */
1501
+ proto.wechaty.puppet.CallAcceptResponse.serializeBinaryToWriter = function(message, writer) {
1502
+ var f = undefined;
1503
+ };
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1510
+ /**
1511
+ * Creates an object representation of this proto.
1512
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1513
+ * Optional fields that are not set will be set to undefined.
1514
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1515
+ * For the list of reserved names please see:
1516
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1517
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1518
+ * JSPB instance for transitional soy proto support:
1519
+ * http://goto/soy-param-migration
1520
+ * @return {!Object}
1521
+ */
1522
+ proto.wechaty.puppet.CallRejectRequest.prototype.toObject = function(opt_includeInstance) {
1523
+ return proto.wechaty.puppet.CallRejectRequest.toObject(opt_includeInstance, this);
1524
+ };
1525
+
1526
+
1527
+ /**
1528
+ * Static version of the {@see toObject} method.
1529
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1530
+ * the JSPB instance for transitional soy proto support:
1531
+ * http://goto/soy-param-migration
1532
+ * @param {!proto.wechaty.puppet.CallRejectRequest} msg The msg instance to transform.
1533
+ * @return {!Object}
1534
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1535
+ */
1536
+ proto.wechaty.puppet.CallRejectRequest.toObject = function(includeInstance, msg) {
1537
+ var f, obj = {
1538
+ callId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1539
+ reason: jspb.Message.getFieldWithDefault(msg, 2, "")
1540
+ };
1541
+
1542
+ if (includeInstance) {
1543
+ obj.$jspbMessageInstance = msg;
1544
+ }
1545
+ return obj;
1546
+ };
1547
+ }
1548
+
1549
+
1550
+ /**
1551
+ * Deserializes binary data (in protobuf wire format).
1552
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1553
+ * @return {!proto.wechaty.puppet.CallRejectRequest}
1554
+ */
1555
+ proto.wechaty.puppet.CallRejectRequest.deserializeBinary = function(bytes) {
1556
+ var reader = new jspb.BinaryReader(bytes);
1557
+ var msg = new proto.wechaty.puppet.CallRejectRequest;
1558
+ return proto.wechaty.puppet.CallRejectRequest.deserializeBinaryFromReader(msg, reader);
1559
+ };
1560
+
1561
+
1562
+ /**
1563
+ * Deserializes binary data (in protobuf wire format) from the
1564
+ * given reader into the given message object.
1565
+ * @param {!proto.wechaty.puppet.CallRejectRequest} msg The message object to deserialize into.
1566
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1567
+ * @return {!proto.wechaty.puppet.CallRejectRequest}
1568
+ */
1569
+ proto.wechaty.puppet.CallRejectRequest.deserializeBinaryFromReader = function(msg, reader) {
1570
+ while (reader.nextField()) {
1571
+ if (reader.isEndGroup()) {
1572
+ break;
1573
+ }
1574
+ var field = reader.getFieldNumber();
1575
+ switch (field) {
1576
+ case 1:
1577
+ var value = /** @type {string} */ (reader.readString());
1578
+ msg.setCallId(value);
1579
+ break;
1580
+ case 2:
1581
+ var value = /** @type {string} */ (reader.readString());
1582
+ msg.setReason(value);
1583
+ break;
1584
+ default:
1585
+ reader.skipField();
1586
+ break;
1587
+ }
1588
+ }
1589
+ return msg;
1590
+ };
1591
+
1592
+
1593
+ /**
1594
+ * Serializes the message to binary data (in protobuf wire format).
1595
+ * @return {!Uint8Array}
1596
+ */
1597
+ proto.wechaty.puppet.CallRejectRequest.prototype.serializeBinary = function() {
1598
+ var writer = new jspb.BinaryWriter();
1599
+ proto.wechaty.puppet.CallRejectRequest.serializeBinaryToWriter(this, writer);
1600
+ return writer.getResultBuffer();
1601
+ };
1602
+
1603
+
1604
+ /**
1605
+ * Serializes the given message to binary data (in protobuf wire
1606
+ * format), writing to the given BinaryWriter.
1607
+ * @param {!proto.wechaty.puppet.CallRejectRequest} message
1608
+ * @param {!jspb.BinaryWriter} writer
1609
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1610
+ */
1611
+ proto.wechaty.puppet.CallRejectRequest.serializeBinaryToWriter = function(message, writer) {
1612
+ var f = undefined;
1613
+ f = message.getCallId();
1614
+ if (f.length > 0) {
1615
+ writer.writeString(
1616
+ 1,
1617
+ f
1618
+ );
1619
+ }
1620
+ f = message.getReason();
1621
+ if (f.length > 0) {
1622
+ writer.writeString(
1623
+ 2,
1624
+ f
1625
+ );
1626
+ }
1627
+ };
1628
+
1629
+
1630
+ /**
1631
+ * optional string call_id = 1;
1632
+ * @return {string}
1633
+ */
1634
+ proto.wechaty.puppet.CallRejectRequest.prototype.getCallId = function() {
1635
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1636
+ };
1637
+
1638
+
1639
+ /**
1640
+ * @param {string} value
1641
+ * @return {!proto.wechaty.puppet.CallRejectRequest} returns this
1642
+ */
1643
+ proto.wechaty.puppet.CallRejectRequest.prototype.setCallId = function(value) {
1644
+ return jspb.Message.setProto3StringField(this, 1, value);
1645
+ };
1646
+
1647
+
1648
+ /**
1649
+ * optional string reason = 2;
1650
+ * @return {string}
1651
+ */
1652
+ proto.wechaty.puppet.CallRejectRequest.prototype.getReason = function() {
1653
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1654
+ };
1655
+
1656
+
1657
+ /**
1658
+ * @param {string} value
1659
+ * @return {!proto.wechaty.puppet.CallRejectRequest} returns this
1660
+ */
1661
+ proto.wechaty.puppet.CallRejectRequest.prototype.setReason = function(value) {
1662
+ return jspb.Message.setProto3StringField(this, 2, value);
1663
+ };
1664
+
1665
+
1666
+
1667
+
1668
+
1669
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1670
+ /**
1671
+ * Creates an object representation of this proto.
1672
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1673
+ * Optional fields that are not set will be set to undefined.
1674
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1675
+ * For the list of reserved names please see:
1676
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1677
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1678
+ * JSPB instance for transitional soy proto support:
1679
+ * http://goto/soy-param-migration
1680
+ * @return {!Object}
1681
+ */
1682
+ proto.wechaty.puppet.CallRejectResponse.prototype.toObject = function(opt_includeInstance) {
1683
+ return proto.wechaty.puppet.CallRejectResponse.toObject(opt_includeInstance, this);
1684
+ };
1685
+
1686
+
1687
+ /**
1688
+ * Static version of the {@see toObject} method.
1689
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1690
+ * the JSPB instance for transitional soy proto support:
1691
+ * http://goto/soy-param-migration
1692
+ * @param {!proto.wechaty.puppet.CallRejectResponse} msg The msg instance to transform.
1693
+ * @return {!Object}
1694
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1695
+ */
1696
+ proto.wechaty.puppet.CallRejectResponse.toObject = function(includeInstance, msg) {
1697
+ var f, obj = {
1698
+
1699
+ };
1700
+
1701
+ if (includeInstance) {
1702
+ obj.$jspbMessageInstance = msg;
1703
+ }
1704
+ return obj;
1705
+ };
1706
+ }
1707
+
1708
+
1709
+ /**
1710
+ * Deserializes binary data (in protobuf wire format).
1711
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1712
+ * @return {!proto.wechaty.puppet.CallRejectResponse}
1713
+ */
1714
+ proto.wechaty.puppet.CallRejectResponse.deserializeBinary = function(bytes) {
1715
+ var reader = new jspb.BinaryReader(bytes);
1716
+ var msg = new proto.wechaty.puppet.CallRejectResponse;
1717
+ return proto.wechaty.puppet.CallRejectResponse.deserializeBinaryFromReader(msg, reader);
1718
+ };
1719
+
1720
+
1721
+ /**
1722
+ * Deserializes binary data (in protobuf wire format) from the
1723
+ * given reader into the given message object.
1724
+ * @param {!proto.wechaty.puppet.CallRejectResponse} msg The message object to deserialize into.
1725
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1726
+ * @return {!proto.wechaty.puppet.CallRejectResponse}
1727
+ */
1728
+ proto.wechaty.puppet.CallRejectResponse.deserializeBinaryFromReader = function(msg, reader) {
1729
+ while (reader.nextField()) {
1730
+ if (reader.isEndGroup()) {
1731
+ break;
1732
+ }
1733
+ var field = reader.getFieldNumber();
1734
+ switch (field) {
1735
+ default:
1736
+ reader.skipField();
1737
+ break;
1738
+ }
1739
+ }
1740
+ return msg;
1741
+ };
1742
+
1743
+
1744
+ /**
1745
+ * Serializes the message to binary data (in protobuf wire format).
1746
+ * @return {!Uint8Array}
1747
+ */
1748
+ proto.wechaty.puppet.CallRejectResponse.prototype.serializeBinary = function() {
1749
+ var writer = new jspb.BinaryWriter();
1750
+ proto.wechaty.puppet.CallRejectResponse.serializeBinaryToWriter(this, writer);
1751
+ return writer.getResultBuffer();
1752
+ };
1753
+
1754
+
1755
+ /**
1756
+ * Serializes the given message to binary data (in protobuf wire
1757
+ * format), writing to the given BinaryWriter.
1758
+ * @param {!proto.wechaty.puppet.CallRejectResponse} message
1759
+ * @param {!jspb.BinaryWriter} writer
1760
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1761
+ */
1762
+ proto.wechaty.puppet.CallRejectResponse.serializeBinaryToWriter = function(message, writer) {
1763
+ var f = undefined;
1764
+ };
1765
+
1766
+
1767
+
1768
+
1769
+
1770
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1771
+ /**
1772
+ * Creates an object representation of this proto.
1773
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1774
+ * Optional fields that are not set will be set to undefined.
1775
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1776
+ * For the list of reserved names please see:
1777
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1778
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1779
+ * JSPB instance for transitional soy proto support:
1780
+ * http://goto/soy-param-migration
1781
+ * @return {!Object}
1782
+ */
1783
+ proto.wechaty.puppet.CallCancelRequest.prototype.toObject = function(opt_includeInstance) {
1784
+ return proto.wechaty.puppet.CallCancelRequest.toObject(opt_includeInstance, this);
1785
+ };
1786
+
1787
+
1788
+ /**
1789
+ * Static version of the {@see toObject} method.
1790
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1791
+ * the JSPB instance for transitional soy proto support:
1792
+ * http://goto/soy-param-migration
1793
+ * @param {!proto.wechaty.puppet.CallCancelRequest} msg The msg instance to transform.
1794
+ * @return {!Object}
1795
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1796
+ */
1797
+ proto.wechaty.puppet.CallCancelRequest.toObject = function(includeInstance, msg) {
1798
+ var f, obj = {
1799
+ callId: jspb.Message.getFieldWithDefault(msg, 1, "")
1800
+ };
1801
+
1802
+ if (includeInstance) {
1803
+ obj.$jspbMessageInstance = msg;
1804
+ }
1805
+ return obj;
1806
+ };
1807
+ }
1808
+
1809
+
1810
+ /**
1811
+ * Deserializes binary data (in protobuf wire format).
1812
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1813
+ * @return {!proto.wechaty.puppet.CallCancelRequest}
1814
+ */
1815
+ proto.wechaty.puppet.CallCancelRequest.deserializeBinary = function(bytes) {
1816
+ var reader = new jspb.BinaryReader(bytes);
1817
+ var msg = new proto.wechaty.puppet.CallCancelRequest;
1818
+ return proto.wechaty.puppet.CallCancelRequest.deserializeBinaryFromReader(msg, reader);
1819
+ };
1820
+
1821
+
1822
+ /**
1823
+ * Deserializes binary data (in protobuf wire format) from the
1824
+ * given reader into the given message object.
1825
+ * @param {!proto.wechaty.puppet.CallCancelRequest} msg The message object to deserialize into.
1826
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1827
+ * @return {!proto.wechaty.puppet.CallCancelRequest}
1828
+ */
1829
+ proto.wechaty.puppet.CallCancelRequest.deserializeBinaryFromReader = function(msg, reader) {
1830
+ while (reader.nextField()) {
1831
+ if (reader.isEndGroup()) {
1832
+ break;
1833
+ }
1834
+ var field = reader.getFieldNumber();
1835
+ switch (field) {
1836
+ case 1:
1837
+ var value = /** @type {string} */ (reader.readString());
1838
+ msg.setCallId(value);
1839
+ break;
1840
+ default:
1841
+ reader.skipField();
1842
+ break;
1843
+ }
1844
+ }
1845
+ return msg;
1846
+ };
1847
+
1848
+
1849
+ /**
1850
+ * Serializes the message to binary data (in protobuf wire format).
1851
+ * @return {!Uint8Array}
1852
+ */
1853
+ proto.wechaty.puppet.CallCancelRequest.prototype.serializeBinary = function() {
1854
+ var writer = new jspb.BinaryWriter();
1855
+ proto.wechaty.puppet.CallCancelRequest.serializeBinaryToWriter(this, writer);
1856
+ return writer.getResultBuffer();
1857
+ };
1858
+
1859
+
1860
+ /**
1861
+ * Serializes the given message to binary data (in protobuf wire
1862
+ * format), writing to the given BinaryWriter.
1863
+ * @param {!proto.wechaty.puppet.CallCancelRequest} message
1864
+ * @param {!jspb.BinaryWriter} writer
1865
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1866
+ */
1867
+ proto.wechaty.puppet.CallCancelRequest.serializeBinaryToWriter = function(message, writer) {
1868
+ var f = undefined;
1869
+ f = message.getCallId();
1870
+ if (f.length > 0) {
1871
+ writer.writeString(
1872
+ 1,
1873
+ f
1874
+ );
1875
+ }
1876
+ };
1877
+
1878
+
1879
+ /**
1880
+ * optional string call_id = 1;
1881
+ * @return {string}
1882
+ */
1883
+ proto.wechaty.puppet.CallCancelRequest.prototype.getCallId = function() {
1884
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1885
+ };
1886
+
1887
+
1888
+ /**
1889
+ * @param {string} value
1890
+ * @return {!proto.wechaty.puppet.CallCancelRequest} returns this
1891
+ */
1892
+ proto.wechaty.puppet.CallCancelRequest.prototype.setCallId = function(value) {
1893
+ return jspb.Message.setProto3StringField(this, 1, value);
1894
+ };
1895
+
1896
+
1897
+
1898
+
1899
+
1900
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1901
+ /**
1902
+ * Creates an object representation of this proto.
1903
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1904
+ * Optional fields that are not set will be set to undefined.
1905
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1906
+ * For the list of reserved names please see:
1907
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1908
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1909
+ * JSPB instance for transitional soy proto support:
1910
+ * http://goto/soy-param-migration
1911
+ * @return {!Object}
1912
+ */
1913
+ proto.wechaty.puppet.CallCancelResponse.prototype.toObject = function(opt_includeInstance) {
1914
+ return proto.wechaty.puppet.CallCancelResponse.toObject(opt_includeInstance, this);
1915
+ };
1916
+
1917
+
1918
+ /**
1919
+ * Static version of the {@see toObject} method.
1920
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1921
+ * the JSPB instance for transitional soy proto support:
1922
+ * http://goto/soy-param-migration
1923
+ * @param {!proto.wechaty.puppet.CallCancelResponse} msg The msg instance to transform.
1924
+ * @return {!Object}
1925
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1926
+ */
1927
+ proto.wechaty.puppet.CallCancelResponse.toObject = function(includeInstance, msg) {
1928
+ var f, obj = {
1929
+
1930
+ };
1931
+
1932
+ if (includeInstance) {
1933
+ obj.$jspbMessageInstance = msg;
1934
+ }
1935
+ return obj;
1936
+ };
1937
+ }
1938
+
1939
+
1940
+ /**
1941
+ * Deserializes binary data (in protobuf wire format).
1942
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1943
+ * @return {!proto.wechaty.puppet.CallCancelResponse}
1944
+ */
1945
+ proto.wechaty.puppet.CallCancelResponse.deserializeBinary = function(bytes) {
1946
+ var reader = new jspb.BinaryReader(bytes);
1947
+ var msg = new proto.wechaty.puppet.CallCancelResponse;
1948
+ return proto.wechaty.puppet.CallCancelResponse.deserializeBinaryFromReader(msg, reader);
1949
+ };
1950
+
1951
+
1952
+ /**
1953
+ * Deserializes binary data (in protobuf wire format) from the
1954
+ * given reader into the given message object.
1955
+ * @param {!proto.wechaty.puppet.CallCancelResponse} msg The message object to deserialize into.
1956
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1957
+ * @return {!proto.wechaty.puppet.CallCancelResponse}
1958
+ */
1959
+ proto.wechaty.puppet.CallCancelResponse.deserializeBinaryFromReader = function(msg, reader) {
1960
+ while (reader.nextField()) {
1961
+ if (reader.isEndGroup()) {
1962
+ break;
1963
+ }
1964
+ var field = reader.getFieldNumber();
1965
+ switch (field) {
1966
+ default:
1967
+ reader.skipField();
1968
+ break;
1969
+ }
1970
+ }
1971
+ return msg;
1972
+ };
1973
+
1974
+
1975
+ /**
1976
+ * Serializes the message to binary data (in protobuf wire format).
1977
+ * @return {!Uint8Array}
1978
+ */
1979
+ proto.wechaty.puppet.CallCancelResponse.prototype.serializeBinary = function() {
1980
+ var writer = new jspb.BinaryWriter();
1981
+ proto.wechaty.puppet.CallCancelResponse.serializeBinaryToWriter(this, writer);
1982
+ return writer.getResultBuffer();
1983
+ };
1984
+
1985
+
1986
+ /**
1987
+ * Serializes the given message to binary data (in protobuf wire
1988
+ * format), writing to the given BinaryWriter.
1989
+ * @param {!proto.wechaty.puppet.CallCancelResponse} message
1990
+ * @param {!jspb.BinaryWriter} writer
1991
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1992
+ */
1993
+ proto.wechaty.puppet.CallCancelResponse.serializeBinaryToWriter = function(message, writer) {
1994
+ var f = undefined;
1995
+ };
1996
+
1997
+
1998
+
1999
+
2000
+
2001
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2002
+ /**
2003
+ * Creates an object representation of this proto.
2004
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2005
+ * Optional fields that are not set will be set to undefined.
2006
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2007
+ * For the list of reserved names please see:
2008
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2009
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2010
+ * JSPB instance for transitional soy proto support:
2011
+ * http://goto/soy-param-migration
2012
+ * @return {!Object}
2013
+ */
2014
+ proto.wechaty.puppet.CallHangupRequest.prototype.toObject = function(opt_includeInstance) {
2015
+ return proto.wechaty.puppet.CallHangupRequest.toObject(opt_includeInstance, this);
2016
+ };
2017
+
2018
+
2019
+ /**
2020
+ * Static version of the {@see toObject} method.
2021
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2022
+ * the JSPB instance for transitional soy proto support:
2023
+ * http://goto/soy-param-migration
2024
+ * @param {!proto.wechaty.puppet.CallHangupRequest} msg The msg instance to transform.
2025
+ * @return {!Object}
2026
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2027
+ */
2028
+ proto.wechaty.puppet.CallHangupRequest.toObject = function(includeInstance, msg) {
2029
+ var f, obj = {
2030
+ callId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2031
+ reason: jspb.Message.getFieldWithDefault(msg, 2, "")
2032
+ };
2033
+
2034
+ if (includeInstance) {
2035
+ obj.$jspbMessageInstance = msg;
2036
+ }
2037
+ return obj;
2038
+ };
2039
+ }
2040
+
2041
+
2042
+ /**
2043
+ * Deserializes binary data (in protobuf wire format).
2044
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2045
+ * @return {!proto.wechaty.puppet.CallHangupRequest}
2046
+ */
2047
+ proto.wechaty.puppet.CallHangupRequest.deserializeBinary = function(bytes) {
2048
+ var reader = new jspb.BinaryReader(bytes);
2049
+ var msg = new proto.wechaty.puppet.CallHangupRequest;
2050
+ return proto.wechaty.puppet.CallHangupRequest.deserializeBinaryFromReader(msg, reader);
2051
+ };
2052
+
2053
+
2054
+ /**
2055
+ * Deserializes binary data (in protobuf wire format) from the
2056
+ * given reader into the given message object.
2057
+ * @param {!proto.wechaty.puppet.CallHangupRequest} msg The message object to deserialize into.
2058
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2059
+ * @return {!proto.wechaty.puppet.CallHangupRequest}
2060
+ */
2061
+ proto.wechaty.puppet.CallHangupRequest.deserializeBinaryFromReader = function(msg, reader) {
2062
+ while (reader.nextField()) {
2063
+ if (reader.isEndGroup()) {
2064
+ break;
2065
+ }
2066
+ var field = reader.getFieldNumber();
2067
+ switch (field) {
2068
+ case 1:
2069
+ var value = /** @type {string} */ (reader.readString());
2070
+ msg.setCallId(value);
2071
+ break;
2072
+ case 2:
2073
+ var value = /** @type {string} */ (reader.readString());
2074
+ msg.setReason(value);
2075
+ break;
2076
+ default:
2077
+ reader.skipField();
2078
+ break;
2079
+ }
2080
+ }
2081
+ return msg;
2082
+ };
2083
+
2084
+
2085
+ /**
2086
+ * Serializes the message to binary data (in protobuf wire format).
2087
+ * @return {!Uint8Array}
2088
+ */
2089
+ proto.wechaty.puppet.CallHangupRequest.prototype.serializeBinary = function() {
2090
+ var writer = new jspb.BinaryWriter();
2091
+ proto.wechaty.puppet.CallHangupRequest.serializeBinaryToWriter(this, writer);
2092
+ return writer.getResultBuffer();
2093
+ };
2094
+
2095
+
2096
+ /**
2097
+ * Serializes the given message to binary data (in protobuf wire
2098
+ * format), writing to the given BinaryWriter.
2099
+ * @param {!proto.wechaty.puppet.CallHangupRequest} message
2100
+ * @param {!jspb.BinaryWriter} writer
2101
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2102
+ */
2103
+ proto.wechaty.puppet.CallHangupRequest.serializeBinaryToWriter = function(message, writer) {
2104
+ var f = undefined;
2105
+ f = message.getCallId();
2106
+ if (f.length > 0) {
2107
+ writer.writeString(
2108
+ 1,
2109
+ f
2110
+ );
2111
+ }
2112
+ f = message.getReason();
2113
+ if (f.length > 0) {
2114
+ writer.writeString(
2115
+ 2,
2116
+ f
2117
+ );
2118
+ }
2119
+ };
2120
+
2121
+
2122
+ /**
2123
+ * optional string call_id = 1;
2124
+ * @return {string}
2125
+ */
2126
+ proto.wechaty.puppet.CallHangupRequest.prototype.getCallId = function() {
2127
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2128
+ };
2129
+
2130
+
2131
+ /**
2132
+ * @param {string} value
2133
+ * @return {!proto.wechaty.puppet.CallHangupRequest} returns this
2134
+ */
2135
+ proto.wechaty.puppet.CallHangupRequest.prototype.setCallId = function(value) {
2136
+ return jspb.Message.setProto3StringField(this, 1, value);
2137
+ };
2138
+
2139
+
2140
+ /**
2141
+ * optional string reason = 2;
2142
+ * @return {string}
2143
+ */
2144
+ proto.wechaty.puppet.CallHangupRequest.prototype.getReason = function() {
2145
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2146
+ };
2147
+
2148
+
2149
+ /**
2150
+ * @param {string} value
2151
+ * @return {!proto.wechaty.puppet.CallHangupRequest} returns this
2152
+ */
2153
+ proto.wechaty.puppet.CallHangupRequest.prototype.setReason = function(value) {
2154
+ return jspb.Message.setProto3StringField(this, 2, value);
2155
+ };
2156
+
2157
+
2158
+
2159
+
2160
+
2161
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2162
+ /**
2163
+ * Creates an object representation of this proto.
2164
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2165
+ * Optional fields that are not set will be set to undefined.
2166
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2167
+ * For the list of reserved names please see:
2168
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2169
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2170
+ * JSPB instance for transitional soy proto support:
2171
+ * http://goto/soy-param-migration
2172
+ * @return {!Object}
2173
+ */
2174
+ proto.wechaty.puppet.CallHangupResponse.prototype.toObject = function(opt_includeInstance) {
2175
+ return proto.wechaty.puppet.CallHangupResponse.toObject(opt_includeInstance, this);
2176
+ };
2177
+
2178
+
2179
+ /**
2180
+ * Static version of the {@see toObject} method.
2181
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2182
+ * the JSPB instance for transitional soy proto support:
2183
+ * http://goto/soy-param-migration
2184
+ * @param {!proto.wechaty.puppet.CallHangupResponse} msg The msg instance to transform.
2185
+ * @return {!Object}
2186
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2187
+ */
2188
+ proto.wechaty.puppet.CallHangupResponse.toObject = function(includeInstance, msg) {
2189
+ var f, obj = {
2190
+
2191
+ };
2192
+
2193
+ if (includeInstance) {
2194
+ obj.$jspbMessageInstance = msg;
2195
+ }
2196
+ return obj;
2197
+ };
2198
+ }
2199
+
2200
+
2201
+ /**
2202
+ * Deserializes binary data (in protobuf wire format).
2203
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2204
+ * @return {!proto.wechaty.puppet.CallHangupResponse}
2205
+ */
2206
+ proto.wechaty.puppet.CallHangupResponse.deserializeBinary = function(bytes) {
2207
+ var reader = new jspb.BinaryReader(bytes);
2208
+ var msg = new proto.wechaty.puppet.CallHangupResponse;
2209
+ return proto.wechaty.puppet.CallHangupResponse.deserializeBinaryFromReader(msg, reader);
2210
+ };
2211
+
2212
+
2213
+ /**
2214
+ * Deserializes binary data (in protobuf wire format) from the
2215
+ * given reader into the given message object.
2216
+ * @param {!proto.wechaty.puppet.CallHangupResponse} msg The message object to deserialize into.
2217
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2218
+ * @return {!proto.wechaty.puppet.CallHangupResponse}
2219
+ */
2220
+ proto.wechaty.puppet.CallHangupResponse.deserializeBinaryFromReader = function(msg, reader) {
2221
+ while (reader.nextField()) {
2222
+ if (reader.isEndGroup()) {
2223
+ break;
2224
+ }
2225
+ var field = reader.getFieldNumber();
2226
+ switch (field) {
2227
+ default:
2228
+ reader.skipField();
2229
+ break;
2230
+ }
2231
+ }
2232
+ return msg;
2233
+ };
2234
+
2235
+
2236
+ /**
2237
+ * Serializes the message to binary data (in protobuf wire format).
2238
+ * @return {!Uint8Array}
2239
+ */
2240
+ proto.wechaty.puppet.CallHangupResponse.prototype.serializeBinary = function() {
2241
+ var writer = new jspb.BinaryWriter();
2242
+ proto.wechaty.puppet.CallHangupResponse.serializeBinaryToWriter(this, writer);
2243
+ return writer.getResultBuffer();
2244
+ };
2245
+
2246
+
2247
+ /**
2248
+ * Serializes the given message to binary data (in protobuf wire
2249
+ * format), writing to the given BinaryWriter.
2250
+ * @param {!proto.wechaty.puppet.CallHangupResponse} message
2251
+ * @param {!jspb.BinaryWriter} writer
2252
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2253
+ */
2254
+ proto.wechaty.puppet.CallHangupResponse.serializeBinaryToWriter = function(message, writer) {
2255
+ var f = undefined;
2256
+ };
2257
+
2258
+
2259
+
2260
+
2261
+
2262
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2263
+ /**
2264
+ * Creates an object representation of this proto.
2265
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2266
+ * Optional fields that are not set will be set to undefined.
2267
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2268
+ * For the list of reserved names please see:
2269
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2270
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2271
+ * JSPB instance for transitional soy proto support:
2272
+ * http://goto/soy-param-migration
2273
+ * @return {!Object}
2274
+ */
2275
+ proto.wechaty.puppet.CallMediaEndpointRequest.prototype.toObject = function(opt_includeInstance) {
2276
+ return proto.wechaty.puppet.CallMediaEndpointRequest.toObject(opt_includeInstance, this);
2277
+ };
2278
+
2279
+
2280
+ /**
2281
+ * Static version of the {@see toObject} method.
2282
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2283
+ * the JSPB instance for transitional soy proto support:
2284
+ * http://goto/soy-param-migration
2285
+ * @param {!proto.wechaty.puppet.CallMediaEndpointRequest} msg The msg instance to transform.
2286
+ * @return {!Object}
2287
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2288
+ */
2289
+ proto.wechaty.puppet.CallMediaEndpointRequest.toObject = function(includeInstance, msg) {
2290
+ var f, obj = {
2291
+ callId: jspb.Message.getFieldWithDefault(msg, 1, "")
2292
+ };
2293
+
2294
+ if (includeInstance) {
2295
+ obj.$jspbMessageInstance = msg;
2296
+ }
2297
+ return obj;
2298
+ };
2299
+ }
2300
+
2301
+
2302
+ /**
2303
+ * Deserializes binary data (in protobuf wire format).
2304
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2305
+ * @return {!proto.wechaty.puppet.CallMediaEndpointRequest}
2306
+ */
2307
+ proto.wechaty.puppet.CallMediaEndpointRequest.deserializeBinary = function(bytes) {
2308
+ var reader = new jspb.BinaryReader(bytes);
2309
+ var msg = new proto.wechaty.puppet.CallMediaEndpointRequest;
2310
+ return proto.wechaty.puppet.CallMediaEndpointRequest.deserializeBinaryFromReader(msg, reader);
2311
+ };
2312
+
2313
+
2314
+ /**
2315
+ * Deserializes binary data (in protobuf wire format) from the
2316
+ * given reader into the given message object.
2317
+ * @param {!proto.wechaty.puppet.CallMediaEndpointRequest} msg The message object to deserialize into.
2318
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2319
+ * @return {!proto.wechaty.puppet.CallMediaEndpointRequest}
2320
+ */
2321
+ proto.wechaty.puppet.CallMediaEndpointRequest.deserializeBinaryFromReader = function(msg, reader) {
2322
+ while (reader.nextField()) {
2323
+ if (reader.isEndGroup()) {
2324
+ break;
2325
+ }
2326
+ var field = reader.getFieldNumber();
2327
+ switch (field) {
2328
+ case 1:
2329
+ var value = /** @type {string} */ (reader.readString());
2330
+ msg.setCallId(value);
2331
+ break;
2332
+ default:
2333
+ reader.skipField();
2334
+ break;
2335
+ }
2336
+ }
2337
+ return msg;
2338
+ };
2339
+
2340
+
2341
+ /**
2342
+ * Serializes the message to binary data (in protobuf wire format).
2343
+ * @return {!Uint8Array}
2344
+ */
2345
+ proto.wechaty.puppet.CallMediaEndpointRequest.prototype.serializeBinary = function() {
2346
+ var writer = new jspb.BinaryWriter();
2347
+ proto.wechaty.puppet.CallMediaEndpointRequest.serializeBinaryToWriter(this, writer);
2348
+ return writer.getResultBuffer();
2349
+ };
2350
+
2351
+
2352
+ /**
2353
+ * Serializes the given message to binary data (in protobuf wire
2354
+ * format), writing to the given BinaryWriter.
2355
+ * @param {!proto.wechaty.puppet.CallMediaEndpointRequest} message
2356
+ * @param {!jspb.BinaryWriter} writer
2357
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2358
+ */
2359
+ proto.wechaty.puppet.CallMediaEndpointRequest.serializeBinaryToWriter = function(message, writer) {
2360
+ var f = undefined;
2361
+ f = message.getCallId();
2362
+ if (f.length > 0) {
2363
+ writer.writeString(
2364
+ 1,
2365
+ f
2366
+ );
2367
+ }
2368
+ };
2369
+
2370
+
2371
+ /**
2372
+ * optional string call_id = 1;
2373
+ * @return {string}
2374
+ */
2375
+ proto.wechaty.puppet.CallMediaEndpointRequest.prototype.getCallId = function() {
2376
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2377
+ };
2378
+
2379
+
2380
+ /**
2381
+ * @param {string} value
2382
+ * @return {!proto.wechaty.puppet.CallMediaEndpointRequest} returns this
2383
+ */
2384
+ proto.wechaty.puppet.CallMediaEndpointRequest.prototype.setCallId = function(value) {
2385
+ return jspb.Message.setProto3StringField(this, 1, value);
2386
+ };
2387
+
2388
+
2389
+
2390
+
2391
+
2392
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2393
+ /**
2394
+ * Creates an object representation of this proto.
2395
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2396
+ * Optional fields that are not set will be set to undefined.
2397
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2398
+ * For the list of reserved names please see:
2399
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2400
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2401
+ * JSPB instance for transitional soy proto support:
2402
+ * http://goto/soy-param-migration
2403
+ * @return {!Object}
2404
+ */
2405
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.toObject = function(opt_includeInstance) {
2406
+ return proto.wechaty.puppet.CallMediaEndpointResponse.toObject(opt_includeInstance, this);
2407
+ };
2408
+
2409
+
2410
+ /**
2411
+ * Static version of the {@see toObject} method.
2412
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2413
+ * the JSPB instance for transitional soy proto support:
2414
+ * http://goto/soy-param-migration
2415
+ * @param {!proto.wechaty.puppet.CallMediaEndpointResponse} msg The msg instance to transform.
2416
+ * @return {!Object}
2417
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2418
+ */
2419
+ proto.wechaty.puppet.CallMediaEndpointResponse.toObject = function(includeInstance, msg) {
2420
+ var f, obj = {
2421
+ url: jspb.Message.getFieldWithDefault(msg, 1, ""),
2422
+ token: jspb.Message.getFieldWithDefault(msg, 2, ""),
2423
+ expiresAt: (f = msg.getExpiresAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2424
+ protocol: jspb.Message.getFieldWithDefault(msg, 4, "")
2425
+ };
2426
+
2427
+ if (includeInstance) {
2428
+ obj.$jspbMessageInstance = msg;
2429
+ }
2430
+ return obj;
2431
+ };
2432
+ }
2433
+
2434
+
2435
+ /**
2436
+ * Deserializes binary data (in protobuf wire format).
2437
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2438
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse}
2439
+ */
2440
+ proto.wechaty.puppet.CallMediaEndpointResponse.deserializeBinary = function(bytes) {
2441
+ var reader = new jspb.BinaryReader(bytes);
2442
+ var msg = new proto.wechaty.puppet.CallMediaEndpointResponse;
2443
+ return proto.wechaty.puppet.CallMediaEndpointResponse.deserializeBinaryFromReader(msg, reader);
2444
+ };
2445
+
2446
+
2447
+ /**
2448
+ * Deserializes binary data (in protobuf wire format) from the
2449
+ * given reader into the given message object.
2450
+ * @param {!proto.wechaty.puppet.CallMediaEndpointResponse} msg The message object to deserialize into.
2451
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2452
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse}
2453
+ */
2454
+ proto.wechaty.puppet.CallMediaEndpointResponse.deserializeBinaryFromReader = function(msg, reader) {
2455
+ while (reader.nextField()) {
2456
+ if (reader.isEndGroup()) {
2457
+ break;
2458
+ }
2459
+ var field = reader.getFieldNumber();
2460
+ switch (field) {
2461
+ case 1:
2462
+ var value = /** @type {string} */ (reader.readString());
2463
+ msg.setUrl(value);
2464
+ break;
2465
+ case 2:
2466
+ var value = /** @type {string} */ (reader.readString());
2467
+ msg.setToken(value);
2468
+ break;
2469
+ case 3:
2470
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2471
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2472
+ msg.setExpiresAt(value);
2473
+ break;
2474
+ case 4:
2475
+ var value = /** @type {string} */ (reader.readString());
2476
+ msg.setProtocol(value);
2477
+ break;
2478
+ default:
2479
+ reader.skipField();
2480
+ break;
2481
+ }
2482
+ }
2483
+ return msg;
2484
+ };
2485
+
2486
+
2487
+ /**
2488
+ * Serializes the message to binary data (in protobuf wire format).
2489
+ * @return {!Uint8Array}
2490
+ */
2491
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.serializeBinary = function() {
2492
+ var writer = new jspb.BinaryWriter();
2493
+ proto.wechaty.puppet.CallMediaEndpointResponse.serializeBinaryToWriter(this, writer);
2494
+ return writer.getResultBuffer();
2495
+ };
2496
+
2497
+
2498
+ /**
2499
+ * Serializes the given message to binary data (in protobuf wire
2500
+ * format), writing to the given BinaryWriter.
2501
+ * @param {!proto.wechaty.puppet.CallMediaEndpointResponse} message
2502
+ * @param {!jspb.BinaryWriter} writer
2503
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2504
+ */
2505
+ proto.wechaty.puppet.CallMediaEndpointResponse.serializeBinaryToWriter = function(message, writer) {
2506
+ var f = undefined;
2507
+ f = message.getUrl();
2508
+ if (f.length > 0) {
2509
+ writer.writeString(
2510
+ 1,
2511
+ f
2512
+ );
2513
+ }
2514
+ f = message.getToken();
2515
+ if (f.length > 0) {
2516
+ writer.writeString(
2517
+ 2,
2518
+ f
2519
+ );
2520
+ }
2521
+ f = message.getExpiresAt();
2522
+ if (f != null) {
2523
+ writer.writeMessage(
2524
+ 3,
2525
+ f,
2526
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2527
+ );
2528
+ }
2529
+ f = message.getProtocol();
2530
+ if (f.length > 0) {
2531
+ writer.writeString(
2532
+ 4,
2533
+ f
2534
+ );
2535
+ }
2536
+ };
2537
+
2538
+
2539
+ /**
2540
+ * optional string url = 1;
2541
+ * @return {string}
2542
+ */
2543
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.getUrl = function() {
2544
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2545
+ };
2546
+
2547
+
2548
+ /**
2549
+ * @param {string} value
2550
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse} returns this
2551
+ */
2552
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.setUrl = function(value) {
2553
+ return jspb.Message.setProto3StringField(this, 1, value);
2554
+ };
2555
+
2556
+
2557
+ /**
2558
+ * optional string token = 2;
2559
+ * @return {string}
2560
+ */
2561
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.getToken = function() {
2562
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2563
+ };
2564
+
2565
+
2566
+ /**
2567
+ * @param {string} value
2568
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse} returns this
2569
+ */
2570
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.setToken = function(value) {
2571
+ return jspb.Message.setProto3StringField(this, 2, value);
2572
+ };
2573
+
2574
+
2575
+ /**
2576
+ * optional google.protobuf.Timestamp expires_at = 3;
2577
+ * @return {?proto.google.protobuf.Timestamp}
2578
+ */
2579
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.getExpiresAt = function() {
2580
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2581
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2582
+ };
2583
+
2584
+
2585
+ /**
2586
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2587
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse} returns this
2588
+ */
2589
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.setExpiresAt = function(value) {
2590
+ return jspb.Message.setWrapperField(this, 3, value);
2591
+ };
2592
+
2593
+
2594
+ /**
2595
+ * Clears the message field making it undefined.
2596
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse} returns this
2597
+ */
2598
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.clearExpiresAt = function() {
2599
+ return this.setExpiresAt(undefined);
2600
+ };
2601
+
2602
+
2603
+ /**
2604
+ * Returns whether this field is set.
2605
+ * @return {boolean}
2606
+ */
2607
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.hasExpiresAt = function() {
2608
+ return jspb.Message.getField(this, 3) != null;
2609
+ };
2610
+
2611
+
2612
+ /**
2613
+ * optional string protocol = 4;
2614
+ * @return {string}
2615
+ */
2616
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.getProtocol = function() {
2617
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2618
+ };
2619
+
2620
+
2621
+ /**
2622
+ * @param {string} value
2623
+ * @return {!proto.wechaty.puppet.CallMediaEndpointResponse} returns this
2624
+ */
2625
+ proto.wechaty.puppet.CallMediaEndpointResponse.prototype.setProtocol = function(value) {
2626
+ return jspb.Message.setProto3StringField(this, 4, value);
2627
+ };
2628
+
2629
+
2630
+
2631
+
2632
+
2633
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2634
+ /**
2635
+ * Creates an object representation of this proto.
2636
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2637
+ * Optional fields that are not set will be set to undefined.
2638
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2639
+ * For the list of reserved names please see:
2640
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2641
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2642
+ * JSPB instance for transitional soy proto support:
2643
+ * http://goto/soy-param-migration
2644
+ * @return {!Object}
2645
+ */
2646
+ proto.wechaty.puppet.CallPayloadRequest.prototype.toObject = function(opt_includeInstance) {
2647
+ return proto.wechaty.puppet.CallPayloadRequest.toObject(opt_includeInstance, this);
2648
+ };
2649
+
2650
+
2651
+ /**
2652
+ * Static version of the {@see toObject} method.
2653
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2654
+ * the JSPB instance for transitional soy proto support:
2655
+ * http://goto/soy-param-migration
2656
+ * @param {!proto.wechaty.puppet.CallPayloadRequest} msg The msg instance to transform.
2657
+ * @return {!Object}
2658
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2659
+ */
2660
+ proto.wechaty.puppet.CallPayloadRequest.toObject = function(includeInstance, msg) {
2661
+ var f, obj = {
2662
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
2663
+ };
2664
+
2665
+ if (includeInstance) {
2666
+ obj.$jspbMessageInstance = msg;
2667
+ }
2668
+ return obj;
2669
+ };
2670
+ }
2671
+
2672
+
2673
+ /**
2674
+ * Deserializes binary data (in protobuf wire format).
2675
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2676
+ * @return {!proto.wechaty.puppet.CallPayloadRequest}
2677
+ */
2678
+ proto.wechaty.puppet.CallPayloadRequest.deserializeBinary = function(bytes) {
2679
+ var reader = new jspb.BinaryReader(bytes);
2680
+ var msg = new proto.wechaty.puppet.CallPayloadRequest;
2681
+ return proto.wechaty.puppet.CallPayloadRequest.deserializeBinaryFromReader(msg, reader);
2682
+ };
2683
+
2684
+
2685
+ /**
2686
+ * Deserializes binary data (in protobuf wire format) from the
2687
+ * given reader into the given message object.
2688
+ * @param {!proto.wechaty.puppet.CallPayloadRequest} msg The message object to deserialize into.
2689
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2690
+ * @return {!proto.wechaty.puppet.CallPayloadRequest}
2691
+ */
2692
+ proto.wechaty.puppet.CallPayloadRequest.deserializeBinaryFromReader = function(msg, reader) {
2693
+ while (reader.nextField()) {
2694
+ if (reader.isEndGroup()) {
2695
+ break;
2696
+ }
2697
+ var field = reader.getFieldNumber();
2698
+ switch (field) {
2699
+ case 1:
2700
+ var value = /** @type {string} */ (reader.readString());
2701
+ msg.setId(value);
2702
+ break;
2703
+ default:
2704
+ reader.skipField();
2705
+ break;
2706
+ }
2707
+ }
2708
+ return msg;
2709
+ };
2710
+
2711
+
2712
+ /**
2713
+ * Serializes the message to binary data (in protobuf wire format).
2714
+ * @return {!Uint8Array}
2715
+ */
2716
+ proto.wechaty.puppet.CallPayloadRequest.prototype.serializeBinary = function() {
2717
+ var writer = new jspb.BinaryWriter();
2718
+ proto.wechaty.puppet.CallPayloadRequest.serializeBinaryToWriter(this, writer);
2719
+ return writer.getResultBuffer();
2720
+ };
2721
+
2722
+
2723
+ /**
2724
+ * Serializes the given message to binary data (in protobuf wire
2725
+ * format), writing to the given BinaryWriter.
2726
+ * @param {!proto.wechaty.puppet.CallPayloadRequest} message
2727
+ * @param {!jspb.BinaryWriter} writer
2728
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2729
+ */
2730
+ proto.wechaty.puppet.CallPayloadRequest.serializeBinaryToWriter = function(message, writer) {
2731
+ var f = undefined;
2732
+ f = message.getId();
2733
+ if (f.length > 0) {
2734
+ writer.writeString(
2735
+ 1,
2736
+ f
2737
+ );
2738
+ }
2739
+ };
2740
+
2741
+
2742
+ /**
2743
+ * optional string id = 1;
2744
+ * @return {string}
2745
+ */
2746
+ proto.wechaty.puppet.CallPayloadRequest.prototype.getId = function() {
2747
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2748
+ };
2749
+
2750
+
2751
+ /**
2752
+ * @param {string} value
2753
+ * @return {!proto.wechaty.puppet.CallPayloadRequest} returns this
2754
+ */
2755
+ proto.wechaty.puppet.CallPayloadRequest.prototype.setId = function(value) {
2756
+ return jspb.Message.setProto3StringField(this, 1, value);
2757
+ };
2758
+
2759
+
42
2760
 
43
2761
  /**
44
2762
  * List of repeated fields within this message type.
45
2763
  * @private {!Array<number>}
46
2764
  * @const
47
2765
  */
48
- proto.wechaty.puppet.CallRecordPayload.repeatedFields_ = [2];
2766
+ proto.wechaty.puppet.CallPayloadResponse.repeatedFields_ = [3];
49
2767
 
50
2768
 
51
2769
 
@@ -62,8 +2780,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) {
62
2780
  * http://goto/soy-param-migration
63
2781
  * @return {!Object}
64
2782
  */
65
- proto.wechaty.puppet.CallRecordPayload.prototype.toObject = function(opt_includeInstance) {
66
- return proto.wechaty.puppet.CallRecordPayload.toObject(opt_includeInstance, this);
2783
+ proto.wechaty.puppet.CallPayloadResponse.prototype.toObject = function(opt_includeInstance) {
2784
+ return proto.wechaty.puppet.CallPayloadResponse.toObject(opt_includeInstance, this);
67
2785
  };
68
2786
 
69
2787
 
@@ -72,17 +2790,18 @@ proto.wechaty.puppet.CallRecordPayload.prototype.toObject = function(opt_include
72
2790
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
73
2791
  * the JSPB instance for transitional soy proto support:
74
2792
  * http://goto/soy-param-migration
75
- * @param {!proto.wechaty.puppet.CallRecordPayload} msg The msg instance to transform.
2793
+ * @param {!proto.wechaty.puppet.CallPayloadResponse} msg The msg instance to transform.
76
2794
  * @return {!Object}
77
2795
  * @suppress {unusedLocalVariables} f is only used for nested messages
78
2796
  */
79
- proto.wechaty.puppet.CallRecordPayload.toObject = function(includeInstance, msg) {
2797
+ proto.wechaty.puppet.CallPayloadResponse.toObject = function(includeInstance, msg) {
80
2798
  var f, obj = {
81
- starterId: jspb.Message.getFieldWithDefault(msg, 1, ""),
82
- participantIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
83
- length: jspb.Message.getFieldWithDefault(msg, 3, 0),
84
- type: jspb.Message.getFieldWithDefault(msg, 4, 0),
85
- status: jspb.Message.getFieldWithDefault(msg, 5, 0)
2799
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
2800
+ starter: jspb.Message.getFieldWithDefault(msg, 2, ""),
2801
+ participantsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
2802
+ media: jspb.Message.getFieldWithDefault(msg, 4, 0),
2803
+ startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2804
+ endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
86
2805
  };
87
2806
 
88
2807
  if (includeInstance) {
@@ -96,23 +2815,23 @@ proto.wechaty.puppet.CallRecordPayload.toObject = function(includeInstance, msg)
96
2815
  /**
97
2816
  * Deserializes binary data (in protobuf wire format).
98
2817
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
99
- * @return {!proto.wechaty.puppet.CallRecordPayload}
2818
+ * @return {!proto.wechaty.puppet.CallPayloadResponse}
100
2819
  */
101
- proto.wechaty.puppet.CallRecordPayload.deserializeBinary = function(bytes) {
2820
+ proto.wechaty.puppet.CallPayloadResponse.deserializeBinary = function(bytes) {
102
2821
  var reader = new jspb.BinaryReader(bytes);
103
- var msg = new proto.wechaty.puppet.CallRecordPayload;
104
- return proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader(msg, reader);
2822
+ var msg = new proto.wechaty.puppet.CallPayloadResponse;
2823
+ return proto.wechaty.puppet.CallPayloadResponse.deserializeBinaryFromReader(msg, reader);
105
2824
  };
106
2825
 
107
2826
 
108
2827
  /**
109
2828
  * Deserializes binary data (in protobuf wire format) from the
110
2829
  * given reader into the given message object.
111
- * @param {!proto.wechaty.puppet.CallRecordPayload} msg The message object to deserialize into.
2830
+ * @param {!proto.wechaty.puppet.CallPayloadResponse} msg The message object to deserialize into.
112
2831
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
113
- * @return {!proto.wechaty.puppet.CallRecordPayload}
2832
+ * @return {!proto.wechaty.puppet.CallPayloadResponse}
114
2833
  */
115
- proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader = function(msg, reader) {
2834
+ proto.wechaty.puppet.CallPayloadResponse.deserializeBinaryFromReader = function(msg, reader) {
116
2835
  while (reader.nextField()) {
117
2836
  if (reader.isEndGroup()) {
118
2837
  break;
@@ -121,23 +2840,29 @@ proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader = function(ms
121
2840
  switch (field) {
122
2841
  case 1:
123
2842
  var value = /** @type {string} */ (reader.readString());
124
- msg.setStarterId(value);
2843
+ msg.setId(value);
125
2844
  break;
126
2845
  case 2:
127
2846
  var value = /** @type {string} */ (reader.readString());
128
- msg.addParticipantIds(value);
2847
+ msg.setStarter(value);
129
2848
  break;
130
2849
  case 3:
131
- var value = /** @type {number} */ (reader.readInt32());
132
- msg.setLength(value);
2850
+ var value = /** @type {string} */ (reader.readString());
2851
+ msg.addParticipants(value);
133
2852
  break;
134
2853
  case 4:
135
2854
  var value = /** @type {!proto.wechaty.puppet.CallType} */ (reader.readEnum());
136
- msg.setType(value);
2855
+ msg.setMedia(value);
137
2856
  break;
138
2857
  case 5:
139
- var value = /** @type {!proto.wechaty.puppet.CallStatus} */ (reader.readEnum());
140
- msg.setStatus(value);
2858
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2859
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2860
+ msg.setStartTime(value);
2861
+ break;
2862
+ case 6:
2863
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2864
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2865
+ msg.setEndTime(value);
141
2866
  break;
142
2867
  default:
143
2868
  reader.skipField();
@@ -152,9 +2877,9 @@ proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader = function(ms
152
2877
  * Serializes the message to binary data (in protobuf wire format).
153
2878
  * @return {!Uint8Array}
154
2879
  */
155
- proto.wechaty.puppet.CallRecordPayload.prototype.serializeBinary = function() {
2880
+ proto.wechaty.puppet.CallPayloadResponse.prototype.serializeBinary = function() {
156
2881
  var writer = new jspb.BinaryWriter();
157
- proto.wechaty.puppet.CallRecordPayload.serializeBinaryToWriter(this, writer);
2882
+ proto.wechaty.puppet.CallPayloadResponse.serializeBinaryToWriter(this, writer);
158
2883
  return writer.getResultBuffer();
159
2884
  };
160
2885
 
@@ -162,156 +2887,221 @@ proto.wechaty.puppet.CallRecordPayload.prototype.serializeBinary = function() {
162
2887
  /**
163
2888
  * Serializes the given message to binary data (in protobuf wire
164
2889
  * format), writing to the given BinaryWriter.
165
- * @param {!proto.wechaty.puppet.CallRecordPayload} message
2890
+ * @param {!proto.wechaty.puppet.CallPayloadResponse} message
166
2891
  * @param {!jspb.BinaryWriter} writer
167
2892
  * @suppress {unusedLocalVariables} f is only used for nested messages
168
2893
  */
169
- proto.wechaty.puppet.CallRecordPayload.serializeBinaryToWriter = function(message, writer) {
2894
+ proto.wechaty.puppet.CallPayloadResponse.serializeBinaryToWriter = function(message, writer) {
170
2895
  var f = undefined;
171
- f = message.getStarterId();
2896
+ f = message.getId();
172
2897
  if (f.length > 0) {
173
2898
  writer.writeString(
174
2899
  1,
175
2900
  f
176
2901
  );
177
2902
  }
178
- f = message.getParticipantIdsList();
2903
+ f = message.getStarter();
179
2904
  if (f.length > 0) {
180
- writer.writeRepeatedString(
2905
+ writer.writeString(
181
2906
  2,
182
2907
  f
183
2908
  );
184
2909
  }
185
- f = message.getLength();
186
- if (f !== 0) {
187
- writer.writeInt32(
2910
+ f = message.getParticipantsList();
2911
+ if (f.length > 0) {
2912
+ writer.writeRepeatedString(
188
2913
  3,
189
2914
  f
190
2915
  );
191
2916
  }
192
- f = message.getType();
2917
+ f = message.getMedia();
193
2918
  if (f !== 0.0) {
194
2919
  writer.writeEnum(
195
2920
  4,
196
2921
  f
197
2922
  );
198
2923
  }
199
- f = message.getStatus();
200
- if (f !== 0.0) {
201
- writer.writeEnum(
2924
+ f = message.getStartTime();
2925
+ if (f != null) {
2926
+ writer.writeMessage(
202
2927
  5,
203
- f
2928
+ f,
2929
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2930
+ );
2931
+ }
2932
+ f = message.getEndTime();
2933
+ if (f != null) {
2934
+ writer.writeMessage(
2935
+ 6,
2936
+ f,
2937
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
204
2938
  );
205
2939
  }
206
2940
  };
207
2941
 
208
2942
 
209
2943
  /**
210
- * optional string starter_id = 1;
2944
+ * optional string id = 1;
211
2945
  * @return {string}
212
2946
  */
213
- proto.wechaty.puppet.CallRecordPayload.prototype.getStarterId = function() {
2947
+ proto.wechaty.puppet.CallPayloadResponse.prototype.getId = function() {
214
2948
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
215
2949
  };
216
2950
 
217
2951
 
218
2952
  /**
219
2953
  * @param {string} value
220
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
2954
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
221
2955
  */
222
- proto.wechaty.puppet.CallRecordPayload.prototype.setStarterId = function(value) {
2956
+ proto.wechaty.puppet.CallPayloadResponse.prototype.setId = function(value) {
223
2957
  return jspb.Message.setProto3StringField(this, 1, value);
224
2958
  };
225
2959
 
226
2960
 
227
2961
  /**
228
- * repeated string participant_ids = 2;
2962
+ * optional string starter = 2;
2963
+ * @return {string}
2964
+ */
2965
+ proto.wechaty.puppet.CallPayloadResponse.prototype.getStarter = function() {
2966
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2967
+ };
2968
+
2969
+
2970
+ /**
2971
+ * @param {string} value
2972
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
2973
+ */
2974
+ proto.wechaty.puppet.CallPayloadResponse.prototype.setStarter = function(value) {
2975
+ return jspb.Message.setProto3StringField(this, 2, value);
2976
+ };
2977
+
2978
+
2979
+ /**
2980
+ * repeated string participants = 3;
229
2981
  * @return {!Array<string>}
230
2982
  */
231
- proto.wechaty.puppet.CallRecordPayload.prototype.getParticipantIdsList = function() {
232
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
2983
+ proto.wechaty.puppet.CallPayloadResponse.prototype.getParticipantsList = function() {
2984
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
233
2985
  };
234
2986
 
235
2987
 
236
2988
  /**
237
2989
  * @param {!Array<string>} value
238
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
2990
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
239
2991
  */
240
- proto.wechaty.puppet.CallRecordPayload.prototype.setParticipantIdsList = function(value) {
241
- return jspb.Message.setField(this, 2, value || []);
2992
+ proto.wechaty.puppet.CallPayloadResponse.prototype.setParticipantsList = function(value) {
2993
+ return jspb.Message.setField(this, 3, value || []);
242
2994
  };
243
2995
 
244
2996
 
245
2997
  /**
246
2998
  * @param {string} value
247
2999
  * @param {number=} opt_index
248
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
3000
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
249
3001
  */
250
- proto.wechaty.puppet.CallRecordPayload.prototype.addParticipantIds = function(value, opt_index) {
251
- return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
3002
+ proto.wechaty.puppet.CallPayloadResponse.prototype.addParticipants = function(value, opt_index) {
3003
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
252
3004
  };
253
3005
 
254
3006
 
255
3007
  /**
256
3008
  * Clears the list making it empty but non-null.
257
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
3009
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
258
3010
  */
259
- proto.wechaty.puppet.CallRecordPayload.prototype.clearParticipantIdsList = function() {
260
- return this.setParticipantIdsList([]);
3011
+ proto.wechaty.puppet.CallPayloadResponse.prototype.clearParticipantsList = function() {
3012
+ return this.setParticipantsList([]);
261
3013
  };
262
3014
 
263
3015
 
264
3016
  /**
265
- * optional int32 length = 3;
266
- * @return {number}
3017
+ * optional CallType media = 4;
3018
+ * @return {!proto.wechaty.puppet.CallType}
267
3019
  */
268
- proto.wechaty.puppet.CallRecordPayload.prototype.getLength = function() {
269
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3020
+ proto.wechaty.puppet.CallPayloadResponse.prototype.getMedia = function() {
3021
+ return /** @type {!proto.wechaty.puppet.CallType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
270
3022
  };
271
3023
 
272
3024
 
273
3025
  /**
274
- * @param {number} value
275
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
3026
+ * @param {!proto.wechaty.puppet.CallType} value
3027
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
276
3028
  */
277
- proto.wechaty.puppet.CallRecordPayload.prototype.setLength = function(value) {
278
- return jspb.Message.setProto3IntField(this, 3, value);
3029
+ proto.wechaty.puppet.CallPayloadResponse.prototype.setMedia = function(value) {
3030
+ return jspb.Message.setProto3EnumField(this, 4, value);
279
3031
  };
280
3032
 
281
3033
 
282
3034
  /**
283
- * optional CallType type = 4;
284
- * @return {!proto.wechaty.puppet.CallType}
3035
+ * optional google.protobuf.Timestamp start_time = 5;
3036
+ * @return {?proto.google.protobuf.Timestamp}
285
3037
  */
286
- proto.wechaty.puppet.CallRecordPayload.prototype.getType = function() {
287
- return /** @type {!proto.wechaty.puppet.CallType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
3038
+ proto.wechaty.puppet.CallPayloadResponse.prototype.getStartTime = function() {
3039
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3040
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
288
3041
  };
289
3042
 
290
3043
 
291
3044
  /**
292
- * @param {!proto.wechaty.puppet.CallType} value
293
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
3045
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3046
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
3047
+ */
3048
+ proto.wechaty.puppet.CallPayloadResponse.prototype.setStartTime = function(value) {
3049
+ return jspb.Message.setWrapperField(this, 5, value);
3050
+ };
3051
+
3052
+
3053
+ /**
3054
+ * Clears the message field making it undefined.
3055
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
294
3056
  */
295
- proto.wechaty.puppet.CallRecordPayload.prototype.setType = function(value) {
296
- return jspb.Message.setProto3EnumField(this, 4, value);
3057
+ proto.wechaty.puppet.CallPayloadResponse.prototype.clearStartTime = function() {
3058
+ return this.setStartTime(undefined);
297
3059
  };
298
3060
 
299
3061
 
300
3062
  /**
301
- * optional CallStatus status = 5;
302
- * @return {!proto.wechaty.puppet.CallStatus}
3063
+ * Returns whether this field is set.
3064
+ * @return {boolean}
303
3065
  */
304
- proto.wechaty.puppet.CallRecordPayload.prototype.getStatus = function() {
305
- return /** @type {!proto.wechaty.puppet.CallStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
3066
+ proto.wechaty.puppet.CallPayloadResponse.prototype.hasStartTime = function() {
3067
+ return jspb.Message.getField(this, 5) != null;
306
3068
  };
307
3069
 
308
3070
 
309
3071
  /**
310
- * @param {!proto.wechaty.puppet.CallStatus} value
311
- * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
3072
+ * optional google.protobuf.Timestamp end_time = 6;
3073
+ * @return {?proto.google.protobuf.Timestamp}
312
3074
  */
313
- proto.wechaty.puppet.CallRecordPayload.prototype.setStatus = function(value) {
314
- return jspb.Message.setProto3EnumField(this, 5, value);
3075
+ proto.wechaty.puppet.CallPayloadResponse.prototype.getEndTime = function() {
3076
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3077
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
3078
+ };
3079
+
3080
+
3081
+ /**
3082
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3083
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
3084
+ */
3085
+ proto.wechaty.puppet.CallPayloadResponse.prototype.setEndTime = function(value) {
3086
+ return jspb.Message.setWrapperField(this, 6, value);
3087
+ };
3088
+
3089
+
3090
+ /**
3091
+ * Clears the message field making it undefined.
3092
+ * @return {!proto.wechaty.puppet.CallPayloadResponse} returns this
3093
+ */
3094
+ proto.wechaty.puppet.CallPayloadResponse.prototype.clearEndTime = function() {
3095
+ return this.setEndTime(undefined);
3096
+ };
3097
+
3098
+
3099
+ /**
3100
+ * Returns whether this field is set.
3101
+ * @return {boolean}
3102
+ */
3103
+ proto.wechaty.puppet.CallPayloadResponse.prototype.hasEndTime = function() {
3104
+ return jspb.Message.getField(this, 6) != null;
315
3105
  };
316
3106
 
317
3107