/* eslint-disable */ /*Proudly generated by GenDocu.com*/ // source: google/api/expr/v1beta1/source.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')(); goog.exportSymbol('proto.google.api.expr.v1beta1.SourceInfo', null, global); goog.exportSymbol('proto.google.api.expr.v1beta1.SourcePosition', 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.google.api.expr.v1beta1.SourceInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1beta1.SourceInfo.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.v1beta1.SourceInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1beta1.SourceInfo.displayName = 'proto.google.api.expr.v1beta1.SourceInfo'; } /** * 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.google.api.expr.v1beta1.SourcePosition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.v1beta1.SourcePosition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1beta1.SourcePosition.displayName = 'proto.google.api.expr.v1beta1.SourcePosition'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.v1beta1.SourceInfo.repeatedFields_ = [3]; 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_, 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.google.api.expr.v1beta1.SourceInfo.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1beta1.SourceInfo.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.google.api.expr.v1beta1.SourceInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1beta1.SourceInfo.toObject = function(includeInstance, msg) { var f, obj = { location: jspb.Message.getFieldWithDefault(msg, 2, ""), lineOffsetsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, positionsMap: (f = msg.getPositionsMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.api.expr.v1beta1.SourceInfo} */ proto.google.api.expr.v1beta1.SourceInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1beta1.SourceInfo; return proto.google.api.expr.v1beta1.SourceInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1beta1.SourceInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1beta1.SourceInfo} */ proto.google.api.expr.v1beta1.SourceInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = /** @type {string} */ (reader.readString()); msg.setLocation(value); break; case 3: var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt32() : [reader.readInt32()]); for (var i = 0; i < values.length; i++) { msg.addLineOffsets(values[i]); } break; case 4: var value = msg.getPositionsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt32, jspb.BinaryReader.prototype.readInt32, null, 0, 0); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1beta1.SourceInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1beta1.SourceInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.expr.v1beta1.SourceInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1beta1.SourceInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLocation(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getLineOffsetsList(); if (f.length > 0) { writer.writePackedInt32( 3, f ); } f = message.getPositionsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeInt32, jspb.BinaryWriter.prototype.writeInt32); } }; /** * optional string location = 2; * @return {string} */ proto.google.api.expr.v1beta1.SourceInfo.prototype.getLocation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this */ proto.google.api.expr.v1beta1.SourceInfo.prototype.setLocation = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated int32 line_offsets = 3; * @return {!Array} */ proto.google.api.expr.v1beta1.SourceInfo.prototype.getLineOffsetsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this */ proto.google.api.expr.v1beta1.SourceInfo.prototype.setLineOffsetsList = function(value) { return jspb.Message.setField(this, 3, value || []); }; /** * @param {number} value * @param {number=} opt_index * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this */ proto.google.api.expr.v1beta1.SourceInfo.prototype.addLineOffsets = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this */ proto.google.api.expr.v1beta1.SourceInfo.prototype.clearLineOffsetsList = function() { return this.setLineOffsetsList([]); }; /** * map positions = 4; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.google.api.expr.v1beta1.SourceInfo.prototype.getPositionsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 4, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.google.api.expr.v1beta1.SourceInfo} returns this */ proto.google.api.expr.v1beta1.SourceInfo.prototype.clearPositionsMap = function() { this.getPositionsMap().clear(); return this;}; 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_, 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.google.api.expr.v1beta1.SourcePosition.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1beta1.SourcePosition.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.google.api.expr.v1beta1.SourcePosition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1beta1.SourcePosition.toObject = function(includeInstance, msg) { var f, obj = { location: jspb.Message.getFieldWithDefault(msg, 1, ""), offset: jspb.Message.getFieldWithDefault(msg, 2, 0), line: jspb.Message.getFieldWithDefault(msg, 3, 0), column: jspb.Message.getFieldWithDefault(msg, 4, 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.google.api.expr.v1beta1.SourcePosition} */ proto.google.api.expr.v1beta1.SourcePosition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1beta1.SourcePosition; return proto.google.api.expr.v1beta1.SourcePosition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1beta1.SourcePosition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1beta1.SourcePosition} */ proto.google.api.expr.v1beta1.SourcePosition.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.setLocation(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setOffset(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setLine(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setColumn(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1beta1.SourcePosition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1beta1.SourcePosition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.expr.v1beta1.SourcePosition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1beta1.SourcePosition.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLocation(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getOffset(); if (f !== 0) { writer.writeInt32( 2, f ); } f = message.getLine(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getColumn(); if (f !== 0) { writer.writeInt32( 4, f ); } }; /** * optional string location = 1; * @return {string} */ proto.google.api.expr.v1beta1.SourcePosition.prototype.getLocation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this */ proto.google.api.expr.v1beta1.SourcePosition.prototype.setLocation = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int32 offset = 2; * @return {number} */ proto.google.api.expr.v1beta1.SourcePosition.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this */ proto.google.api.expr.v1beta1.SourcePosition.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int32 line = 3; * @return {number} */ proto.google.api.expr.v1beta1.SourcePosition.prototype.getLine = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this */ proto.google.api.expr.v1beta1.SourcePosition.prototype.setLine = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int32 column = 4; * @return {number} */ proto.google.api.expr.v1beta1.SourcePosition.prototype.getColumn = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1beta1.SourcePosition} returns this */ proto.google.api.expr.v1beta1.SourcePosition.prototype.setColumn = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; goog.object.extend(exports, proto.google.api.expr.v1beta1);