UNPKG

wechaty-grpc

Version:
1,375 lines (1,184 loc) 44.6 kB
// source: wechaty/deprecated/file-box.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @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() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); var wechaty_puppet_image_pb = require('../../wechaty/puppet/image_pb.js'); goog.object.extend(proto, wechaty_puppet_image_pb); goog.exportSymbol('proto.wechaty.puppet.FileBoxChunk', null, global); goog.exportSymbol('proto.wechaty.puppet.MessageFileStreamRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.MessageFileStreamResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.MessageImageStreamRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.MessageImageStreamResponse', null, global); goog.exportSymbol('proto.wechaty.puppet.MessageSendFileStreamRequest', null, global); goog.exportSymbol('proto.wechaty.puppet.MessageSendFileStreamResponse', 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.FileBoxChunk = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.FileBoxChunk, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.FileBoxChunk.displayName = 'proto.wechaty.puppet.FileBoxChunk'; } /** * 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.MessageImageStreamRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.MessageImageStreamRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.MessageImageStreamRequest.displayName = 'proto.wechaty.puppet.MessageImageStreamRequest'; } /** * 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.MessageImageStreamResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.MessageImageStreamResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.MessageImageStreamResponse.displayName = 'proto.wechaty.puppet.MessageImageStreamResponse'; } /** * 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.MessageFileStreamRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.MessageFileStreamRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.MessageFileStreamRequest.displayName = 'proto.wechaty.puppet.MessageFileStreamRequest'; } /** * 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.MessageFileStreamResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.MessageFileStreamResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.MessageFileStreamResponse.displayName = 'proto.wechaty.puppet.MessageFileStreamResponse'; } /** * 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.MessageSendFileStreamRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.MessageSendFileStreamRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.MessageSendFileStreamRequest.displayName = 'proto.wechaty.puppet.MessageSendFileStreamRequest'; } /** * 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.MessageSendFileStreamResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.wechaty.puppet.MessageSendFileStreamResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.wechaty.puppet.MessageSendFileStreamResponse.displayName = 'proto.wechaty.puppet.MessageSendFileStreamResponse'; } 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.FileBoxChunk.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.FileBoxChunk.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.FileBoxChunk} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.FileBoxChunk.toObject = function(includeInstance, msg) { var f, obj = { data: msg.getData_asB64(), name: 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.FileBoxChunk} */ proto.wechaty.puppet.FileBoxChunk.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.FileBoxChunk; return proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.FileBoxChunk} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.FileBoxChunk} */ proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setData(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.FileBoxChunk.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.FileBoxChunk.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.FileBoxChunk} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeBytes( 1, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } }; /** * optional bytes data = 1; * @return {!(string|Uint8Array)} */ proto.wechaty.puppet.FileBoxChunk.prototype.getData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * optional bytes data = 1; * This is a type-conversion wrapper around `getData()` * @return {string} */ proto.wechaty.puppet.FileBoxChunk.prototype.getData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getData())); }; /** * optional bytes data = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getData()` * @return {!Uint8Array} */ proto.wechaty.puppet.FileBoxChunk.prototype.getData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getData())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.wechaty.puppet.FileBoxChunk} returns this */ proto.wechaty.puppet.FileBoxChunk.prototype.setData = function(value) { return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. * @return {!proto.wechaty.puppet.FileBoxChunk} returns this */ proto.wechaty.puppet.FileBoxChunk.prototype.clearData = function() { return jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.FileBoxChunk.prototype.hasData = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string name = 2; * @return {string} */ proto.wechaty.puppet.FileBoxChunk.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.FileBoxChunk} returns this */ proto.wechaty.puppet.FileBoxChunk.prototype.setName = function(value) { return jspb.Message.setField(this, 2, value); }; /** * Clears the field making it undefined. * @return {!proto.wechaty.puppet.FileBoxChunk} returns this */ proto.wechaty.puppet.FileBoxChunk.prototype.clearName = function() { return jspb.Message.setField(this, 2, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.FileBoxChunk.prototype.hasName = function() { return jspb.Message.getField(this, 2) != null; }; 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.MessageImageStreamRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.MessageImageStreamRequest.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.MessageImageStreamRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageImageStreamRequest.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), type: jspb.Message.getFieldWithDefault(msg, 2, 0) }; 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.MessageImageStreamRequest} */ proto.wechaty.puppet.MessageImageStreamRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.MessageImageStreamRequest; return proto.wechaty.puppet.MessageImageStreamRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.MessageImageStreamRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.MessageImageStreamRequest} */ proto.wechaty.puppet.MessageImageStreamRequest.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 {!proto.wechaty.puppet.ImageType} */ (reader.readEnum()); msg.setType(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.MessageImageStreamRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.MessageImageStreamRequest.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.MessageImageStreamRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageImageStreamRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getType(); if (f !== 0.0) { writer.writeEnum( 2, f ); } }; /** * optional string id = 1; * @return {string} */ proto.wechaty.puppet.MessageImageStreamRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.MessageImageStreamRequest} returns this */ proto.wechaty.puppet.MessageImageStreamRequest.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional ImageType type = 2; * @return {!proto.wechaty.puppet.ImageType} */ proto.wechaty.puppet.MessageImageStreamRequest.prototype.getType = function() { return /** @type {!proto.wechaty.puppet.ImageType} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {!proto.wechaty.puppet.ImageType} value * @return {!proto.wechaty.puppet.MessageImageStreamRequest} returns this */ proto.wechaty.puppet.MessageImageStreamRequest.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(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.MessageImageStreamResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.MessageImageStreamResponse.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.MessageImageStreamResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageImageStreamResponse.toObject = function(includeInstance, msg) { var f, obj = { fileBoxChunk: (f = msg.getFileBoxChunk()) && proto.wechaty.puppet.FileBoxChunk.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.MessageImageStreamResponse} */ proto.wechaty.puppet.MessageImageStreamResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.MessageImageStreamResponse; return proto.wechaty.puppet.MessageImageStreamResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.MessageImageStreamResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.MessageImageStreamResponse} */ proto.wechaty.puppet.MessageImageStreamResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.wechaty.puppet.FileBoxChunk; reader.readMessage(value,proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader); msg.setFileBoxChunk(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.MessageImageStreamResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.MessageImageStreamResponse.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.MessageImageStreamResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageImageStreamResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFileBoxChunk(); if (f != null) { writer.writeMessage( 1, f, proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter ); } }; /** * optional FileBoxChunk file_box_chunk = 1; * @return {?proto.wechaty.puppet.FileBoxChunk} */ proto.wechaty.puppet.MessageImageStreamResponse.prototype.getFileBoxChunk = function() { return /** @type{?proto.wechaty.puppet.FileBoxChunk} */ ( jspb.Message.getWrapperField(this, proto.wechaty.puppet.FileBoxChunk, 1)); }; /** * @param {?proto.wechaty.puppet.FileBoxChunk|undefined} value * @return {!proto.wechaty.puppet.MessageImageStreamResponse} returns this */ proto.wechaty.puppet.MessageImageStreamResponse.prototype.setFileBoxChunk = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.wechaty.puppet.MessageImageStreamResponse} returns this */ proto.wechaty.puppet.MessageImageStreamResponse.prototype.clearFileBoxChunk = function() { return this.setFileBoxChunk(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.MessageImageStreamResponse.prototype.hasFileBoxChunk = function() { return jspb.Message.getField(this, 1) != null; }; 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.MessageFileStreamRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.MessageFileStreamRequest.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.MessageFileStreamRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageFileStreamRequest.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.MessageFileStreamRequest} */ proto.wechaty.puppet.MessageFileStreamRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.MessageFileStreamRequest; return proto.wechaty.puppet.MessageFileStreamRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.MessageFileStreamRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.MessageFileStreamRequest} */ proto.wechaty.puppet.MessageFileStreamRequest.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.MessageFileStreamRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.MessageFileStreamRequest.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.MessageFileStreamRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageFileStreamRequest.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.MessageFileStreamRequest.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.MessageFileStreamRequest} returns this */ proto.wechaty.puppet.MessageFileStreamRequest.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.MessageFileStreamResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.MessageFileStreamResponse.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.MessageFileStreamResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageFileStreamResponse.toObject = function(includeInstance, msg) { var f, obj = { fileBoxChunk: (f = msg.getFileBoxChunk()) && proto.wechaty.puppet.FileBoxChunk.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.MessageFileStreamResponse} */ proto.wechaty.puppet.MessageFileStreamResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.MessageFileStreamResponse; return proto.wechaty.puppet.MessageFileStreamResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.MessageFileStreamResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.MessageFileStreamResponse} */ proto.wechaty.puppet.MessageFileStreamResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.wechaty.puppet.FileBoxChunk; reader.readMessage(value,proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader); msg.setFileBoxChunk(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.MessageFileStreamResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.MessageFileStreamResponse.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.MessageFileStreamResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageFileStreamResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFileBoxChunk(); if (f != null) { writer.writeMessage( 1, f, proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter ); } }; /** * optional FileBoxChunk file_box_chunk = 1; * @return {?proto.wechaty.puppet.FileBoxChunk} */ proto.wechaty.puppet.MessageFileStreamResponse.prototype.getFileBoxChunk = function() { return /** @type{?proto.wechaty.puppet.FileBoxChunk} */ ( jspb.Message.getWrapperField(this, proto.wechaty.puppet.FileBoxChunk, 1)); }; /** * @param {?proto.wechaty.puppet.FileBoxChunk|undefined} value * @return {!proto.wechaty.puppet.MessageFileStreamResponse} returns this */ proto.wechaty.puppet.MessageFileStreamResponse.prototype.setFileBoxChunk = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.wechaty.puppet.MessageFileStreamResponse} returns this */ proto.wechaty.puppet.MessageFileStreamResponse.prototype.clearFileBoxChunk = function() { return this.setFileBoxChunk(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.MessageFileStreamResponse.prototype.hasFileBoxChunk = function() { return jspb.Message.getField(this, 1) != null; }; 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.MessageSendFileStreamRequest.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.MessageSendFileStreamRequest.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.MessageSendFileStreamRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageSendFileStreamRequest.toObject = function(includeInstance, msg) { var f, obj = { conversationId: jspb.Message.getFieldWithDefault(msg, 1, ""), fileBoxChunk: (f = msg.getFileBoxChunk()) && proto.wechaty.puppet.FileBoxChunk.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.MessageSendFileStreamRequest} */ proto.wechaty.puppet.MessageSendFileStreamRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.MessageSendFileStreamRequest; return proto.wechaty.puppet.MessageSendFileStreamRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.MessageSendFileStreamRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} */ proto.wechaty.puppet.MessageSendFileStreamRequest.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.setConversationId(value); break; case 2: var value = new proto.wechaty.puppet.FileBoxChunk; reader.readMessage(value,proto.wechaty.puppet.FileBoxChunk.deserializeBinaryFromReader); msg.setFileBoxChunk(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.MessageSendFileStreamRequest.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.MessageSendFileStreamRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageSendFileStreamRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } f = message.getFileBoxChunk(); if (f != null) { writer.writeMessage( 2, f, proto.wechaty.puppet.FileBoxChunk.serializeBinaryToWriter ); } }; /** * optional string conversation_id = 1; * @return {string} */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.getConversationId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.setConversationId = function(value) { return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.clearConversationId = function() { return jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.hasConversationId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional FileBoxChunk file_box_chunk = 2; * @return {?proto.wechaty.puppet.FileBoxChunk} */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.getFileBoxChunk = function() { return /** @type{?proto.wechaty.puppet.FileBoxChunk} */ ( jspb.Message.getWrapperField(this, proto.wechaty.puppet.FileBoxChunk, 2)); }; /** * @param {?proto.wechaty.puppet.FileBoxChunk|undefined} value * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.setFileBoxChunk = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.wechaty.puppet.MessageSendFileStreamRequest} returns this */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.clearFileBoxChunk = function() { return this.setFileBoxChunk(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.MessageSendFileStreamRequest.prototype.hasFileBoxChunk = function() { return jspb.Message.getField(this, 2) != null; }; 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.MessageSendFileStreamResponse.prototype.toObject = function(opt_includeInstance) { return proto.wechaty.puppet.MessageSendFileStreamResponse.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.MessageSendFileStreamResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageSendFileStreamResponse.toObject = function(includeInstance, msg) { var f, obj = { idStringValueDeprecated: (f = msg.getIdStringValueDeprecated()) && google_protobuf_wrappers_pb.StringValue.toObject(includeInstance, f), id: 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.MessageSendFileStreamResponse} */ proto.wechaty.puppet.MessageSendFileStreamResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.wechaty.puppet.MessageSendFileStreamResponse; return proto.wechaty.puppet.MessageSendFileStreamResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.wechaty.puppet.MessageSendFileStreamResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} */ proto.wechaty.puppet.MessageSendFileStreamResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_wrappers_pb.StringValue; reader.readMessage(value,google_protobuf_wrappers_pb.StringValue.deserializeBinaryFromReader); msg.setIdStringValueDeprecated(value); break; case 2: 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.MessageSendFileStreamResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.wechaty.puppet.MessageSendFileStreamResponse.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.MessageSendFileStreamResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.wechaty.puppet.MessageSendFileStreamResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIdStringValueDeprecated(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_wrappers_pb.StringValue.serializeBinaryToWriter ); } f = message.getId(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional google.protobuf.StringValue id_string_value_deprecated = 1; * @return {?proto.google.protobuf.StringValue} */ proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.getIdStringValueDeprecated = function() { return /** @type{?proto.google.protobuf.StringValue} */ ( jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.StringValue, 1)); }; /** * @param {?proto.google.protobuf.StringValue|undefined} value * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} returns this */ proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.setIdStringValueDeprecated = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} returns this */ proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.clearIdStringValueDeprecated = function() { return this.setIdStringValueDeprecated(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.hasIdStringValueDeprecated = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string id = 2; * @return {string} */ proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.wechaty.puppet.MessageSendFileStreamResponse} returns this */ proto.wechaty.puppet.MessageSendFileStreamResponse.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; goog.object.extend(exports, proto.wechaty.puppet);