UNPKG

@chatie/grpc

Version:
1,554 lines (1,382 loc) 107 kB
// source: puppet/room.proto /** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); goog.exportSymbol('proto.wechaty.puppet.RoomAddRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomAddResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomAnnounceRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomAnnounceResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomAvatarRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomAvatarResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomCreateRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomCreateResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomDelRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomDelResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomListRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomListResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomPayloadRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomPayloadResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomQRCodeRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomQRCodeResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomQuitRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomQuitResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomTopicRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomTopicResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomListRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomListRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomListRequest.displayName = 'proto.wechaty.puppet.RoomListRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomListResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.RoomListResponse.repeatedFields_, null); }; goog.inherits(proto.wechaty.puppet.RoomListResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomListResponse.displayName = 'proto.wechaty.puppet.RoomListResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomPayloadRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomPayloadRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomPayloadRequest.displayName = 'proto.wechaty.puppet.RoomPayloadRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomPayloadResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.RoomPayloadResponse.repeatedFields_, null); }; goog.inherits(proto.wechaty.puppet.RoomPayloadResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomPayloadResponse.displayName = 'proto.wechaty.puppet.RoomPayloadResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomAddRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomAddRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomAddRequest.displayName = 'proto.wechaty.puppet.RoomAddRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomAddResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomAddResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomAddResponse.displayName = 'proto.wechaty.puppet.RoomAddResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomAvatarRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomAvatarRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomAvatarRequest.displayName = 'proto.wechaty.puppet.RoomAvatarRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomAvatarResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomAvatarResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomAvatarResponse.displayName = 'proto.wechaty.puppet.RoomAvatarResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomCreateRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.RoomCreateRequest.repeatedFields_, null); }; goog.inherits(proto.wechaty.puppet.RoomCreateRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomCreateRequest.displayName = 'proto.wechaty.puppet.RoomCreateRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomCreateResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomCreateResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomCreateResponse.displayName = 'proto.wechaty.puppet.RoomCreateResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomDelRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomDelRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomDelRequest.displayName = 'proto.wechaty.puppet.RoomDelRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomDelResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomDelResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomDelResponse.displayName = 'proto.wechaty.puppet.RoomDelResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomQuitRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomQuitRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomQuitRequest.displayName = 'proto.wechaty.puppet.RoomQuitRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomQuitResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomQuitResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomQuitResponse.displayName = 'proto.wechaty.puppet.RoomQuitResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomTopicRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomTopicRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomTopicRequest.displayName = 'proto.wechaty.puppet.RoomTopicRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomTopicResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomTopicResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomTopicResponse.displayName = 'proto.wechaty.puppet.RoomTopicResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomQRCodeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomQRCodeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomQRCodeRequest.displayName = 'proto.wechaty.puppet.RoomQRCodeRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomQRCodeResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomQRCodeResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomQRCodeResponse.displayName = 'proto.wechaty.puppet.RoomQRCodeResponse'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomAnnounceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomAnnounceRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomAnnounceRequest.displayName = 'proto.wechaty.puppet.RoomAnnounceRequest'; } /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.wechaty.puppet.RoomAnnounceResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomAnnounceResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomAnnounceResponse.displayName = 'proto.wechaty.puppet.RoomAnnounceResponse'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomListRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomListRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomListRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomListRequest.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomListRequest} */ proto.wechaty.puppet.RoomListRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomListRequest; return proto.wechaty.puppet.RoomListRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomListRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomListRequest} */ proto.wechaty.puppet.RoomListRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomListRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomListRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomListRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomListRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.wechaty.puppet.RoomListResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomListResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomListResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomListResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomListResponse.toObject = function(includeInstance, msg) { var f, obj = { idsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomListResponse} */ proto.wechaty.puppet.RoomListResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomListResponse; return proto.wechaty.puppet.RoomListResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomListResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomListResponse} */ proto.wechaty.puppet.RoomListResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.addIds(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomListResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomListResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomListResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomListResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdsList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } }; /** * repeated string ids = 1; * @return {!Array<string>} */ proto.wechaty.puppet.RoomListResponse.prototype.getIdsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array<string>} value * @return {!proto.wechaty.puppet.RoomListResponse} returns this */ proto.wechaty.puppet.RoomListResponse.prototype.setIdsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.wechaty.puppet.RoomListResponse} returns this */ proto.wechaty.puppet.RoomListResponse.prototype.addIds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.wechaty.puppet.RoomListResponse} returns this */ proto.wechaty.puppet.RoomListResponse.prototype.clearIdsList = function() { return this.setIdsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomPayloadRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomPayloadRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomPayloadRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomPayloadRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomPayloadRequest} */ proto.wechaty.puppet.RoomPayloadRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomPayloadRequest; return proto.wechaty.puppet.RoomPayloadRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomPayloadRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomPayloadRequest} */ proto.wechaty.puppet.RoomPayloadRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomPayloadRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomPayloadRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomPayloadRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomPayloadRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.RoomPayloadRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomPayloadRequest} returns this */ proto.wechaty.puppet.RoomPayloadRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.wechaty.puppet.RoomPayloadResponse.repeatedFields_ = [5,6]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomPayloadResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomPayloadResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomPayloadResponse.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), topic: jspb.Message.getFieldWithDefault(msg, 2, ""), avatar: jspb.Message.getFieldWithDefault(msg, 3, ""), ownerId: jspb.Message.getFieldWithDefault(msg, 4, ""), adminIdsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, memberIdsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomPayloadResponse} */ proto.wechaty.puppet.RoomPayloadResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomPayloadResponse; return proto.wechaty.puppet.RoomPayloadResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomPayloadResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomPayloadResponse} */ proto.wechaty.puppet.RoomPayloadResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setTopic(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setAvatar(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setOwnerId(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.addAdminIds(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.addMemberIds(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomPayloadResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomPayloadResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomPayloadResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getTopic(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAvatar(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getOwnerId(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getAdminIdsList(); if (f.length > 0) { writer.writeRepeatedString( 5, f ); } f = message.getMemberIdsList(); if (f.length > 0) { writer.writeRepeatedString( 6, f ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string topic = 2; * @return {string} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.getTopic = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.setTopic = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string avatar = 3; * @return {string} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.getAvatar = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.setAvatar = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string owner_id = 4; * @return {string} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.getOwnerId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.setOwnerId = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * repeated string admin_ids = 5; * @return {!Array<string>} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.getAdminIdsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5)); }; /** * @param {!Array<string>} value * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.setAdminIdsList = function(value) { return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.addAdminIds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 5, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.clearAdminIdsList = function() { return this.setAdminIdsList([]); }; /** * repeated string member_ids = 6; * @return {!Array<string>} */ proto.wechaty.puppet.RoomPayloadResponse.prototype.getMemberIdsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 6)); }; /** * @param {!Array<string>} value * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.setMemberIdsList = function(value) { return jspb.Message.setField(this, 6, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.addMemberIds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.wechaty.puppet.RoomPayloadResponse} returns this */ proto.wechaty.puppet.RoomPayloadResponse.prototype.clearMemberIdsList = function() { return this.setMemberIdsList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomAddRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomAddRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomAddRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomAddRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), contactId: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomAddRequest} */ proto.wechaty.puppet.RoomAddRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomAddRequest; return proto.wechaty.puppet.RoomAddRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomAddRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomAddRequest} */ proto.wechaty.puppet.RoomAddRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setContactId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomAddRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomAddRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomAddRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomAddRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getContactId(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.RoomAddRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomAddRequest} returns this */ proto.wechaty.puppet.RoomAddRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string contact_id = 2; * @return {string} */ proto.wechaty.puppet.RoomAddRequest.prototype.getContactId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomAddRequest} returns this */ proto.wechaty.puppet.RoomAddRequest.prototype.setContactId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomAddResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomAddResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomAddResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomAddResponse.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomAddResponse} */ proto.wechaty.puppet.RoomAddResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomAddResponse; return proto.wechaty.puppet.RoomAddResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomAddResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomAddResponse} */ proto.wechaty.puppet.RoomAddResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomAddResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomAddResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomAddResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomAddResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.wechaty.puppet.RoomAvatarRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomAvatarRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.wechaty.puppet.RoomAvatarRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomAvatarRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.wechaty.puppet.RoomAvatarRequest} */ proto.wechaty.puppet.RoomAvatarRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomAvatarRequest; return proto.wechaty.puppet.RoomAvatarRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomAvatarRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomAvatarRequest} */ proto.wechaty.puppet.RoomAvatarRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomAvatarRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomAvatarRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.wechaty.puppet.RoomAvatarRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomAvatarRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.RoomAvatarRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string}