@juzi/wechaty-grpc 1.0.54 → 1.0.56

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 (55) hide show
  1. package/dist/cjs/out/wechaty/puppet/room_pb.d.ts +101 -0
  2. package/dist/cjs/out/wechaty/puppet/room_pb.js +761 -0
  3. package/dist/cjs/out/wechaty/puppet/util_grpc_pb.js +1 -0
  4. package/dist/cjs/out/wechaty/puppet/util_pb.d.ts +13 -0
  5. package/dist/cjs/out/wechaty/puppet/util_pb.js +28 -0
  6. package/dist/cjs/out/wechaty/puppet/util_pb_service.d.ts +3 -0
  7. package/dist/cjs/out/wechaty/puppet/util_pb_service.js +3 -0
  8. package/dist/cjs/out/wechaty/puppet.openapi.yaml +88 -1
  9. package/dist/cjs/out/wechaty/puppet.swagger.json +129 -1
  10. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  11. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
  12. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
  13. package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
  14. package/dist/cjs/proto/wechaty/puppet/room.proto +22 -0
  15. package/dist/cjs/proto/wechaty/puppet/util.proto +12 -0
  16. package/dist/cjs/proto/wechaty/puppet.proto +12 -0
  17. package/dist/cjs/src/package-json.js +1 -1
  18. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  19. package/dist/cjs/tests/puppet-server-impl.js +10 -0
  20. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  21. package/dist/esm/out/wechaty/puppet/room_pb.d.ts +101 -0
  22. package/dist/esm/out/wechaty/puppet/room_pb.js +761 -0
  23. package/dist/esm/out/wechaty/puppet/util_grpc_pb.js +1 -0
  24. package/dist/esm/out/wechaty/puppet/util_pb.d.ts +13 -0
  25. package/dist/esm/out/wechaty/puppet/util_pb.js +28 -0
  26. package/dist/esm/out/wechaty/puppet/util_pb_service.d.ts +3 -0
  27. package/dist/esm/out/wechaty/puppet/util_pb_service.js +3 -0
  28. package/dist/esm/out/wechaty/puppet.openapi.yaml +88 -1
  29. package/dist/esm/out/wechaty/puppet.swagger.json +129 -1
  30. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  31. package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
  32. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
  33. package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
  34. package/dist/esm/proto/wechaty/puppet/room.proto +22 -0
  35. package/dist/esm/proto/wechaty/puppet/util.proto +12 -0
  36. package/dist/esm/proto/wechaty/puppet.proto +12 -0
  37. package/dist/esm/src/package-json.js +1 -1
  38. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  39. package/dist/esm/tests/puppet-server-impl.js +10 -0
  40. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  41. package/out/wechaty/puppet/room_pb.d.ts +101 -0
  42. package/out/wechaty/puppet/room_pb.js +761 -0
  43. package/out/wechaty/puppet/util_grpc_pb.js +1 -0
  44. package/out/wechaty/puppet/util_pb.d.ts +13 -0
  45. package/out/wechaty/puppet/util_pb.js +28 -0
  46. package/out/wechaty/puppet/util_pb_service.d.ts +3 -0
  47. package/out/wechaty/puppet/util_pb_service.js +3 -0
  48. package/out/wechaty/puppet.openapi.yaml +88 -1
  49. package/out/wechaty/puppet.swagger.json +129 -1
  50. package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  51. package/out/wechaty/puppet_grpc_pb.js +66 -0
  52. package/out/wechaty/puppet_pb_service.d.ts +38 -0
  53. package/out/wechaty/puppet_pb_service.js +80 -0
  54. package/package.json +1 -1
  55. package/src/package-json.ts +1 -1
@@ -17,6 +17,8 @@ var global = (function() { return this || window || global || self || Function('
17
17
 
18
18
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_wrappers_pb);
20
+ var wechaty_puppet_util_pb = require('../../wechaty/puppet/util_pb.js');
21
+ goog.object.extend(proto, wechaty_puppet_util_pb);
20
22
  goog.exportSymbol('proto.wechaty.puppet.RoomAddRequest', null, global);
21
23
  goog.exportSymbol('proto.wechaty.puppet.RoomAddResponse', null, global);
22
24
  goog.exportSymbol('proto.wechaty.puppet.RoomAnnounceRequest', null, global);
@@ -29,8 +31,12 @@ goog.exportSymbol('proto.wechaty.puppet.RoomDelRequest', null, global);
29
31
  goog.exportSymbol('proto.wechaty.puppet.RoomDelResponse', null, global);
30
32
  goog.exportSymbol('proto.wechaty.puppet.RoomListRequest', null, global);
31
33
  goog.exportSymbol('proto.wechaty.puppet.RoomListResponse', null, global);
34
+ goog.exportSymbol('proto.wechaty.puppet.RoomOwnerTransferRequest', null, global);
35
+ goog.exportSymbol('proto.wechaty.puppet.RoomOwnerTransferResponse', null, global);
32
36
  goog.exportSymbol('proto.wechaty.puppet.RoomPayloadRequest', null, global);
33
37
  goog.exportSymbol('proto.wechaty.puppet.RoomPayloadResponse', null, global);
38
+ goog.exportSymbol('proto.wechaty.puppet.RoomPermissionRequest', null, global);
39
+ goog.exportSymbol('proto.wechaty.puppet.RoomPermissionResponse', null, global);
34
40
  goog.exportSymbol('proto.wechaty.puppet.RoomQRCodeRequest', null, global);
35
41
  goog.exportSymbol('proto.wechaty.puppet.RoomQRCodeResponse', null, global);
36
42
  goog.exportSymbol('proto.wechaty.puppet.RoomQuitRequest', null, global);
@@ -501,6 +507,90 @@ if (goog.DEBUG && !COMPILED) {
501
507
  */
502
508
  proto.wechaty.puppet.RoomRemarkResponse.displayName = 'proto.wechaty.puppet.RoomRemarkResponse';
503
509
  }
510
+ /**
511
+ * Generated by JsPbCodeGenerator.
512
+ * @param {Array=} opt_data Optional initial data array, typically from a
513
+ * server response, or constructed directly in Javascript. The array is used
514
+ * in place and becomes part of the constructed object. It is not cloned.
515
+ * If no data is provided, the constructed object will be empty, but still
516
+ * valid.
517
+ * @extends {jspb.Message}
518
+ * @constructor
519
+ */
520
+ proto.wechaty.puppet.RoomOwnerTransferRequest = function(opt_data) {
521
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
522
+ };
523
+ goog.inherits(proto.wechaty.puppet.RoomOwnerTransferRequest, jspb.Message);
524
+ if (goog.DEBUG && !COMPILED) {
525
+ /**
526
+ * @public
527
+ * @override
528
+ */
529
+ proto.wechaty.puppet.RoomOwnerTransferRequest.displayName = 'proto.wechaty.puppet.RoomOwnerTransferRequest';
530
+ }
531
+ /**
532
+ * Generated by JsPbCodeGenerator.
533
+ * @param {Array=} opt_data Optional initial data array, typically from a
534
+ * server response, or constructed directly in Javascript. The array is used
535
+ * in place and becomes part of the constructed object. It is not cloned.
536
+ * If no data is provided, the constructed object will be empty, but still
537
+ * valid.
538
+ * @extends {jspb.Message}
539
+ * @constructor
540
+ */
541
+ proto.wechaty.puppet.RoomOwnerTransferResponse = function(opt_data) {
542
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
543
+ };
544
+ goog.inherits(proto.wechaty.puppet.RoomOwnerTransferResponse, jspb.Message);
545
+ if (goog.DEBUG && !COMPILED) {
546
+ /**
547
+ * @public
548
+ * @override
549
+ */
550
+ proto.wechaty.puppet.RoomOwnerTransferResponse.displayName = 'proto.wechaty.puppet.RoomOwnerTransferResponse';
551
+ }
552
+ /**
553
+ * Generated by JsPbCodeGenerator.
554
+ * @param {Array=} opt_data Optional initial data array, typically from a
555
+ * server response, or constructed directly in Javascript. The array is used
556
+ * in place and becomes part of the constructed object. It is not cloned.
557
+ * If no data is provided, the constructed object will be empty, but still
558
+ * valid.
559
+ * @extends {jspb.Message}
560
+ * @constructor
561
+ */
562
+ proto.wechaty.puppet.RoomPermissionRequest = function(opt_data) {
563
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
564
+ };
565
+ goog.inherits(proto.wechaty.puppet.RoomPermissionRequest, jspb.Message);
566
+ if (goog.DEBUG && !COMPILED) {
567
+ /**
568
+ * @public
569
+ * @override
570
+ */
571
+ proto.wechaty.puppet.RoomPermissionRequest.displayName = 'proto.wechaty.puppet.RoomPermissionRequest';
572
+ }
573
+ /**
574
+ * Generated by JsPbCodeGenerator.
575
+ * @param {Array=} opt_data Optional initial data array, typically from a
576
+ * server response, or constructed directly in Javascript. The array is used
577
+ * in place and becomes part of the constructed object. It is not cloned.
578
+ * If no data is provided, the constructed object will be empty, but still
579
+ * valid.
580
+ * @extends {jspb.Message}
581
+ * @constructor
582
+ */
583
+ proto.wechaty.puppet.RoomPermissionResponse = function(opt_data) {
584
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
585
+ };
586
+ goog.inherits(proto.wechaty.puppet.RoomPermissionResponse, jspb.Message);
587
+ if (goog.DEBUG && !COMPILED) {
588
+ /**
589
+ * @public
590
+ * @override
591
+ */
592
+ proto.wechaty.puppet.RoomPermissionResponse.displayName = 'proto.wechaty.puppet.RoomPermissionResponse';
593
+ }
504
594
 
505
595
 
506
596
 
@@ -4059,4 +4149,675 @@ proto.wechaty.puppet.RoomRemarkResponse.serializeBinaryToWriter = function(messa
4059
4149
  };
4060
4150
 
4061
4151
 
4152
+
4153
+
4154
+
4155
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4156
+ /**
4157
+ * Creates an object representation of this proto.
4158
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4159
+ * Optional fields that are not set will be set to undefined.
4160
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4161
+ * For the list of reserved names please see:
4162
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4163
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4164
+ * JSPB instance for transitional soy proto support:
4165
+ * http://goto/soy-param-migration
4166
+ * @return {!Object}
4167
+ */
4168
+ proto.wechaty.puppet.RoomOwnerTransferRequest.prototype.toObject = function(opt_includeInstance) {
4169
+ return proto.wechaty.puppet.RoomOwnerTransferRequest.toObject(opt_includeInstance, this);
4170
+ };
4171
+
4172
+
4173
+ /**
4174
+ * Static version of the {@see toObject} method.
4175
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4176
+ * the JSPB instance for transitional soy proto support:
4177
+ * http://goto/soy-param-migration
4178
+ * @param {!proto.wechaty.puppet.RoomOwnerTransferRequest} msg The msg instance to transform.
4179
+ * @return {!Object}
4180
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4181
+ */
4182
+ proto.wechaty.puppet.RoomOwnerTransferRequest.toObject = function(includeInstance, msg) {
4183
+ var f, obj = {
4184
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
4185
+ contactId: jspb.Message.getFieldWithDefault(msg, 2, "")
4186
+ };
4187
+
4188
+ if (includeInstance) {
4189
+ obj.$jspbMessageInstance = msg;
4190
+ }
4191
+ return obj;
4192
+ };
4193
+ }
4194
+
4195
+
4196
+ /**
4197
+ * Deserializes binary data (in protobuf wire format).
4198
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4199
+ * @return {!proto.wechaty.puppet.RoomOwnerTransferRequest}
4200
+ */
4201
+ proto.wechaty.puppet.RoomOwnerTransferRequest.deserializeBinary = function(bytes) {
4202
+ var reader = new jspb.BinaryReader(bytes);
4203
+ var msg = new proto.wechaty.puppet.RoomOwnerTransferRequest;
4204
+ return proto.wechaty.puppet.RoomOwnerTransferRequest.deserializeBinaryFromReader(msg, reader);
4205
+ };
4206
+
4207
+
4208
+ /**
4209
+ * Deserializes binary data (in protobuf wire format) from the
4210
+ * given reader into the given message object.
4211
+ * @param {!proto.wechaty.puppet.RoomOwnerTransferRequest} msg The message object to deserialize into.
4212
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4213
+ * @return {!proto.wechaty.puppet.RoomOwnerTransferRequest}
4214
+ */
4215
+ proto.wechaty.puppet.RoomOwnerTransferRequest.deserializeBinaryFromReader = function(msg, reader) {
4216
+ while (reader.nextField()) {
4217
+ if (reader.isEndGroup()) {
4218
+ break;
4219
+ }
4220
+ var field = reader.getFieldNumber();
4221
+ switch (field) {
4222
+ case 1:
4223
+ var value = /** @type {string} */ (reader.readString());
4224
+ msg.setId(value);
4225
+ break;
4226
+ case 2:
4227
+ var value = /** @type {string} */ (reader.readString());
4228
+ msg.setContactId(value);
4229
+ break;
4230
+ default:
4231
+ reader.skipField();
4232
+ break;
4233
+ }
4234
+ }
4235
+ return msg;
4236
+ };
4237
+
4238
+
4239
+ /**
4240
+ * Serializes the message to binary data (in protobuf wire format).
4241
+ * @return {!Uint8Array}
4242
+ */
4243
+ proto.wechaty.puppet.RoomOwnerTransferRequest.prototype.serializeBinary = function() {
4244
+ var writer = new jspb.BinaryWriter();
4245
+ proto.wechaty.puppet.RoomOwnerTransferRequest.serializeBinaryToWriter(this, writer);
4246
+ return writer.getResultBuffer();
4247
+ };
4248
+
4249
+
4250
+ /**
4251
+ * Serializes the given message to binary data (in protobuf wire
4252
+ * format), writing to the given BinaryWriter.
4253
+ * @param {!proto.wechaty.puppet.RoomOwnerTransferRequest} message
4254
+ * @param {!jspb.BinaryWriter} writer
4255
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4256
+ */
4257
+ proto.wechaty.puppet.RoomOwnerTransferRequest.serializeBinaryToWriter = function(message, writer) {
4258
+ var f = undefined;
4259
+ f = message.getId();
4260
+ if (f.length > 0) {
4261
+ writer.writeString(
4262
+ 1,
4263
+ f
4264
+ );
4265
+ }
4266
+ f = message.getContactId();
4267
+ if (f.length > 0) {
4268
+ writer.writeString(
4269
+ 2,
4270
+ f
4271
+ );
4272
+ }
4273
+ };
4274
+
4275
+
4276
+ /**
4277
+ * optional string id = 1;
4278
+ * @return {string}
4279
+ */
4280
+ proto.wechaty.puppet.RoomOwnerTransferRequest.prototype.getId = function() {
4281
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4282
+ };
4283
+
4284
+
4285
+ /**
4286
+ * @param {string} value
4287
+ * @return {!proto.wechaty.puppet.RoomOwnerTransferRequest} returns this
4288
+ */
4289
+ proto.wechaty.puppet.RoomOwnerTransferRequest.prototype.setId = function(value) {
4290
+ return jspb.Message.setProto3StringField(this, 1, value);
4291
+ };
4292
+
4293
+
4294
+ /**
4295
+ * optional string contact_id = 2;
4296
+ * @return {string}
4297
+ */
4298
+ proto.wechaty.puppet.RoomOwnerTransferRequest.prototype.getContactId = function() {
4299
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4300
+ };
4301
+
4302
+
4303
+ /**
4304
+ * @param {string} value
4305
+ * @return {!proto.wechaty.puppet.RoomOwnerTransferRequest} returns this
4306
+ */
4307
+ proto.wechaty.puppet.RoomOwnerTransferRequest.prototype.setContactId = function(value) {
4308
+ return jspb.Message.setProto3StringField(this, 2, value);
4309
+ };
4310
+
4311
+
4312
+
4313
+
4314
+
4315
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4316
+ /**
4317
+ * Creates an object representation of this proto.
4318
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4319
+ * Optional fields that are not set will be set to undefined.
4320
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4321
+ * For the list of reserved names please see:
4322
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4323
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4324
+ * JSPB instance for transitional soy proto support:
4325
+ * http://goto/soy-param-migration
4326
+ * @return {!Object}
4327
+ */
4328
+ proto.wechaty.puppet.RoomOwnerTransferResponse.prototype.toObject = function(opt_includeInstance) {
4329
+ return proto.wechaty.puppet.RoomOwnerTransferResponse.toObject(opt_includeInstance, this);
4330
+ };
4331
+
4332
+
4333
+ /**
4334
+ * Static version of the {@see toObject} method.
4335
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4336
+ * the JSPB instance for transitional soy proto support:
4337
+ * http://goto/soy-param-migration
4338
+ * @param {!proto.wechaty.puppet.RoomOwnerTransferResponse} msg The msg instance to transform.
4339
+ * @return {!Object}
4340
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4341
+ */
4342
+ proto.wechaty.puppet.RoomOwnerTransferResponse.toObject = function(includeInstance, msg) {
4343
+ var f, obj = {
4344
+
4345
+ };
4346
+
4347
+ if (includeInstance) {
4348
+ obj.$jspbMessageInstance = msg;
4349
+ }
4350
+ return obj;
4351
+ };
4352
+ }
4353
+
4354
+
4355
+ /**
4356
+ * Deserializes binary data (in protobuf wire format).
4357
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4358
+ * @return {!proto.wechaty.puppet.RoomOwnerTransferResponse}
4359
+ */
4360
+ proto.wechaty.puppet.RoomOwnerTransferResponse.deserializeBinary = function(bytes) {
4361
+ var reader = new jspb.BinaryReader(bytes);
4362
+ var msg = new proto.wechaty.puppet.RoomOwnerTransferResponse;
4363
+ return proto.wechaty.puppet.RoomOwnerTransferResponse.deserializeBinaryFromReader(msg, reader);
4364
+ };
4365
+
4366
+
4367
+ /**
4368
+ * Deserializes binary data (in protobuf wire format) from the
4369
+ * given reader into the given message object.
4370
+ * @param {!proto.wechaty.puppet.RoomOwnerTransferResponse} msg The message object to deserialize into.
4371
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4372
+ * @return {!proto.wechaty.puppet.RoomOwnerTransferResponse}
4373
+ */
4374
+ proto.wechaty.puppet.RoomOwnerTransferResponse.deserializeBinaryFromReader = function(msg, reader) {
4375
+ while (reader.nextField()) {
4376
+ if (reader.isEndGroup()) {
4377
+ break;
4378
+ }
4379
+ var field = reader.getFieldNumber();
4380
+ switch (field) {
4381
+ default:
4382
+ reader.skipField();
4383
+ break;
4384
+ }
4385
+ }
4386
+ return msg;
4387
+ };
4388
+
4389
+
4390
+ /**
4391
+ * Serializes the message to binary data (in protobuf wire format).
4392
+ * @return {!Uint8Array}
4393
+ */
4394
+ proto.wechaty.puppet.RoomOwnerTransferResponse.prototype.serializeBinary = function() {
4395
+ var writer = new jspb.BinaryWriter();
4396
+ proto.wechaty.puppet.RoomOwnerTransferResponse.serializeBinaryToWriter(this, writer);
4397
+ return writer.getResultBuffer();
4398
+ };
4399
+
4400
+
4401
+ /**
4402
+ * Serializes the given message to binary data (in protobuf wire
4403
+ * format), writing to the given BinaryWriter.
4404
+ * @param {!proto.wechaty.puppet.RoomOwnerTransferResponse} message
4405
+ * @param {!jspb.BinaryWriter} writer
4406
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4407
+ */
4408
+ proto.wechaty.puppet.RoomOwnerTransferResponse.serializeBinaryToWriter = function(message, writer) {
4409
+ var f = undefined;
4410
+ };
4411
+
4412
+
4413
+
4414
+
4415
+
4416
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4417
+ /**
4418
+ * Creates an object representation of this proto.
4419
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4420
+ * Optional fields that are not set will be set to undefined.
4421
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4422
+ * For the list of reserved names please see:
4423
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4424
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4425
+ * JSPB instance for transitional soy proto support:
4426
+ * http://goto/soy-param-migration
4427
+ * @return {!Object}
4428
+ */
4429
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.toObject = function(opt_includeInstance) {
4430
+ return proto.wechaty.puppet.RoomPermissionRequest.toObject(opt_includeInstance, this);
4431
+ };
4432
+
4433
+
4434
+ /**
4435
+ * Static version of the {@see toObject} method.
4436
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4437
+ * the JSPB instance for transitional soy proto support:
4438
+ * http://goto/soy-param-migration
4439
+ * @param {!proto.wechaty.puppet.RoomPermissionRequest} msg The msg instance to transform.
4440
+ * @return {!Object}
4441
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4442
+ */
4443
+ proto.wechaty.puppet.RoomPermissionRequest.toObject = function(includeInstance, msg) {
4444
+ var f, obj = {
4445
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
4446
+ sendMessage: jspb.Message.getFieldWithDefault(msg, 2, 0),
4447
+ invitationCheck: jspb.Message.getFieldWithDefault(msg, 3, 0),
4448
+ roomTopicEdit: jspb.Message.getFieldWithDefault(msg, 4, 0)
4449
+ };
4450
+
4451
+ if (includeInstance) {
4452
+ obj.$jspbMessageInstance = msg;
4453
+ }
4454
+ return obj;
4455
+ };
4456
+ }
4457
+
4458
+
4459
+ /**
4460
+ * Deserializes binary data (in protobuf wire format).
4461
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4462
+ * @return {!proto.wechaty.puppet.RoomPermissionRequest}
4463
+ */
4464
+ proto.wechaty.puppet.RoomPermissionRequest.deserializeBinary = function(bytes) {
4465
+ var reader = new jspb.BinaryReader(bytes);
4466
+ var msg = new proto.wechaty.puppet.RoomPermissionRequest;
4467
+ return proto.wechaty.puppet.RoomPermissionRequest.deserializeBinaryFromReader(msg, reader);
4468
+ };
4469
+
4470
+
4471
+ /**
4472
+ * Deserializes binary data (in protobuf wire format) from the
4473
+ * given reader into the given message object.
4474
+ * @param {!proto.wechaty.puppet.RoomPermissionRequest} msg The message object to deserialize into.
4475
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4476
+ * @return {!proto.wechaty.puppet.RoomPermissionRequest}
4477
+ */
4478
+ proto.wechaty.puppet.RoomPermissionRequest.deserializeBinaryFromReader = function(msg, reader) {
4479
+ while (reader.nextField()) {
4480
+ if (reader.isEndGroup()) {
4481
+ break;
4482
+ }
4483
+ var field = reader.getFieldNumber();
4484
+ switch (field) {
4485
+ case 1:
4486
+ var value = /** @type {string} */ (reader.readString());
4487
+ msg.setId(value);
4488
+ break;
4489
+ case 2:
4490
+ var value = /** @type {!proto.wechaty.puppet.Bool_Optional} */ (reader.readEnum());
4491
+ msg.setSendMessage(value);
4492
+ break;
4493
+ case 3:
4494
+ var value = /** @type {!proto.wechaty.puppet.Bool_Optional} */ (reader.readEnum());
4495
+ msg.setInvitationCheck(value);
4496
+ break;
4497
+ case 4:
4498
+ var value = /** @type {!proto.wechaty.puppet.Bool_Optional} */ (reader.readEnum());
4499
+ msg.setRoomTopicEdit(value);
4500
+ break;
4501
+ default:
4502
+ reader.skipField();
4503
+ break;
4504
+ }
4505
+ }
4506
+ return msg;
4507
+ };
4508
+
4509
+
4510
+ /**
4511
+ * Serializes the message to binary data (in protobuf wire format).
4512
+ * @return {!Uint8Array}
4513
+ */
4514
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.serializeBinary = function() {
4515
+ var writer = new jspb.BinaryWriter();
4516
+ proto.wechaty.puppet.RoomPermissionRequest.serializeBinaryToWriter(this, writer);
4517
+ return writer.getResultBuffer();
4518
+ };
4519
+
4520
+
4521
+ /**
4522
+ * Serializes the given message to binary data (in protobuf wire
4523
+ * format), writing to the given BinaryWriter.
4524
+ * @param {!proto.wechaty.puppet.RoomPermissionRequest} message
4525
+ * @param {!jspb.BinaryWriter} writer
4526
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4527
+ */
4528
+ proto.wechaty.puppet.RoomPermissionRequest.serializeBinaryToWriter = function(message, writer) {
4529
+ var f = undefined;
4530
+ f = message.getId();
4531
+ if (f.length > 0) {
4532
+ writer.writeString(
4533
+ 1,
4534
+ f
4535
+ );
4536
+ }
4537
+ f = message.getSendMessage();
4538
+ if (f !== 0.0) {
4539
+ writer.writeEnum(
4540
+ 2,
4541
+ f
4542
+ );
4543
+ }
4544
+ f = message.getInvitationCheck();
4545
+ if (f !== 0.0) {
4546
+ writer.writeEnum(
4547
+ 3,
4548
+ f
4549
+ );
4550
+ }
4551
+ f = message.getRoomTopicEdit();
4552
+ if (f !== 0.0) {
4553
+ writer.writeEnum(
4554
+ 4,
4555
+ f
4556
+ );
4557
+ }
4558
+ };
4559
+
4560
+
4561
+ /**
4562
+ * optional string id = 1;
4563
+ * @return {string}
4564
+ */
4565
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.getId = function() {
4566
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4567
+ };
4568
+
4569
+
4570
+ /**
4571
+ * @param {string} value
4572
+ * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4573
+ */
4574
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.setId = function(value) {
4575
+ return jspb.Message.setProto3StringField(this, 1, value);
4576
+ };
4577
+
4578
+
4579
+ /**
4580
+ * optional Bool_Optional send_message = 2;
4581
+ * @return {!proto.wechaty.puppet.Bool_Optional}
4582
+ */
4583
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.getSendMessage = function() {
4584
+ return /** @type {!proto.wechaty.puppet.Bool_Optional} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4585
+ };
4586
+
4587
+
4588
+ /**
4589
+ * @param {!proto.wechaty.puppet.Bool_Optional} value
4590
+ * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4591
+ */
4592
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.setSendMessage = function(value) {
4593
+ return jspb.Message.setProto3EnumField(this, 2, value);
4594
+ };
4595
+
4596
+
4597
+ /**
4598
+ * optional Bool_Optional invitation_check = 3;
4599
+ * @return {!proto.wechaty.puppet.Bool_Optional}
4600
+ */
4601
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.getInvitationCheck = function() {
4602
+ return /** @type {!proto.wechaty.puppet.Bool_Optional} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4603
+ };
4604
+
4605
+
4606
+ /**
4607
+ * @param {!proto.wechaty.puppet.Bool_Optional} value
4608
+ * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4609
+ */
4610
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.setInvitationCheck = function(value) {
4611
+ return jspb.Message.setProto3EnumField(this, 3, value);
4612
+ };
4613
+
4614
+
4615
+ /**
4616
+ * optional Bool_Optional room_topic_edit = 4;
4617
+ * @return {!proto.wechaty.puppet.Bool_Optional}
4618
+ */
4619
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.getRoomTopicEdit = function() {
4620
+ return /** @type {!proto.wechaty.puppet.Bool_Optional} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4621
+ };
4622
+
4623
+
4624
+ /**
4625
+ * @param {!proto.wechaty.puppet.Bool_Optional} value
4626
+ * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4627
+ */
4628
+ proto.wechaty.puppet.RoomPermissionRequest.prototype.setRoomTopicEdit = function(value) {
4629
+ return jspb.Message.setProto3EnumField(this, 4, value);
4630
+ };
4631
+
4632
+
4633
+
4634
+
4635
+
4636
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4637
+ /**
4638
+ * Creates an object representation of this proto.
4639
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4640
+ * Optional fields that are not set will be set to undefined.
4641
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4642
+ * For the list of reserved names please see:
4643
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4644
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4645
+ * JSPB instance for transitional soy proto support:
4646
+ * http://goto/soy-param-migration
4647
+ * @return {!Object}
4648
+ */
4649
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.toObject = function(opt_includeInstance) {
4650
+ return proto.wechaty.puppet.RoomPermissionResponse.toObject(opt_includeInstance, this);
4651
+ };
4652
+
4653
+
4654
+ /**
4655
+ * Static version of the {@see toObject} method.
4656
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4657
+ * the JSPB instance for transitional soy proto support:
4658
+ * http://goto/soy-param-migration
4659
+ * @param {!proto.wechaty.puppet.RoomPermissionResponse} msg The msg instance to transform.
4660
+ * @return {!Object}
4661
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4662
+ */
4663
+ proto.wechaty.puppet.RoomPermissionResponse.toObject = function(includeInstance, msg) {
4664
+ var f, obj = {
4665
+ sendMessage: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
4666
+ invitationCheck: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
4667
+ roomTopicEdit: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
4668
+ };
4669
+
4670
+ if (includeInstance) {
4671
+ obj.$jspbMessageInstance = msg;
4672
+ }
4673
+ return obj;
4674
+ };
4675
+ }
4676
+
4677
+
4678
+ /**
4679
+ * Deserializes binary data (in protobuf wire format).
4680
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4681
+ * @return {!proto.wechaty.puppet.RoomPermissionResponse}
4682
+ */
4683
+ proto.wechaty.puppet.RoomPermissionResponse.deserializeBinary = function(bytes) {
4684
+ var reader = new jspb.BinaryReader(bytes);
4685
+ var msg = new proto.wechaty.puppet.RoomPermissionResponse;
4686
+ return proto.wechaty.puppet.RoomPermissionResponse.deserializeBinaryFromReader(msg, reader);
4687
+ };
4688
+
4689
+
4690
+ /**
4691
+ * Deserializes binary data (in protobuf wire format) from the
4692
+ * given reader into the given message object.
4693
+ * @param {!proto.wechaty.puppet.RoomPermissionResponse} msg The message object to deserialize into.
4694
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4695
+ * @return {!proto.wechaty.puppet.RoomPermissionResponse}
4696
+ */
4697
+ proto.wechaty.puppet.RoomPermissionResponse.deserializeBinaryFromReader = function(msg, reader) {
4698
+ while (reader.nextField()) {
4699
+ if (reader.isEndGroup()) {
4700
+ break;
4701
+ }
4702
+ var field = reader.getFieldNumber();
4703
+ switch (field) {
4704
+ case 1:
4705
+ var value = /** @type {boolean} */ (reader.readBool());
4706
+ msg.setSendMessage(value);
4707
+ break;
4708
+ case 2:
4709
+ var value = /** @type {boolean} */ (reader.readBool());
4710
+ msg.setInvitationCheck(value);
4711
+ break;
4712
+ case 3:
4713
+ var value = /** @type {boolean} */ (reader.readBool());
4714
+ msg.setRoomTopicEdit(value);
4715
+ break;
4716
+ default:
4717
+ reader.skipField();
4718
+ break;
4719
+ }
4720
+ }
4721
+ return msg;
4722
+ };
4723
+
4724
+
4725
+ /**
4726
+ * Serializes the message to binary data (in protobuf wire format).
4727
+ * @return {!Uint8Array}
4728
+ */
4729
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.serializeBinary = function() {
4730
+ var writer = new jspb.BinaryWriter();
4731
+ proto.wechaty.puppet.RoomPermissionResponse.serializeBinaryToWriter(this, writer);
4732
+ return writer.getResultBuffer();
4733
+ };
4734
+
4735
+
4736
+ /**
4737
+ * Serializes the given message to binary data (in protobuf wire
4738
+ * format), writing to the given BinaryWriter.
4739
+ * @param {!proto.wechaty.puppet.RoomPermissionResponse} message
4740
+ * @param {!jspb.BinaryWriter} writer
4741
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4742
+ */
4743
+ proto.wechaty.puppet.RoomPermissionResponse.serializeBinaryToWriter = function(message, writer) {
4744
+ var f = undefined;
4745
+ f = message.getSendMessage();
4746
+ if (f) {
4747
+ writer.writeBool(
4748
+ 1,
4749
+ f
4750
+ );
4751
+ }
4752
+ f = message.getInvitationCheck();
4753
+ if (f) {
4754
+ writer.writeBool(
4755
+ 2,
4756
+ f
4757
+ );
4758
+ }
4759
+ f = message.getRoomTopicEdit();
4760
+ if (f) {
4761
+ writer.writeBool(
4762
+ 3,
4763
+ f
4764
+ );
4765
+ }
4766
+ };
4767
+
4768
+
4769
+ /**
4770
+ * optional bool send_message = 1;
4771
+ * @return {boolean}
4772
+ */
4773
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.getSendMessage = function() {
4774
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
4775
+ };
4776
+
4777
+
4778
+ /**
4779
+ * @param {boolean} value
4780
+ * @return {!proto.wechaty.puppet.RoomPermissionResponse} returns this
4781
+ */
4782
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.setSendMessage = function(value) {
4783
+ return jspb.Message.setProto3BooleanField(this, 1, value);
4784
+ };
4785
+
4786
+
4787
+ /**
4788
+ * optional bool invitation_check = 2;
4789
+ * @return {boolean}
4790
+ */
4791
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.getInvitationCheck = function() {
4792
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
4793
+ };
4794
+
4795
+
4796
+ /**
4797
+ * @param {boolean} value
4798
+ * @return {!proto.wechaty.puppet.RoomPermissionResponse} returns this
4799
+ */
4800
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.setInvitationCheck = function(value) {
4801
+ return jspb.Message.setProto3BooleanField(this, 2, value);
4802
+ };
4803
+
4804
+
4805
+ /**
4806
+ * optional bool room_topic_edit = 3;
4807
+ * @return {boolean}
4808
+ */
4809
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.getRoomTopicEdit = function() {
4810
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
4811
+ };
4812
+
4813
+
4814
+ /**
4815
+ * @param {boolean} value
4816
+ * @return {!proto.wechaty.puppet.RoomPermissionResponse} returns this
4817
+ */
4818
+ proto.wechaty.puppet.RoomPermissionResponse.prototype.setRoomTopicEdit = function(value) {
4819
+ return jspb.Message.setProto3BooleanField(this, 3, value);
4820
+ };
4821
+
4822
+
4062
4823
  goog.object.extend(exports, proto.wechaty.puppet);