UNPKG

@chatie/grpc

Version:
914 lines (789 loc) 28.8 kB
// source: puppet/room_invitation.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! 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.RoomInvitationAcceptRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomInvitationAcceptResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomInvitationPayloadRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.RoomInvitationPayloadResponse', 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.RoomInvitationPayloadRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomInvitationPayloadRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomInvitationPayloadRequest.displayName = 'proto.wechaty.puppet.RoomInvitationPayloadRequest'; } /** * 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.RoomInvitationPayloadResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.RoomInvitationPayloadResponse.repeatedFields_, null); }; goog.inherits(proto.wechaty.puppet.RoomInvitationPayloadResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomInvitationPayloadResponse.displayName = 'proto.wechaty.puppet.RoomInvitationPayloadResponse'; } /** * 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.RoomInvitationAcceptRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomInvitationAcceptRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomInvitationAcceptRequest.displayName = 'proto.wechaty.puppet.RoomInvitationAcceptRequest'; } /** * 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.RoomInvitationAcceptResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.RoomInvitationAcceptResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.RoomInvitationAcceptResponse.displayName = 'proto.wechaty.puppet.RoomInvitationAcceptResponse'; } 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.RoomInvitationPayloadRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomInvitationPayloadRequest.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.RoomInvitationPayloadRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationPayloadRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), payload: (f = msg.getPayload()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, 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.RoomInvitationPayloadRequest} */ proto.wechaty.puppet.RoomInvitationPayloadRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomInvitationPayloadRequest; return proto.wechaty.puppet.RoomInvitationPayloadRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomInvitationPayloadRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomInvitationPayloadRequest} */ proto.wechaty.puppet.RoomInvitationPayloadRequest.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 = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setPayload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomInvitationPayloadRequest.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.RoomInvitationPayloadRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationPayloadRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getPayload(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadRequest} returns this */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional google.protobuf.StringValue payload = 2; * @return {?proto.google.protobuf.StringValue} */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.getPayload = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 2)); }; /** * @param {?proto.google.protobuf.StringValue|undefined} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadRequest} returns this */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.setPayload = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.wechaty.puppet.RoomInvitationPayloadRequest} returns this */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.clearPayload = function() { return this.setPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.RoomInvitationPayloadRequest.prototype.hasPayload = function() { return jspb.Message.getField(this, 2) != null; }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.wechaty.puppet.RoomInvitationPayloadResponse.repeatedFields_ = [5]; 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.RoomInvitationPayloadResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomInvitationPayloadResponse.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.RoomInvitationPayloadResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationPayloadResponse.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), inviterId: jspb.Message.getFieldWithDefault(msg, 2, ""), topic: jspb.Message.getFieldWithDefault(msg, 3, ""), memberCount: jspb.Message.getFieldWithDefault(msg, 4, 0), memberIdsList: (f = jspb.Message.getRepeatedField(msg, 5)) == null ? undefined : f, timestamp: jspb.Message.getFieldWithDefault(msg, 6, 0), avatar: jspb.Message.getFieldWithDefault(msg, 7, ""), invitation: jspb.Message.getFieldWithDefault(msg, 8, ""), receiverId: jspb.Message.getFieldWithDefault(msg, 9, "") }; 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.RoomInvitationPayloadResponse} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomInvitationPayloadResponse; return proto.wechaty.puppet.RoomInvitationPayloadResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomInvitationPayloadResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.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.setInviterId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setTopic(value); break; case 4: var value = /** @type {number} */ (reader.readUint32()); msg.setMemberCount(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.addMemberIds(value); break; case 6: var value = /** @type {number} */ (reader.readUint64()); msg.setTimestamp(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setAvatar(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setInvitation(value); break; case 9: var value = /** @type {string} */ (reader.readString()); msg.setReceiverId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomInvitationPayloadResponse.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.RoomInvitationPayloadResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationPayloadResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getInviterId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getTopic(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getMemberCount(); if (f !== 0) { writer.writeUint32( 4, f ); } f = message.getMemberIdsList(); if (f.length > 0) { writer.writeRepeatedString( 5, f ); } f = message.getTimestamp(); if (f !== 0) { writer.writeUint64( 6, f ); } f = message.getAvatar(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getInvitation(); if (f.length > 0) { writer.writeString( 8, f ); } f = message.getReceiverId(); if (f.length > 0) { writer.writeString( 9, f ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string inviter_id = 2; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getInviterId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setInviterId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string topic = 3; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getTopic = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setTopic = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional uint32 member_count = 4; * @return {number} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getMemberCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setMemberCount = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * repeated string member_ids = 5; * @return {!Array<string>} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getMemberIdsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 5)); }; /** * @param {!Array<string>} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setMemberIdsList = function(value) { return jspb.Message.setField(this, 5, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.addMemberIds = 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.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.clearMemberIdsList = function() { return this.setMemberIdsList([]); }; /** * optional uint64 timestamp = 6; * @return {number} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** * optional string avatar = 7; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getAvatar = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setAvatar = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string invitation = 8; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getInvitation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setInvitation = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; /** * optional string receiver_id = 9; * @return {string} */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.getReceiverId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationPayloadResponse} returns this */ proto.wechaty.puppet.RoomInvitationPayloadResponse.prototype.setReceiverId = function(value) { return jspb.Message.setProto3StringField(this, 9, 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.RoomInvitationAcceptRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomInvitationAcceptRequest.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.RoomInvitationAcceptRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationAcceptRequest.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.RoomInvitationAcceptRequest} */ proto.wechaty.puppet.RoomInvitationAcceptRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomInvitationAcceptRequest; return proto.wechaty.puppet.RoomInvitationAcceptRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomInvitationAcceptRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomInvitationAcceptRequest} */ proto.wechaty.puppet.RoomInvitationAcceptRequest.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.RoomInvitationAcceptRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomInvitationAcceptRequest.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.RoomInvitationAcceptRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationAcceptRequest.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.RoomInvitationAcceptRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.RoomInvitationAcceptRequest} returns this */ proto.wechaty.puppet.RoomInvitationAcceptRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, 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.RoomInvitationAcceptResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.RoomInvitationAcceptResponse.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.RoomInvitationAcceptResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationAcceptResponse.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.RoomInvitationAcceptResponse} */ proto.wechaty.puppet.RoomInvitationAcceptResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.RoomInvitationAcceptResponse; return proto.wechaty.puppet.RoomInvitationAcceptResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.RoomInvitationAcceptResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.RoomInvitationAcceptResponse} */ proto.wechaty.puppet.RoomInvitationAcceptResponse.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.RoomInvitationAcceptResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.RoomInvitationAcceptResponse.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.RoomInvitationAcceptResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.RoomInvitationAcceptResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; goog.object.extend(exports, proto.wechaty.puppet);