UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

882 lines (764 loc) 28.1 kB
// source: cosmos/orm/v1/orm.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('return this')(); var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); goog.object.extend(proto, google_protobuf_descriptor_pb); goog.exportSymbol('proto.cosmos.orm.v1.PrimaryKeyDescriptor', null, global); goog.exportSymbol('proto.cosmos.orm.v1.SecondaryIndexDescriptor', null, global); goog.exportSymbol('proto.cosmos.orm.v1.SingletonDescriptor', null, global); goog.exportSymbol('proto.cosmos.orm.v1.TableDescriptor', null, global); goog.exportSymbol('proto.cosmos.orm.v1.singleton', null, global); goog.exportSymbol('proto.cosmos.orm.v1.table', 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.cosmos.orm.v1.TableDescriptor = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.cosmos.orm.v1.TableDescriptor.repeatedFields_, null); }; goog.inherits(proto.cosmos.orm.v1.TableDescriptor, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.orm.v1.TableDescriptor.displayName = 'proto.cosmos.orm.v1.TableDescriptor'; } /** * 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.cosmos.orm.v1.PrimaryKeyDescriptor = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.cosmos.orm.v1.PrimaryKeyDescriptor, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.displayName = 'proto.cosmos.orm.v1.PrimaryKeyDescriptor'; } /** * 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.cosmos.orm.v1.SecondaryIndexDescriptor = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.cosmos.orm.v1.SecondaryIndexDescriptor, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.displayName = 'proto.cosmos.orm.v1.SecondaryIndexDescriptor'; } /** * 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.cosmos.orm.v1.SingletonDescriptor = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.cosmos.orm.v1.SingletonDescriptor, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.cosmos.orm.v1.SingletonDescriptor.displayName = 'proto.cosmos.orm.v1.SingletonDescriptor'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.cosmos.orm.v1.TableDescriptor.repeatedFields_ = [2]; 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.cosmos.orm.v1.TableDescriptor.prototype.toObject = function(opt_includeInstance) { return proto.cosmos.orm.v1.TableDescriptor.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.cosmos.orm.v1.TableDescriptor} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.TableDescriptor.toObject = function(includeInstance, msg) { var f, obj = { primaryKey: (f = msg.getPrimaryKey()) && proto.cosmos.orm.v1.PrimaryKeyDescriptor.toObject(includeInstance, f), indexList: jspb.Message.toObjectList(msg.getIndexList(), proto.cosmos.orm.v1.SecondaryIndexDescriptor.toObject, includeInstance), id: jspb.Message.getFieldWithDefault(msg, 3, 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.cosmos.orm.v1.TableDescriptor} */ proto.cosmos.orm.v1.TableDescriptor.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.orm.v1.TableDescriptor; return proto.cosmos.orm.v1.TableDescriptor.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.orm.v1.TableDescriptor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.orm.v1.TableDescriptor} */ proto.cosmos.orm.v1.TableDescriptor.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.cosmos.orm.v1.PrimaryKeyDescriptor; reader.readMessage(value,proto.cosmos.orm.v1.PrimaryKeyDescriptor.deserializeBinaryFromReader); msg.setPrimaryKey(value); break; case 2: var value = new proto.cosmos.orm.v1.SecondaryIndexDescriptor; reader.readMessage(value,proto.cosmos.orm.v1.SecondaryIndexDescriptor.deserializeBinaryFromReader); msg.addIndex(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); msg.setId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.orm.v1.TableDescriptor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.cosmos.orm.v1.TableDescriptor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.orm.v1.TableDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.TableDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPrimaryKey(); if (f != null) { writer.writeMessage( 1, f, proto.cosmos.orm.v1.PrimaryKeyDescriptor.serializeBinaryToWriter ); } f = message.getIndexList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.cosmos.orm.v1.SecondaryIndexDescriptor.serializeBinaryToWriter ); } f = message.getId(); if (f !== 0) { writer.writeUint32( 3, f ); } }; /** * optional PrimaryKeyDescriptor primary_key = 1; * @return {?proto.cosmos.orm.v1.PrimaryKeyDescriptor} */ proto.cosmos.orm.v1.TableDescriptor.prototype.getPrimaryKey = function() { return /** @type{?proto.cosmos.orm.v1.PrimaryKeyDescriptor} */ ( jspb.Message.getWrapperField(this, proto.cosmos.orm.v1.PrimaryKeyDescriptor, 1)); }; /** * @param {?proto.cosmos.orm.v1.PrimaryKeyDescriptor|undefined} value * @return {!proto.cosmos.orm.v1.TableDescriptor} returns this */ proto.cosmos.orm.v1.TableDescriptor.prototype.setPrimaryKey = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.cosmos.orm.v1.TableDescriptor} returns this */ proto.cosmos.orm.v1.TableDescriptor.prototype.clearPrimaryKey = function() { return this.setPrimaryKey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.cosmos.orm.v1.TableDescriptor.prototype.hasPrimaryKey = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated SecondaryIndexDescriptor index = 2; * @return {!Array<!proto.cosmos.orm.v1.SecondaryIndexDescriptor>} */ proto.cosmos.orm.v1.TableDescriptor.prototype.getIndexList = function() { return /** @type{!Array<!proto.cosmos.orm.v1.SecondaryIndexDescriptor>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.cosmos.orm.v1.SecondaryIndexDescriptor, 2)); }; /** * @param {!Array<!proto.cosmos.orm.v1.SecondaryIndexDescriptor>} value * @return {!proto.cosmos.orm.v1.TableDescriptor} returns this */ proto.cosmos.orm.v1.TableDescriptor.prototype.setIndexList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.cosmos.orm.v1.SecondaryIndexDescriptor=} opt_value * @param {number=} opt_index * @return {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} */ proto.cosmos.orm.v1.TableDescriptor.prototype.addIndex = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.cosmos.orm.v1.SecondaryIndexDescriptor, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.cosmos.orm.v1.TableDescriptor} returns this */ proto.cosmos.orm.v1.TableDescriptor.prototype.clearIndexList = function() { return this.setIndexList([]); }; /** * optional uint32 id = 3; * @return {number} */ proto.cosmos.orm.v1.TableDescriptor.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.cosmos.orm.v1.TableDescriptor} returns this */ proto.cosmos.orm.v1.TableDescriptor.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 3, 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.cosmos.orm.v1.PrimaryKeyDescriptor.prototype.toObject = function(opt_includeInstance) { return proto.cosmos.orm.v1.PrimaryKeyDescriptor.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.cosmos.orm.v1.PrimaryKeyDescriptor} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.toObject = function(includeInstance, msg) { var f, obj = { fields: jspb.Message.getFieldWithDefault(msg, 1, ""), autoIncrement: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.cosmos.orm.v1.PrimaryKeyDescriptor} */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.orm.v1.PrimaryKeyDescriptor; return proto.cosmos.orm.v1.PrimaryKeyDescriptor.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.orm.v1.PrimaryKeyDescriptor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.orm.v1.PrimaryKeyDescriptor} */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.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.setFields(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setAutoIncrement(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.cosmos.orm.v1.PrimaryKeyDescriptor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.orm.v1.PrimaryKeyDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFields(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getAutoIncrement(); if (f) { writer.writeBool( 2, f ); } }; /** * optional string fields = 1; * @return {string} */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.prototype.getFields = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.cosmos.orm.v1.PrimaryKeyDescriptor} returns this */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.prototype.setFields = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional bool auto_increment = 2; * @return {boolean} */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.prototype.getAutoIncrement = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value * @return {!proto.cosmos.orm.v1.PrimaryKeyDescriptor} returns this */ proto.cosmos.orm.v1.PrimaryKeyDescriptor.prototype.setAutoIncrement = function(value) { return jspb.Message.setProto3BooleanField(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.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.toObject = function(opt_includeInstance) { return proto.cosmos.orm.v1.SecondaryIndexDescriptor.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.cosmos.orm.v1.SecondaryIndexDescriptor} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.toObject = function(includeInstance, msg) { var f, obj = { fields: jspb.Message.getFieldWithDefault(msg, 1, ""), id: jspb.Message.getFieldWithDefault(msg, 2, 0), unique: jspb.Message.getBooleanFieldWithDefault(msg, 3, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.orm.v1.SecondaryIndexDescriptor; return proto.cosmos.orm.v1.SecondaryIndexDescriptor.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.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.setFields(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setId(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setUnique(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.cosmos.orm.v1.SecondaryIndexDescriptor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFields(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getId(); if (f !== 0) { writer.writeUint32( 2, f ); } f = message.getUnique(); if (f) { writer.writeBool( 3, f ); } }; /** * optional string fields = 1; * @return {string} */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.getFields = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} returns this */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.setFields = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint32 id = 2; * @return {number} */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} returns this */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional bool unique = 3; * @return {boolean} */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.getUnique = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.cosmos.orm.v1.SecondaryIndexDescriptor} returns this */ proto.cosmos.orm.v1.SecondaryIndexDescriptor.prototype.setUnique = function(value) { return jspb.Message.setProto3BooleanField(this, 3, 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.cosmos.orm.v1.SingletonDescriptor.prototype.toObject = function(opt_includeInstance) { return proto.cosmos.orm.v1.SingletonDescriptor.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.cosmos.orm.v1.SingletonDescriptor} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.SingletonDescriptor.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, 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.cosmos.orm.v1.SingletonDescriptor} */ proto.cosmos.orm.v1.SingletonDescriptor.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.cosmos.orm.v1.SingletonDescriptor; return proto.cosmos.orm.v1.SingletonDescriptor.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.cosmos.orm.v1.SingletonDescriptor} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.cosmos.orm.v1.SingletonDescriptor} */ proto.cosmos.orm.v1.SingletonDescriptor.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.cosmos.orm.v1.SingletonDescriptor.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.cosmos.orm.v1.SingletonDescriptor.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.cosmos.orm.v1.SingletonDescriptor} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.cosmos.orm.v1.SingletonDescriptor.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { writer.writeUint32( 1, f ); } }; /** * optional uint32 id = 1; * @return {number} */ proto.cosmos.orm.v1.SingletonDescriptor.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.cosmos.orm.v1.SingletonDescriptor} returns this */ proto.cosmos.orm.v1.SingletonDescriptor.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * A tuple of {field number, class constructor} for the extension * field named `table`. * @type {!jspb.ExtensionFieldInfo<!proto.cosmos.orm.v1.TableDescriptor>} */ proto.cosmos.orm.v1.table = new jspb.ExtensionFieldInfo( 104503790, {table: 0}, proto.cosmos.orm.v1.TableDescriptor, /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( proto.cosmos.orm.v1.TableDescriptor.toObject), 0); google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[104503790] = new jspb.ExtensionFieldBinaryInfo( proto.cosmos.orm.v1.table, jspb.BinaryReader.prototype.readMessage, jspb.BinaryWriter.prototype.writeMessage, proto.cosmos.orm.v1.TableDescriptor.serializeBinaryToWriter, proto.cosmos.orm.v1.TableDescriptor.deserializeBinaryFromReader, false); // This registers the extension field with the extended class, so that // toObject() will function correctly. google_protobuf_descriptor_pb.MessageOptions.extensions[104503790] = proto.cosmos.orm.v1.table; /** * A tuple of {field number, class constructor} for the extension * field named `singleton`. * @type {!jspb.ExtensionFieldInfo<!proto.cosmos.orm.v1.SingletonDescriptor>} */ proto.cosmos.orm.v1.singleton = new jspb.ExtensionFieldInfo( 104503791, {singleton: 0}, proto.cosmos.orm.v1.SingletonDescriptor, /** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ ( proto.cosmos.orm.v1.SingletonDescriptor.toObject), 0); google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[104503791] = new jspb.ExtensionFieldBinaryInfo( proto.cosmos.orm.v1.singleton, jspb.BinaryReader.prototype.readMessage, jspb.BinaryWriter.prototype.writeMessage, proto.cosmos.orm.v1.SingletonDescriptor.serializeBinaryToWriter, proto.cosmos.orm.v1.SingletonDescriptor.deserializeBinaryFromReader, false); // This registers the extension field with the extended class, so that // toObject() will function correctly. google_protobuf_descriptor_pb.MessageOptions.extensions[104503791] = proto.cosmos.orm.v1.singleton; goog.object.extend(exports, proto.cosmos.orm.v1);