@juzi/wechaty-grpc 1.0.74 → 1.0.75

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 (38) hide show
  1. package/dist/cjs/out/wechaty/puppet/wecom_pb.d.ts +150 -0
  2. package/dist/cjs/out/wechaty/puppet/wecom_pb.js +1178 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +322 -208
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +447 -264
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +51 -0
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +99 -0
  7. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +57 -0
  8. package/dist/cjs/out/wechaty/puppet_pb_service.js +120 -0
  9. package/dist/cjs/proto/wechaty/puppet/wecom.proto +27 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +19 -0
  11. package/dist/cjs/src/package-json.js +1 -1
  12. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.js +15 -0
  14. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  15. package/dist/esm/out/wechaty/puppet/wecom_pb.d.ts +150 -0
  16. package/dist/esm/out/wechaty/puppet/wecom_pb.js +1178 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +322 -208
  18. package/dist/esm/out/wechaty/puppet.swagger.json +447 -264
  19. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +51 -0
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.js +99 -0
  21. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +57 -0
  22. package/dist/esm/out/wechaty/puppet_pb_service.js +120 -0
  23. package/dist/esm/proto/wechaty/puppet/wecom.proto +27 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +19 -0
  25. package/dist/esm/src/package-json.js +1 -1
  26. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  27. package/dist/esm/tests/puppet-server-impl.js +15 -0
  28. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  29. package/out/wechaty/puppet/wecom_pb.d.ts +150 -0
  30. package/out/wechaty/puppet/wecom_pb.js +1178 -0
  31. package/out/wechaty/puppet.openapi.yaml +322 -208
  32. package/out/wechaty/puppet.swagger.json +447 -264
  33. package/out/wechaty/puppet_grpc_pb.d.ts +51 -0
  34. package/out/wechaty/puppet_grpc_pb.js +99 -0
  35. package/out/wechaty/puppet_pb_service.d.ts +57 -0
  36. package/out/wechaty/puppet_pb_service.js +120 -0
  37. package/package.json +1 -1
  38. package/src/package-json.ts +1 -1
@@ -15,9 +15,16 @@ 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
+ goog.exportSymbol('proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest', null, global);
19
+ goog.exportSymbol('proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse', null, global);
18
20
  goog.exportSymbol('proto.wechaty.puppet.ContactExternalUserIdPair', null, global);
19
21
  goog.exportSymbol('proto.wechaty.puppet.GetContactExternalUserIdRequest', null, global);
20
22
  goog.exportSymbol('proto.wechaty.puppet.GetContactExternalUserIdResponse', null, global);
23
+ goog.exportSymbol('proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest', null, global);
24
+ goog.exportSymbol('proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse', null, global);
25
+ goog.exportSymbol('proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest', null, global);
26
+ goog.exportSymbol('proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse', null, global);
27
+ goog.exportSymbol('proto.wechaty.puppet.RoomAntiSpamStrategy', null, global);
21
28
  /**
22
29
  * Generated by JsPbCodeGenerator.
23
30
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -39,6 +46,27 @@ if (goog.DEBUG && !COMPILED) {
39
46
  */
40
47
  proto.wechaty.puppet.ContactExternalUserIdPair.displayName = 'proto.wechaty.puppet.ContactExternalUserIdPair';
41
48
  }
49
+ /**
50
+ * Generated by JsPbCodeGenerator.
51
+ * @param {Array=} opt_data Optional initial data array, typically from a
52
+ * server response, or constructed directly in Javascript. The array is used
53
+ * in place and becomes part of the constructed object. It is not cloned.
54
+ * If no data is provided, the constructed object will be empty, but still
55
+ * valid.
56
+ * @extends {jspb.Message}
57
+ * @constructor
58
+ */
59
+ proto.wechaty.puppet.RoomAntiSpamStrategy = function(opt_data) {
60
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
61
+ };
62
+ goog.inherits(proto.wechaty.puppet.RoomAntiSpamStrategy, jspb.Message);
63
+ if (goog.DEBUG && !COMPILED) {
64
+ /**
65
+ * @public
66
+ * @override
67
+ */
68
+ proto.wechaty.puppet.RoomAntiSpamStrategy.displayName = 'proto.wechaty.puppet.RoomAntiSpamStrategy';
69
+ }
42
70
  /**
43
71
  * Generated by JsPbCodeGenerator.
44
72
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -81,6 +109,132 @@ if (goog.DEBUG && !COMPILED) {
81
109
  */
82
110
  proto.wechaty.puppet.GetContactExternalUserIdResponse.displayName = 'proto.wechaty.puppet.GetContactExternalUserIdResponse';
83
111
  }
112
+ /**
113
+ * Generated by JsPbCodeGenerator.
114
+ * @param {Array=} opt_data Optional initial data array, typically from a
115
+ * server response, or constructed directly in Javascript. The array is used
116
+ * in place and becomes part of the constructed object. It is not cloned.
117
+ * If no data is provided, the constructed object will be empty, but still
118
+ * valid.
119
+ * @extends {jspb.Message}
120
+ * @constructor
121
+ */
122
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest = function(opt_data) {
123
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
124
+ };
125
+ goog.inherits(proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest, jspb.Message);
126
+ if (goog.DEBUG && !COMPILED) {
127
+ /**
128
+ * @public
129
+ * @override
130
+ */
131
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.displayName = 'proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest';
132
+ }
133
+ /**
134
+ * Generated by JsPbCodeGenerator.
135
+ * @param {Array=} opt_data Optional initial data array, typically from a
136
+ * server response, or constructed directly in Javascript. The array is used
137
+ * in place and becomes part of the constructed object. It is not cloned.
138
+ * If no data is provided, the constructed object will be empty, but still
139
+ * valid.
140
+ * @extends {jspb.Message}
141
+ * @constructor
142
+ */
143
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse = function(opt_data) {
144
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.repeatedFields_, null);
145
+ };
146
+ goog.inherits(proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse, jspb.Message);
147
+ if (goog.DEBUG && !COMPILED) {
148
+ /**
149
+ * @public
150
+ * @override
151
+ */
152
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.displayName = 'proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse';
153
+ }
154
+ /**
155
+ * Generated by JsPbCodeGenerator.
156
+ * @param {Array=} opt_data Optional initial data array, typically from a
157
+ * server response, or constructed directly in Javascript. The array is used
158
+ * in place and becomes part of the constructed object. It is not cloned.
159
+ * If no data is provided, the constructed object will be empty, but still
160
+ * valid.
161
+ * @extends {jspb.Message}
162
+ * @constructor
163
+ */
164
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest = function(opt_data) {
165
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
166
+ };
167
+ goog.inherits(proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest, jspb.Message);
168
+ if (goog.DEBUG && !COMPILED) {
169
+ /**
170
+ * @public
171
+ * @override
172
+ */
173
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.displayName = 'proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest';
174
+ }
175
+ /**
176
+ * Generated by JsPbCodeGenerator.
177
+ * @param {Array=} opt_data Optional initial data array, typically from a
178
+ * server response, or constructed directly in Javascript. The array is used
179
+ * in place and becomes part of the constructed object. It is not cloned.
180
+ * If no data is provided, the constructed object will be empty, but still
181
+ * valid.
182
+ * @extends {jspb.Message}
183
+ * @constructor
184
+ */
185
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse = function(opt_data) {
186
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.repeatedFields_, null);
187
+ };
188
+ goog.inherits(proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse, jspb.Message);
189
+ if (goog.DEBUG && !COMPILED) {
190
+ /**
191
+ * @public
192
+ * @override
193
+ */
194
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.displayName = 'proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse';
195
+ }
196
+ /**
197
+ * Generated by JsPbCodeGenerator.
198
+ * @param {Array=} opt_data Optional initial data array, typically from a
199
+ * server response, or constructed directly in Javascript. The array is used
200
+ * in place and becomes part of the constructed object. It is not cloned.
201
+ * If no data is provided, the constructed object will be empty, but still
202
+ * valid.
203
+ * @extends {jspb.Message}
204
+ * @constructor
205
+ */
206
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest = function(opt_data) {
207
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.repeatedFields_, null);
208
+ };
209
+ goog.inherits(proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest, jspb.Message);
210
+ if (goog.DEBUG && !COMPILED) {
211
+ /**
212
+ * @public
213
+ * @override
214
+ */
215
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.displayName = 'proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest';
216
+ }
217
+ /**
218
+ * Generated by JsPbCodeGenerator.
219
+ * @param {Array=} opt_data Optional initial data array, typically from a
220
+ * server response, or constructed directly in Javascript. The array is used
221
+ * in place and becomes part of the constructed object. It is not cloned.
222
+ * If no data is provided, the constructed object will be empty, but still
223
+ * valid.
224
+ * @extends {jspb.Message}
225
+ * @constructor
226
+ */
227
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse = function(opt_data) {
228
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
229
+ };
230
+ goog.inherits(proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse, jspb.Message);
231
+ if (goog.DEBUG && !COMPILED) {
232
+ /**
233
+ * @public
234
+ * @override
235
+ */
236
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.displayName = 'proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse';
237
+ }
84
238
 
85
239
 
86
240
 
@@ -242,6 +396,166 @@ proto.wechaty.puppet.ContactExternalUserIdPair.prototype.setExternalUserId = fun
242
396
 
243
397
 
244
398
 
399
+
400
+
401
+ if (jspb.Message.GENERATE_TO_OBJECT) {
402
+ /**
403
+ * Creates an object representation of this proto.
404
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
405
+ * Optional fields that are not set will be set to undefined.
406
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
407
+ * For the list of reserved names please see:
408
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
409
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
410
+ * JSPB instance for transitional soy proto support:
411
+ * http://goto/soy-param-migration
412
+ * @return {!Object}
413
+ */
414
+ proto.wechaty.puppet.RoomAntiSpamStrategy.prototype.toObject = function(opt_includeInstance) {
415
+ return proto.wechaty.puppet.RoomAntiSpamStrategy.toObject(opt_includeInstance, this);
416
+ };
417
+
418
+
419
+ /**
420
+ * Static version of the {@see toObject} method.
421
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
422
+ * the JSPB instance for transitional soy proto support:
423
+ * http://goto/soy-param-migration
424
+ * @param {!proto.wechaty.puppet.RoomAntiSpamStrategy} msg The msg instance to transform.
425
+ * @return {!Object}
426
+ * @suppress {unusedLocalVariables} f is only used for nested messages
427
+ */
428
+ proto.wechaty.puppet.RoomAntiSpamStrategy.toObject = function(includeInstance, msg) {
429
+ var f, obj = {
430
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
431
+ name: jspb.Message.getFieldWithDefault(msg, 2, "")
432
+ };
433
+
434
+ if (includeInstance) {
435
+ obj.$jspbMessageInstance = msg;
436
+ }
437
+ return obj;
438
+ };
439
+ }
440
+
441
+
442
+ /**
443
+ * Deserializes binary data (in protobuf wire format).
444
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
445
+ * @return {!proto.wechaty.puppet.RoomAntiSpamStrategy}
446
+ */
447
+ proto.wechaty.puppet.RoomAntiSpamStrategy.deserializeBinary = function(bytes) {
448
+ var reader = new jspb.BinaryReader(bytes);
449
+ var msg = new proto.wechaty.puppet.RoomAntiSpamStrategy;
450
+ return proto.wechaty.puppet.RoomAntiSpamStrategy.deserializeBinaryFromReader(msg, reader);
451
+ };
452
+
453
+
454
+ /**
455
+ * Deserializes binary data (in protobuf wire format) from the
456
+ * given reader into the given message object.
457
+ * @param {!proto.wechaty.puppet.RoomAntiSpamStrategy} msg The message object to deserialize into.
458
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
459
+ * @return {!proto.wechaty.puppet.RoomAntiSpamStrategy}
460
+ */
461
+ proto.wechaty.puppet.RoomAntiSpamStrategy.deserializeBinaryFromReader = function(msg, reader) {
462
+ while (reader.nextField()) {
463
+ if (reader.isEndGroup()) {
464
+ break;
465
+ }
466
+ var field = reader.getFieldNumber();
467
+ switch (field) {
468
+ case 1:
469
+ var value = /** @type {string} */ (reader.readString());
470
+ msg.setId(value);
471
+ break;
472
+ case 2:
473
+ var value = /** @type {string} */ (reader.readString());
474
+ msg.setName(value);
475
+ break;
476
+ default:
477
+ reader.skipField();
478
+ break;
479
+ }
480
+ }
481
+ return msg;
482
+ };
483
+
484
+
485
+ /**
486
+ * Serializes the message to binary data (in protobuf wire format).
487
+ * @return {!Uint8Array}
488
+ */
489
+ proto.wechaty.puppet.RoomAntiSpamStrategy.prototype.serializeBinary = function() {
490
+ var writer = new jspb.BinaryWriter();
491
+ proto.wechaty.puppet.RoomAntiSpamStrategy.serializeBinaryToWriter(this, writer);
492
+ return writer.getResultBuffer();
493
+ };
494
+
495
+
496
+ /**
497
+ * Serializes the given message to binary data (in protobuf wire
498
+ * format), writing to the given BinaryWriter.
499
+ * @param {!proto.wechaty.puppet.RoomAntiSpamStrategy} message
500
+ * @param {!jspb.BinaryWriter} writer
501
+ * @suppress {unusedLocalVariables} f is only used for nested messages
502
+ */
503
+ proto.wechaty.puppet.RoomAntiSpamStrategy.serializeBinaryToWriter = function(message, writer) {
504
+ var f = undefined;
505
+ f = message.getId();
506
+ if (f.length > 0) {
507
+ writer.writeString(
508
+ 1,
509
+ f
510
+ );
511
+ }
512
+ f = message.getName();
513
+ if (f.length > 0) {
514
+ writer.writeString(
515
+ 2,
516
+ f
517
+ );
518
+ }
519
+ };
520
+
521
+
522
+ /**
523
+ * optional string id = 1;
524
+ * @return {string}
525
+ */
526
+ proto.wechaty.puppet.RoomAntiSpamStrategy.prototype.getId = function() {
527
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
528
+ };
529
+
530
+
531
+ /**
532
+ * @param {string} value
533
+ * @return {!proto.wechaty.puppet.RoomAntiSpamStrategy} returns this
534
+ */
535
+ proto.wechaty.puppet.RoomAntiSpamStrategy.prototype.setId = function(value) {
536
+ return jspb.Message.setProto3StringField(this, 1, value);
537
+ };
538
+
539
+
540
+ /**
541
+ * optional string name = 2;
542
+ * @return {string}
543
+ */
544
+ proto.wechaty.puppet.RoomAntiSpamStrategy.prototype.getName = function() {
545
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
546
+ };
547
+
548
+
549
+ /**
550
+ * @param {string} value
551
+ * @return {!proto.wechaty.puppet.RoomAntiSpamStrategy} returns this
552
+ */
553
+ proto.wechaty.puppet.RoomAntiSpamStrategy.prototype.setName = function(value) {
554
+ return jspb.Message.setProto3StringField(this, 2, value);
555
+ };
556
+
557
+
558
+
245
559
  /**
246
560
  * List of repeated fields within this message type.
247
561
  * @private {!Array<number>}
@@ -587,4 +901,868 @@ proto.wechaty.puppet.GetContactExternalUserIdResponse.prototype.clearContactExte
587
901
  };
588
902
 
589
903
 
904
+
905
+
906
+
907
+ if (jspb.Message.GENERATE_TO_OBJECT) {
908
+ /**
909
+ * Creates an object representation of this proto.
910
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
911
+ * Optional fields that are not set will be set to undefined.
912
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
913
+ * For the list of reserved names please see:
914
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
915
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
916
+ * JSPB instance for transitional soy proto support:
917
+ * http://goto/soy-param-migration
918
+ * @return {!Object}
919
+ */
920
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.prototype.toObject = function(opt_includeInstance) {
921
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.toObject(opt_includeInstance, this);
922
+ };
923
+
924
+
925
+ /**
926
+ * Static version of the {@see toObject} method.
927
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
928
+ * the JSPB instance for transitional soy proto support:
929
+ * http://goto/soy-param-migration
930
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest} msg The msg instance to transform.
931
+ * @return {!Object}
932
+ * @suppress {unusedLocalVariables} f is only used for nested messages
933
+ */
934
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.toObject = function(includeInstance, msg) {
935
+ var f, obj = {
936
+
937
+ };
938
+
939
+ if (includeInstance) {
940
+ obj.$jspbMessageInstance = msg;
941
+ }
942
+ return obj;
943
+ };
944
+ }
945
+
946
+
947
+ /**
948
+ * Deserializes binary data (in protobuf wire format).
949
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
950
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest}
951
+ */
952
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.deserializeBinary = function(bytes) {
953
+ var reader = new jspb.BinaryReader(bytes);
954
+ var msg = new proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest;
955
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.deserializeBinaryFromReader(msg, reader);
956
+ };
957
+
958
+
959
+ /**
960
+ * Deserializes binary data (in protobuf wire format) from the
961
+ * given reader into the given message object.
962
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest} msg The message object to deserialize into.
963
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
964
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest}
965
+ */
966
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.deserializeBinaryFromReader = function(msg, reader) {
967
+ while (reader.nextField()) {
968
+ if (reader.isEndGroup()) {
969
+ break;
970
+ }
971
+ var field = reader.getFieldNumber();
972
+ switch (field) {
973
+ default:
974
+ reader.skipField();
975
+ break;
976
+ }
977
+ }
978
+ return msg;
979
+ };
980
+
981
+
982
+ /**
983
+ * Serializes the message to binary data (in protobuf wire format).
984
+ * @return {!Uint8Array}
985
+ */
986
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.prototype.serializeBinary = function() {
987
+ var writer = new jspb.BinaryWriter();
988
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.serializeBinaryToWriter(this, writer);
989
+ return writer.getResultBuffer();
990
+ };
991
+
992
+
993
+ /**
994
+ * Serializes the given message to binary data (in protobuf wire
995
+ * format), writing to the given BinaryWriter.
996
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest} message
997
+ * @param {!jspb.BinaryWriter} writer
998
+ * @suppress {unusedLocalVariables} f is only used for nested messages
999
+ */
1000
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListRequest.serializeBinaryToWriter = function(message, writer) {
1001
+ var f = undefined;
1002
+ };
1003
+
1004
+
1005
+
1006
+ /**
1007
+ * List of repeated fields within this message type.
1008
+ * @private {!Array<number>}
1009
+ * @const
1010
+ */
1011
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.repeatedFields_ = [1];
1012
+
1013
+
1014
+
1015
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1016
+ /**
1017
+ * Creates an object representation of this proto.
1018
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1019
+ * Optional fields that are not set will be set to undefined.
1020
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1021
+ * For the list of reserved names please see:
1022
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1023
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1024
+ * JSPB instance for transitional soy proto support:
1025
+ * http://goto/soy-param-migration
1026
+ * @return {!Object}
1027
+ */
1028
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.prototype.toObject = function(opt_includeInstance) {
1029
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.toObject(opt_includeInstance, this);
1030
+ };
1031
+
1032
+
1033
+ /**
1034
+ * Static version of the {@see toObject} method.
1035
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1036
+ * the JSPB instance for transitional soy proto support:
1037
+ * http://goto/soy-param-migration
1038
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse} msg The msg instance to transform.
1039
+ * @return {!Object}
1040
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1041
+ */
1042
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.toObject = function(includeInstance, msg) {
1043
+ var f, obj = {
1044
+ strategiesList: jspb.Message.toObjectList(msg.getStrategiesList(),
1045
+ proto.wechaty.puppet.RoomAntiSpamStrategy.toObject, includeInstance)
1046
+ };
1047
+
1048
+ if (includeInstance) {
1049
+ obj.$jspbMessageInstance = msg;
1050
+ }
1051
+ return obj;
1052
+ };
1053
+ }
1054
+
1055
+
1056
+ /**
1057
+ * Deserializes binary data (in protobuf wire format).
1058
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1059
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse}
1060
+ */
1061
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.deserializeBinary = function(bytes) {
1062
+ var reader = new jspb.BinaryReader(bytes);
1063
+ var msg = new proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse;
1064
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.deserializeBinaryFromReader(msg, reader);
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * Deserializes binary data (in protobuf wire format) from the
1070
+ * given reader into the given message object.
1071
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse} msg The message object to deserialize into.
1072
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1073
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse}
1074
+ */
1075
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.deserializeBinaryFromReader = function(msg, reader) {
1076
+ while (reader.nextField()) {
1077
+ if (reader.isEndGroup()) {
1078
+ break;
1079
+ }
1080
+ var field = reader.getFieldNumber();
1081
+ switch (field) {
1082
+ case 1:
1083
+ var value = new proto.wechaty.puppet.RoomAntiSpamStrategy;
1084
+ reader.readMessage(value,proto.wechaty.puppet.RoomAntiSpamStrategy.deserializeBinaryFromReader);
1085
+ msg.addStrategies(value);
1086
+ break;
1087
+ default:
1088
+ reader.skipField();
1089
+ break;
1090
+ }
1091
+ }
1092
+ return msg;
1093
+ };
1094
+
1095
+
1096
+ /**
1097
+ * Serializes the message to binary data (in protobuf wire format).
1098
+ * @return {!Uint8Array}
1099
+ */
1100
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.prototype.serializeBinary = function() {
1101
+ var writer = new jspb.BinaryWriter();
1102
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.serializeBinaryToWriter(this, writer);
1103
+ return writer.getResultBuffer();
1104
+ };
1105
+
1106
+
1107
+ /**
1108
+ * Serializes the given message to binary data (in protobuf wire
1109
+ * format), writing to the given BinaryWriter.
1110
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse} message
1111
+ * @param {!jspb.BinaryWriter} writer
1112
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1113
+ */
1114
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.serializeBinaryToWriter = function(message, writer) {
1115
+ var f = undefined;
1116
+ f = message.getStrategiesList();
1117
+ if (f.length > 0) {
1118
+ writer.writeRepeatedMessage(
1119
+ 1,
1120
+ f,
1121
+ proto.wechaty.puppet.RoomAntiSpamStrategy.serializeBinaryToWriter
1122
+ );
1123
+ }
1124
+ };
1125
+
1126
+
1127
+ /**
1128
+ * repeated RoomAntiSpamStrategy strategies = 1;
1129
+ * @return {!Array<!proto.wechaty.puppet.RoomAntiSpamStrategy>}
1130
+ */
1131
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.prototype.getStrategiesList = function() {
1132
+ return /** @type{!Array<!proto.wechaty.puppet.RoomAntiSpamStrategy>} */ (
1133
+ jspb.Message.getRepeatedWrapperField(this, proto.wechaty.puppet.RoomAntiSpamStrategy, 1));
1134
+ };
1135
+
1136
+
1137
+ /**
1138
+ * @param {!Array<!proto.wechaty.puppet.RoomAntiSpamStrategy>} value
1139
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse} returns this
1140
+ */
1141
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.prototype.setStrategiesList = function(value) {
1142
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1143
+ };
1144
+
1145
+
1146
+ /**
1147
+ * @param {!proto.wechaty.puppet.RoomAntiSpamStrategy=} opt_value
1148
+ * @param {number=} opt_index
1149
+ * @return {!proto.wechaty.puppet.RoomAntiSpamStrategy}
1150
+ */
1151
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.prototype.addStrategies = function(opt_value, opt_index) {
1152
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.wechaty.puppet.RoomAntiSpamStrategy, opt_index);
1153
+ };
1154
+
1155
+
1156
+ /**
1157
+ * Clears the list making it empty but non-null.
1158
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse} returns this
1159
+ */
1160
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyListResponse.prototype.clearStrategiesList = function() {
1161
+ return this.setStrategiesList([]);
1162
+ };
1163
+
1164
+
1165
+
1166
+
1167
+
1168
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1169
+ /**
1170
+ * Creates an object representation of this proto.
1171
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1172
+ * Optional fields that are not set will be set to undefined.
1173
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1174
+ * For the list of reserved names please see:
1175
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1176
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1177
+ * JSPB instance for transitional soy proto support:
1178
+ * http://goto/soy-param-migration
1179
+ * @return {!Object}
1180
+ */
1181
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.prototype.toObject = function(opt_includeInstance) {
1182
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.toObject(opt_includeInstance, this);
1183
+ };
1184
+
1185
+
1186
+ /**
1187
+ * Static version of the {@see toObject} method.
1188
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1189
+ * the JSPB instance for transitional soy proto support:
1190
+ * http://goto/soy-param-migration
1191
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest} msg The msg instance to transform.
1192
+ * @return {!Object}
1193
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1194
+ */
1195
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.toObject = function(includeInstance, msg) {
1196
+ var f, obj = {
1197
+ strategyId: jspb.Message.getFieldWithDefault(msg, 1, "")
1198
+ };
1199
+
1200
+ if (includeInstance) {
1201
+ obj.$jspbMessageInstance = msg;
1202
+ }
1203
+ return obj;
1204
+ };
1205
+ }
1206
+
1207
+
1208
+ /**
1209
+ * Deserializes binary data (in protobuf wire format).
1210
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1211
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest}
1212
+ */
1213
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.deserializeBinary = function(bytes) {
1214
+ var reader = new jspb.BinaryReader(bytes);
1215
+ var msg = new proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest;
1216
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.deserializeBinaryFromReader(msg, reader);
1217
+ };
1218
+
1219
+
1220
+ /**
1221
+ * Deserializes binary data (in protobuf wire format) from the
1222
+ * given reader into the given message object.
1223
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest} msg The message object to deserialize into.
1224
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1225
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest}
1226
+ */
1227
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.deserializeBinaryFromReader = function(msg, reader) {
1228
+ while (reader.nextField()) {
1229
+ if (reader.isEndGroup()) {
1230
+ break;
1231
+ }
1232
+ var field = reader.getFieldNumber();
1233
+ switch (field) {
1234
+ case 1:
1235
+ var value = /** @type {string} */ (reader.readString());
1236
+ msg.setStrategyId(value);
1237
+ break;
1238
+ default:
1239
+ reader.skipField();
1240
+ break;
1241
+ }
1242
+ }
1243
+ return msg;
1244
+ };
1245
+
1246
+
1247
+ /**
1248
+ * Serializes the message to binary data (in protobuf wire format).
1249
+ * @return {!Uint8Array}
1250
+ */
1251
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.prototype.serializeBinary = function() {
1252
+ var writer = new jspb.BinaryWriter();
1253
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.serializeBinaryToWriter(this, writer);
1254
+ return writer.getResultBuffer();
1255
+ };
1256
+
1257
+
1258
+ /**
1259
+ * Serializes the given message to binary data (in protobuf wire
1260
+ * format), writing to the given BinaryWriter.
1261
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest} message
1262
+ * @param {!jspb.BinaryWriter} writer
1263
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1264
+ */
1265
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.serializeBinaryToWriter = function(message, writer) {
1266
+ var f = undefined;
1267
+ f = message.getStrategyId();
1268
+ if (f.length > 0) {
1269
+ writer.writeString(
1270
+ 1,
1271
+ f
1272
+ );
1273
+ }
1274
+ };
1275
+
1276
+
1277
+ /**
1278
+ * optional string strategy_id = 1;
1279
+ * @return {string}
1280
+ */
1281
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.prototype.getStrategyId = function() {
1282
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1283
+ };
1284
+
1285
+
1286
+ /**
1287
+ * @param {string} value
1288
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest} returns this
1289
+ */
1290
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListRequest.prototype.setStrategyId = function(value) {
1291
+ return jspb.Message.setProto3StringField(this, 1, value);
1292
+ };
1293
+
1294
+
1295
+
1296
+ /**
1297
+ * List of repeated fields within this message type.
1298
+ * @private {!Array<number>}
1299
+ * @const
1300
+ */
1301
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.repeatedFields_ = [1];
1302
+
1303
+
1304
+
1305
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1306
+ /**
1307
+ * Creates an object representation of this proto.
1308
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1309
+ * Optional fields that are not set will be set to undefined.
1310
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1311
+ * For the list of reserved names please see:
1312
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1313
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1314
+ * JSPB instance for transitional soy proto support:
1315
+ * http://goto/soy-param-migration
1316
+ * @return {!Object}
1317
+ */
1318
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.prototype.toObject = function(opt_includeInstance) {
1319
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.toObject(opt_includeInstance, this);
1320
+ };
1321
+
1322
+
1323
+ /**
1324
+ * Static version of the {@see toObject} method.
1325
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1326
+ * the JSPB instance for transitional soy proto support:
1327
+ * http://goto/soy-param-migration
1328
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse} msg The msg instance to transform.
1329
+ * @return {!Object}
1330
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1331
+ */
1332
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.toObject = function(includeInstance, msg) {
1333
+ var f, obj = {
1334
+ roomIdsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
1335
+ };
1336
+
1337
+ if (includeInstance) {
1338
+ obj.$jspbMessageInstance = msg;
1339
+ }
1340
+ return obj;
1341
+ };
1342
+ }
1343
+
1344
+
1345
+ /**
1346
+ * Deserializes binary data (in protobuf wire format).
1347
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1348
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse}
1349
+ */
1350
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.deserializeBinary = function(bytes) {
1351
+ var reader = new jspb.BinaryReader(bytes);
1352
+ var msg = new proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse;
1353
+ return proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.deserializeBinaryFromReader(msg, reader);
1354
+ };
1355
+
1356
+
1357
+ /**
1358
+ * Deserializes binary data (in protobuf wire format) from the
1359
+ * given reader into the given message object.
1360
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse} msg The message object to deserialize into.
1361
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1362
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse}
1363
+ */
1364
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.deserializeBinaryFromReader = function(msg, reader) {
1365
+ while (reader.nextField()) {
1366
+ if (reader.isEndGroup()) {
1367
+ break;
1368
+ }
1369
+ var field = reader.getFieldNumber();
1370
+ switch (field) {
1371
+ case 1:
1372
+ var value = /** @type {string} */ (reader.readString());
1373
+ msg.addRoomIds(value);
1374
+ break;
1375
+ default:
1376
+ reader.skipField();
1377
+ break;
1378
+ }
1379
+ }
1380
+ return msg;
1381
+ };
1382
+
1383
+
1384
+ /**
1385
+ * Serializes the message to binary data (in protobuf wire format).
1386
+ * @return {!Uint8Array}
1387
+ */
1388
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.prototype.serializeBinary = function() {
1389
+ var writer = new jspb.BinaryWriter();
1390
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.serializeBinaryToWriter(this, writer);
1391
+ return writer.getResultBuffer();
1392
+ };
1393
+
1394
+
1395
+ /**
1396
+ * Serializes the given message to binary data (in protobuf wire
1397
+ * format), writing to the given BinaryWriter.
1398
+ * @param {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse} message
1399
+ * @param {!jspb.BinaryWriter} writer
1400
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1401
+ */
1402
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.serializeBinaryToWriter = function(message, writer) {
1403
+ var f = undefined;
1404
+ f = message.getRoomIdsList();
1405
+ if (f.length > 0) {
1406
+ writer.writeRepeatedString(
1407
+ 1,
1408
+ f
1409
+ );
1410
+ }
1411
+ };
1412
+
1413
+
1414
+ /**
1415
+ * repeated string room_ids = 1;
1416
+ * @return {!Array<string>}
1417
+ */
1418
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.prototype.getRoomIdsList = function() {
1419
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1420
+ };
1421
+
1422
+
1423
+ /**
1424
+ * @param {!Array<string>} value
1425
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse} returns this
1426
+ */
1427
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.prototype.setRoomIdsList = function(value) {
1428
+ return jspb.Message.setField(this, 1, value || []);
1429
+ };
1430
+
1431
+
1432
+ /**
1433
+ * @param {string} value
1434
+ * @param {number=} opt_index
1435
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse} returns this
1436
+ */
1437
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.prototype.addRoomIds = function(value, opt_index) {
1438
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1439
+ };
1440
+
1441
+
1442
+ /**
1443
+ * Clears the list making it empty but non-null.
1444
+ * @return {!proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse} returns this
1445
+ */
1446
+ proto.wechaty.puppet.GetRoomAntiSpamStrategyEffectRoomListResponse.prototype.clearRoomIdsList = function() {
1447
+ return this.setRoomIdsList([]);
1448
+ };
1449
+
1450
+
1451
+
1452
+ /**
1453
+ * List of repeated fields within this message type.
1454
+ * @private {!Array<number>}
1455
+ * @const
1456
+ */
1457
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.repeatedFields_ = [2];
1458
+
1459
+
1460
+
1461
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1462
+ /**
1463
+ * Creates an object representation of this proto.
1464
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1465
+ * Optional fields that are not set will be set to undefined.
1466
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1467
+ * For the list of reserved names please see:
1468
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1469
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1470
+ * JSPB instance for transitional soy proto support:
1471
+ * http://goto/soy-param-migration
1472
+ * @return {!Object}
1473
+ */
1474
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.toObject = function(opt_includeInstance) {
1475
+ return proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.toObject(opt_includeInstance, this);
1476
+ };
1477
+
1478
+
1479
+ /**
1480
+ * Static version of the {@see toObject} method.
1481
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1482
+ * the JSPB instance for transitional soy proto support:
1483
+ * http://goto/soy-param-migration
1484
+ * @param {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} msg The msg instance to transform.
1485
+ * @return {!Object}
1486
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1487
+ */
1488
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.toObject = function(includeInstance, msg) {
1489
+ var f, obj = {
1490
+ strategyId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1491
+ roomIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
1492
+ active: jspb.Message.getBooleanFieldWithDefault(msg, 3, false)
1493
+ };
1494
+
1495
+ if (includeInstance) {
1496
+ obj.$jspbMessageInstance = msg;
1497
+ }
1498
+ return obj;
1499
+ };
1500
+ }
1501
+
1502
+
1503
+ /**
1504
+ * Deserializes binary data (in protobuf wire format).
1505
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1506
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest}
1507
+ */
1508
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.deserializeBinary = function(bytes) {
1509
+ var reader = new jspb.BinaryReader(bytes);
1510
+ var msg = new proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest;
1511
+ return proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.deserializeBinaryFromReader(msg, reader);
1512
+ };
1513
+
1514
+
1515
+ /**
1516
+ * Deserializes binary data (in protobuf wire format) from the
1517
+ * given reader into the given message object.
1518
+ * @param {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} msg The message object to deserialize into.
1519
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1520
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest}
1521
+ */
1522
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.deserializeBinaryFromReader = function(msg, reader) {
1523
+ while (reader.nextField()) {
1524
+ if (reader.isEndGroup()) {
1525
+ break;
1526
+ }
1527
+ var field = reader.getFieldNumber();
1528
+ switch (field) {
1529
+ case 1:
1530
+ var value = /** @type {string} */ (reader.readString());
1531
+ msg.setStrategyId(value);
1532
+ break;
1533
+ case 2:
1534
+ var value = /** @type {string} */ (reader.readString());
1535
+ msg.addRoomIds(value);
1536
+ break;
1537
+ case 3:
1538
+ var value = /** @type {boolean} */ (reader.readBool());
1539
+ msg.setActive(value);
1540
+ break;
1541
+ default:
1542
+ reader.skipField();
1543
+ break;
1544
+ }
1545
+ }
1546
+ return msg;
1547
+ };
1548
+
1549
+
1550
+ /**
1551
+ * Serializes the message to binary data (in protobuf wire format).
1552
+ * @return {!Uint8Array}
1553
+ */
1554
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.serializeBinary = function() {
1555
+ var writer = new jspb.BinaryWriter();
1556
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.serializeBinaryToWriter(this, writer);
1557
+ return writer.getResultBuffer();
1558
+ };
1559
+
1560
+
1561
+ /**
1562
+ * Serializes the given message to binary data (in protobuf wire
1563
+ * format), writing to the given BinaryWriter.
1564
+ * @param {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} message
1565
+ * @param {!jspb.BinaryWriter} writer
1566
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1567
+ */
1568
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.serializeBinaryToWriter = function(message, writer) {
1569
+ var f = undefined;
1570
+ f = message.getStrategyId();
1571
+ if (f.length > 0) {
1572
+ writer.writeString(
1573
+ 1,
1574
+ f
1575
+ );
1576
+ }
1577
+ f = message.getRoomIdsList();
1578
+ if (f.length > 0) {
1579
+ writer.writeRepeatedString(
1580
+ 2,
1581
+ f
1582
+ );
1583
+ }
1584
+ f = message.getActive();
1585
+ if (f) {
1586
+ writer.writeBool(
1587
+ 3,
1588
+ f
1589
+ );
1590
+ }
1591
+ };
1592
+
1593
+
1594
+ /**
1595
+ * optional string strategy_id = 1;
1596
+ * @return {string}
1597
+ */
1598
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.getStrategyId = function() {
1599
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1600
+ };
1601
+
1602
+
1603
+ /**
1604
+ * @param {string} value
1605
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} returns this
1606
+ */
1607
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.setStrategyId = function(value) {
1608
+ return jspb.Message.setProto3StringField(this, 1, value);
1609
+ };
1610
+
1611
+
1612
+ /**
1613
+ * repeated string room_ids = 2;
1614
+ * @return {!Array<string>}
1615
+ */
1616
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.getRoomIdsList = function() {
1617
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
1618
+ };
1619
+
1620
+
1621
+ /**
1622
+ * @param {!Array<string>} value
1623
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} returns this
1624
+ */
1625
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.setRoomIdsList = function(value) {
1626
+ return jspb.Message.setField(this, 2, value || []);
1627
+ };
1628
+
1629
+
1630
+ /**
1631
+ * @param {string} value
1632
+ * @param {number=} opt_index
1633
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} returns this
1634
+ */
1635
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.addRoomIds = function(value, opt_index) {
1636
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1637
+ };
1638
+
1639
+
1640
+ /**
1641
+ * Clears the list making it empty but non-null.
1642
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} returns this
1643
+ */
1644
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.clearRoomIdsList = function() {
1645
+ return this.setRoomIdsList([]);
1646
+ };
1647
+
1648
+
1649
+ /**
1650
+ * optional bool active = 3;
1651
+ * @return {boolean}
1652
+ */
1653
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.getActive = function() {
1654
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
1655
+ };
1656
+
1657
+
1658
+ /**
1659
+ * @param {boolean} value
1660
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest} returns this
1661
+ */
1662
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyRequest.prototype.setActive = function(value) {
1663
+ return jspb.Message.setProto3BooleanField(this, 3, value);
1664
+ };
1665
+
1666
+
1667
+
1668
+
1669
+
1670
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1671
+ /**
1672
+ * Creates an object representation of this proto.
1673
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1674
+ * Optional fields that are not set will be set to undefined.
1675
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1676
+ * For the list of reserved names please see:
1677
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1678
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1679
+ * JSPB instance for transitional soy proto support:
1680
+ * http://goto/soy-param-migration
1681
+ * @return {!Object}
1682
+ */
1683
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.prototype.toObject = function(opt_includeInstance) {
1684
+ return proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.toObject(opt_includeInstance, this);
1685
+ };
1686
+
1687
+
1688
+ /**
1689
+ * Static version of the {@see toObject} method.
1690
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1691
+ * the JSPB instance for transitional soy proto support:
1692
+ * http://goto/soy-param-migration
1693
+ * @param {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse} msg The msg instance to transform.
1694
+ * @return {!Object}
1695
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1696
+ */
1697
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.toObject = function(includeInstance, msg) {
1698
+ var f, obj = {
1699
+
1700
+ };
1701
+
1702
+ if (includeInstance) {
1703
+ obj.$jspbMessageInstance = msg;
1704
+ }
1705
+ return obj;
1706
+ };
1707
+ }
1708
+
1709
+
1710
+ /**
1711
+ * Deserializes binary data (in protobuf wire format).
1712
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1713
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse}
1714
+ */
1715
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.deserializeBinary = function(bytes) {
1716
+ var reader = new jspb.BinaryReader(bytes);
1717
+ var msg = new proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse;
1718
+ return proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.deserializeBinaryFromReader(msg, reader);
1719
+ };
1720
+
1721
+
1722
+ /**
1723
+ * Deserializes binary data (in protobuf wire format) from the
1724
+ * given reader into the given message object.
1725
+ * @param {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse} msg The message object to deserialize into.
1726
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1727
+ * @return {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse}
1728
+ */
1729
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.deserializeBinaryFromReader = function(msg, reader) {
1730
+ while (reader.nextField()) {
1731
+ if (reader.isEndGroup()) {
1732
+ break;
1733
+ }
1734
+ var field = reader.getFieldNumber();
1735
+ switch (field) {
1736
+ default:
1737
+ reader.skipField();
1738
+ break;
1739
+ }
1740
+ }
1741
+ return msg;
1742
+ };
1743
+
1744
+
1745
+ /**
1746
+ * Serializes the message to binary data (in protobuf wire format).
1747
+ * @return {!Uint8Array}
1748
+ */
1749
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.prototype.serializeBinary = function() {
1750
+ var writer = new jspb.BinaryWriter();
1751
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.serializeBinaryToWriter(this, writer);
1752
+ return writer.getResultBuffer();
1753
+ };
1754
+
1755
+
1756
+ /**
1757
+ * Serializes the given message to binary data (in protobuf wire
1758
+ * format), writing to the given BinaryWriter.
1759
+ * @param {!proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse} message
1760
+ * @param {!jspb.BinaryWriter} writer
1761
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1762
+ */
1763
+ proto.wechaty.puppet.ApplyRoomAntiSpamStrategyResponse.serializeBinaryToWriter = function(message, writer) {
1764
+ var f = undefined;
1765
+ };
1766
+
1767
+
590
1768
  goog.object.extend(exports, proto.wechaty.puppet);