/* eslint-disable */ /*Proudly generated by GenDocu.com*/ // source: google/api/expr/v1alpha1/syntax.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_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); goog.object.extend(proto, google_protobuf_struct_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.google.api.expr.v1alpha1.Constant', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Constant.ConstantKindCase', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Call', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Comprehension', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateList', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateStruct', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.ExprKindCase', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Ident', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.Expr.Select', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.ParsedExpr', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.SourceInfo', null, global); goog.exportSymbol('proto.google.api.expr.v1alpha1.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.v1alpha1.ParsedExpr = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.v1alpha1.ParsedExpr, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.ParsedExpr.displayName = 'proto.google.api.expr.v1alpha1.ParsedExpr'; } /** * 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.v1alpha1.Expr = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Expr.oneofGroups_); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.displayName = 'proto.google.api.expr.v1alpha1.Expr'; } /** * 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.v1alpha1.Expr.Ident = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.Ident, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.Ident.displayName = 'proto.google.api.expr.v1alpha1.Expr.Ident'; } /** * 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.v1alpha1.Expr.Select = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.Select, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.Select.displayName = 'proto.google.api.expr.v1alpha1.Expr.Select'; } /** * 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.v1alpha1.Expr.Call = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Expr.Call.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.Call, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.Call.displayName = 'proto.google.api.expr.v1alpha1.Expr.Call'; } /** * 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.v1alpha1.Expr.CreateList = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Expr.CreateList.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.CreateList, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.CreateList.displayName = 'proto.google.api.expr.v1alpha1.Expr.CreateList'; } /** * 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.v1alpha1.Expr.CreateStruct = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.Expr.CreateStruct.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.CreateStruct, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.displayName = 'proto.google.api.expr.v1alpha1.Expr.CreateStruct'; } /** * 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.v1alpha1.Expr.CreateStruct.Entry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.displayName = 'proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry'; } /** * 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.v1alpha1.Expr.Comprehension = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.v1alpha1.Expr.Comprehension, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Expr.Comprehension.displayName = 'proto.google.api.expr.v1alpha1.Expr.Comprehension'; } /** * 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.v1alpha1.Constant = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.v1alpha1.Constant.oneofGroups_); }; goog.inherits(proto.google.api.expr.v1alpha1.Constant, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.Constant.displayName = 'proto.google.api.expr.v1alpha1.Constant'; } /** * 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.v1alpha1.SourceInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.v1alpha1.SourceInfo.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.v1alpha1.SourceInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.SourceInfo.displayName = 'proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.v1alpha1.SourcePosition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.v1alpha1.SourcePosition.displayName = 'proto.google.api.expr.v1alpha1.SourcePosition'; } 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.v1alpha1.ParsedExpr.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.ParsedExpr.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.v1alpha1.ParsedExpr} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.ParsedExpr.toObject = function(includeInstance, msg) { var f, obj = { expr: (f = msg.getExpr()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), sourceInfo: (f = msg.getSourceInfo()) && proto.google.api.expr.v1alpha1.SourceInfo.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.google.api.expr.v1alpha1.ParsedExpr} */ proto.google.api.expr.v1alpha1.ParsedExpr.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.ParsedExpr; return proto.google.api.expr.v1alpha1.ParsedExpr.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.ParsedExpr} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} */ proto.google.api.expr.v1alpha1.ParsedExpr.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setExpr(value); break; case 3: var value = new proto.google.api.expr.v1alpha1.SourceInfo; reader.readMessage(value,proto.google.api.expr.v1alpha1.SourceInfo.deserializeBinaryFromReader); msg.setSourceInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.ParsedExpr.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.v1alpha1.ParsedExpr} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.ParsedExpr.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExpr(); if (f != null) { writer.writeMessage( 2, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getSourceInfo(); if (f != null) { writer.writeMessage( 3, f, proto.google.api.expr.v1alpha1.SourceInfo.serializeBinaryToWriter ); } }; /** * optional Expr expr = 2; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.getExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 2)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.setExpr = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.clearExpr = function() { return this.setExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.hasExpr = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional SourceInfo source_info = 3; * @return {?proto.google.api.expr.v1alpha1.SourceInfo} */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.getSourceInfo = function() { return /** @type{?proto.google.api.expr.v1alpha1.SourceInfo} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.SourceInfo, 3)); }; /** * @param {?proto.google.api.expr.v1alpha1.SourceInfo|undefined} value * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.setSourceInfo = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.ParsedExpr} returns this */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.clearSourceInfo = function() { return this.setSourceInfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.ParsedExpr.prototype.hasSourceInfo = function() { return jspb.Message.getField(this, 3) != null; }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.google.api.expr.v1alpha1.Expr.oneofGroups_ = [[3,4,5,6,7,8,9]]; /** * @enum {number} */ proto.google.api.expr.v1alpha1.Expr.ExprKindCase = { EXPR_KIND_NOT_SET: 0, CONST_EXPR: 3, IDENT_EXPR: 4, SELECT_EXPR: 5, CALL_EXPR: 6, LIST_EXPR: 7, STRUCT_EXPR: 8, COMPREHENSION_EXPR: 9 }; /** * @return {proto.google.api.expr.v1alpha1.Expr.ExprKindCase} */ proto.google.api.expr.v1alpha1.Expr.prototype.getExprKindCase = function() { return /** @type {proto.google.api.expr.v1alpha1.Expr.ExprKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0])); }; 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.v1alpha1.Expr.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.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.v1alpha1.Expr} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 2, 0), constExpr: (f = msg.getConstExpr()) && proto.google.api.expr.v1alpha1.Constant.toObject(includeInstance, f), identExpr: (f = msg.getIdentExpr()) && proto.google.api.expr.v1alpha1.Expr.Ident.toObject(includeInstance, f), selectExpr: (f = msg.getSelectExpr()) && proto.google.api.expr.v1alpha1.Expr.Select.toObject(includeInstance, f), callExpr: (f = msg.getCallExpr()) && proto.google.api.expr.v1alpha1.Expr.Call.toObject(includeInstance, f), listExpr: (f = msg.getListExpr()) && proto.google.api.expr.v1alpha1.Expr.CreateList.toObject(includeInstance, f), structExpr: (f = msg.getStructExpr()) && proto.google.api.expr.v1alpha1.Expr.CreateStruct.toObject(includeInstance, f), comprehensionExpr: (f = msg.getComprehensionExpr()) && proto.google.api.expr.v1alpha1.Expr.Comprehension.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.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr; return proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setId(value); break; case 3: var value = new proto.google.api.expr.v1alpha1.Constant; reader.readMessage(value,proto.google.api.expr.v1alpha1.Constant.deserializeBinaryFromReader); msg.setConstExpr(value); break; case 4: var value = new proto.google.api.expr.v1alpha1.Expr.Ident; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinaryFromReader); msg.setIdentExpr(value); break; case 5: var value = new proto.google.api.expr.v1alpha1.Expr.Select; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinaryFromReader); msg.setSelectExpr(value); break; case 6: var value = new proto.google.api.expr.v1alpha1.Expr.Call; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinaryFromReader); msg.setCallExpr(value); break; case 7: var value = new proto.google.api.expr.v1alpha1.Expr.CreateList; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinaryFromReader); msg.setListExpr(value); break; case 8: var value = new proto.google.api.expr.v1alpha1.Expr.CreateStruct; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinaryFromReader); msg.setStructExpr(value); break; case 9: var value = new proto.google.api.expr.v1alpha1.Expr.Comprehension; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinaryFromReader); msg.setComprehensionExpr(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.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.v1alpha1.Expr} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { writer.writeInt64( 2, f ); } f = message.getConstExpr(); if (f != null) { writer.writeMessage( 3, f, proto.google.api.expr.v1alpha1.Constant.serializeBinaryToWriter ); } f = message.getIdentExpr(); if (f != null) { writer.writeMessage( 4, f, proto.google.api.expr.v1alpha1.Expr.Ident.serializeBinaryToWriter ); } f = message.getSelectExpr(); if (f != null) { writer.writeMessage( 5, f, proto.google.api.expr.v1alpha1.Expr.Select.serializeBinaryToWriter ); } f = message.getCallExpr(); if (f != null) { writer.writeMessage( 6, f, proto.google.api.expr.v1alpha1.Expr.Call.serializeBinaryToWriter ); } f = message.getListExpr(); if (f != null) { writer.writeMessage( 7, f, proto.google.api.expr.v1alpha1.Expr.CreateList.serializeBinaryToWriter ); } f = message.getStructExpr(); if (f != null) { writer.writeMessage( 8, f, proto.google.api.expr.v1alpha1.Expr.CreateStruct.serializeBinaryToWriter ); } f = message.getComprehensionExpr(); if (f != null) { writer.writeMessage( 9, f, proto.google.api.expr.v1alpha1.Expr.Comprehension.serializeBinaryToWriter ); } }; 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.v1alpha1.Expr.Ident.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.Ident.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.v1alpha1.Expr.Ident} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Ident.toObject = function(includeInstance, msg) { var f, obj = { name: 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.google.api.expr.v1alpha1.Expr.Ident} */ proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.Ident; return proto.google.api.expr.v1alpha1.Expr.Ident.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.Ident} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.Ident} */ proto.google.api.expr.v1alpha1.Expr.Ident.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.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.Ident.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.Ident.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.v1alpha1.Expr.Ident} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Ident.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string name = 1; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.Ident.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.Ident} returns this */ proto.google.api.expr.v1alpha1.Expr.Ident.prototype.setName = 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_, 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.v1alpha1.Expr.Select.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.Select.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.v1alpha1.Expr.Select} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Select.toObject = function(includeInstance, msg) { var f, obj = { operand: (f = msg.getOperand()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), field: jspb.Message.getFieldWithDefault(msg, 2, ""), testOnly: 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.google.api.expr.v1alpha1.Expr.Select} */ proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.Select; return proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.Select} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.Select} */ proto.google.api.expr.v1alpha1.Expr.Select.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setOperand(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setField(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setTestOnly(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.Select.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.v1alpha1.Expr.Select} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Select.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOperand(); if (f != null) { writer.writeMessage( 1, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getField(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getTestOnly(); if (f) { writer.writeBool( 3, f ); } }; /** * optional Expr operand = 1; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.getOperand = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.setOperand = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.clearOperand = function() { return this.setOperand(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.hasOperand = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string field = 2; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.getField = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.setField = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bool test_only = 3; * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.getTestOnly = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.google.api.expr.v1alpha1.Expr.Select} returns this */ proto.google.api.expr.v1alpha1.Expr.Select.prototype.setTestOnly = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.v1alpha1.Expr.Call.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.v1alpha1.Expr.Call.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.Call.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.v1alpha1.Expr.Call} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Call.toObject = function(includeInstance, msg) { var f, obj = { target: (f = msg.getTarget()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), pb_function: jspb.Message.getFieldWithDefault(msg, 2, ""), argsList: jspb.Message.toObjectList(msg.getArgsList(), proto.google.api.expr.v1alpha1.Expr.toObject, includeInstance) }; 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.v1alpha1.Expr.Call} */ proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.Call; return proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.Call} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.Call} */ proto.google.api.expr.v1alpha1.Expr.Call.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setTarget(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setFunction(value); break; case 3: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.addArgs(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.Call.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.v1alpha1.Expr.Call} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Call.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTarget(); if (f != null) { writer.writeMessage( 1, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getFunction(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getArgsList(); if (f.length > 0) { writer.writeRepeatedMessage( 3, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } }; /** * optional Expr target = 1; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.getTarget = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.setTarget = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.clearTarget = function() { return this.setTarget(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.hasTarget = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string function = 2; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.getFunction = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.setFunction = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated Expr args = 3; * @return {!Array} */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.getArgsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 3)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.setArgsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 3, value); }; /** * @param {!proto.google.api.expr.v1alpha1.Expr=} opt_value * @param {number=} opt_index * @return {!proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.addArgs = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.api.expr.v1alpha1.Expr, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.v1alpha1.Expr.Call} returns this */ proto.google.api.expr.v1alpha1.Expr.Call.prototype.clearArgsList = function() { return this.setArgsList([]); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.v1alpha1.Expr.CreateList.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, 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.v1alpha1.Expr.CreateList.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.CreateList.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.v1alpha1.Expr.CreateList} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.CreateList.toObject = function(includeInstance, msg) { var f, obj = { elementsList: jspb.Message.toObjectList(msg.getElementsList(), proto.google.api.expr.v1alpha1.Expr.toObject, includeInstance) }; 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.v1alpha1.Expr.CreateList} */ proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.CreateList; return proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.CreateList} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} */ proto.google.api.expr.v1alpha1.Expr.CreateList.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.addElements(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.CreateList.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.v1alpha1.Expr.CreateList} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.CreateList.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getElementsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } }; /** * repeated Expr elements = 1; * @return {!Array} */ proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.getElementsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 1)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.setElementsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.google.api.expr.v1alpha1.Expr=} opt_value * @param {number=} opt_index * @return {!proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.addElements = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.api.expr.v1alpha1.Expr, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateList} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateList.prototype.clearElementsList = function() { return this.setElementsList([]); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.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_, 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.v1alpha1.Expr.CreateStruct.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.CreateStruct.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.v1alpha1.Expr.CreateStruct} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.toObject = function(includeInstance, msg) { var f, obj = { messageName: jspb.Message.getFieldWithDefault(msg, 1, ""), entriesList: jspb.Message.toObjectList(msg.getEntriesList(), proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.toObject, includeInstance) }; 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.v1alpha1.Expr.CreateStruct} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.CreateStruct; return proto.google.api.expr.v1alpha1.Expr.CreateStruct.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.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.setMessageName(value); break; case 2: var value = new proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinaryFromReader); msg.addEntries(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.CreateStruct.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.v1alpha1.Expr.CreateStruct} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMessageName(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getEntriesList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.serializeBinaryToWriter ); } }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_ = [[2,3]]; /** * @enum {number} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase = { KEY_KIND_NOT_SET: 0, FIELD_KEY: 2, MAP_KEY: 3 }; /** * @return {proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getKeyKindCase = function() { return /** @type {proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.KeyKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0])); }; 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.v1alpha1.Expr.CreateStruct.Entry.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.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.v1alpha1.Expr.CreateStruct.Entry} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, 0), fieldKey: jspb.Message.getFieldWithDefault(msg, 2, ""), mapKey: (f = msg.getMapKey()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), value: (f = msg.getValue()) && proto.google.api.expr.v1alpha1.Expr.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.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry; return proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setFieldKey(value); break; case 3: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setMapKey(value); break; case 4: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.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.v1alpha1.Expr.CreateStruct.Entry} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { writer.writeInt64( 1, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } f = message.getMapKey(); if (f != null) { writer.writeMessage( 3, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getValue(); if (f != null) { writer.writeMessage( 4, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } }; /** * optional int64 id = 1; * @return {number} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional string field_key = 2; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getFieldKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setFieldKey = function(value) { return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.clearFieldKey = function() { return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.hasFieldKey = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional Expr map_key = 3; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getMapKey = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 3)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setMapKey = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.clearMapKey = function() { return this.setMapKey(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.hasMapKey = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional Expr value = 4; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.getValue = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 4)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.setValue = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.clearValue = function() { return this.setValue(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry.prototype.hasValue = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional string message_name = 1; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.getMessageName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.setMessageName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * repeated Entry entries = 2; * @return {!Array} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.getEntriesList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry, 2)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.setEntriesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry=} opt_value * @param {number=} opt_index * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry} */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.addEntries = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Expr.CreateStruct.Entry, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.v1alpha1.Expr.CreateStruct} returns this */ proto.google.api.expr.v1alpha1.Expr.CreateStruct.prototype.clearEntriesList = function() { return this.setEntriesList([]); }; 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.v1alpha1.Expr.Comprehension.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Expr.Comprehension.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.v1alpha1.Expr.Comprehension} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Comprehension.toObject = function(includeInstance, msg) { var f, obj = { iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), iterRange: (f = msg.getIterRange()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), accuVar: jspb.Message.getFieldWithDefault(msg, 3, ""), accuInit: (f = msg.getAccuInit()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), loopCondition: (f = msg.getLoopCondition()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), loopStep: (f = msg.getLoopStep()) && proto.google.api.expr.v1alpha1.Expr.toObject(includeInstance, f), result: (f = msg.getResult()) && proto.google.api.expr.v1alpha1.Expr.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.google.api.expr.v1alpha1.Expr.Comprehension} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Expr.Comprehension; return proto.google.api.expr.v1alpha1.Expr.Comprehension.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Expr.Comprehension} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.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.setIterVar(value); break; case 2: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setIterRange(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setAccuVar(value); break; case 4: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setAccuInit(value); break; case 5: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setLoopCondition(value); break; case 6: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setLoopStep(value); break; case 7: var value = new proto.google.api.expr.v1alpha1.Expr; reader.readMessage(value,proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader); msg.setResult(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Expr.Comprehension.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.v1alpha1.Expr.Comprehension} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Expr.Comprehension.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIterVar(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getIterRange(); if (f != null) { writer.writeMessage( 2, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getAccuVar(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getAccuInit(); if (f != null) { writer.writeMessage( 4, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getLoopCondition(); if (f != null) { writer.writeMessage( 5, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getLoopStep(); if (f != null) { writer.writeMessage( 6, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } f = message.getResult(); if (f != null) { writer.writeMessage( 7, f, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter ); } }; /** * optional string iter_var = 1; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getIterVar = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setIterVar = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional Expr iter_range = 2; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getIterRange = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 2)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setIterRange = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearIterRange = function() { return this.setIterRange(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasIterRange = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional string accu_var = 3; * @return {string} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getAccuVar = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setAccuVar = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional Expr accu_init = 4; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getAccuInit = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 4)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setAccuInit = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearAccuInit = function() { return this.setAccuInit(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasAccuInit = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional Expr loop_condition = 5; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getLoopCondition = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 5)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setLoopCondition = function(value) { return jspb.Message.setWrapperField(this, 5, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearLoopCondition = function() { return this.setLoopCondition(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasLoopCondition = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional Expr loop_step = 6; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getLoopStep = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 6)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setLoopStep = function(value) { return jspb.Message.setWrapperField(this, 6, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearLoopStep = function() { return this.setLoopStep(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasLoopStep = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional Expr result = 7; * @return {?proto.google.api.expr.v1alpha1.Expr} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.getResult = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr, 7)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.setResult = function(value) { return jspb.Message.setWrapperField(this, 7, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr.Comprehension} returns this */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.clearResult = function() { return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.Comprehension.prototype.hasResult = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional int64 id = 2; * @return {number} */ proto.google.api.expr.v1alpha1.Expr.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional Constant const_expr = 3; * @return {?proto.google.api.expr.v1alpha1.Constant} */ proto.google.api.expr.v1alpha1.Expr.prototype.getConstExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Constant} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Constant, 3)); }; /** * @param {?proto.google.api.expr.v1alpha1.Constant|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setConstExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearConstExpr = function() { return this.setConstExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasConstExpr = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional Ident ident_expr = 4; * @return {?proto.google.api.expr.v1alpha1.Expr.Ident} */ proto.google.api.expr.v1alpha1.Expr.prototype.getIdentExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr.Ident} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Ident, 4)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr.Ident|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setIdentExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 4, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearIdentExpr = function() { return this.setIdentExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasIdentExpr = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional Select select_expr = 5; * @return {?proto.google.api.expr.v1alpha1.Expr.Select} */ proto.google.api.expr.v1alpha1.Expr.prototype.getSelectExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr.Select} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Select, 5)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr.Select|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setSelectExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 5, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearSelectExpr = function() { return this.setSelectExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasSelectExpr = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional Call call_expr = 6; * @return {?proto.google.api.expr.v1alpha1.Expr.Call} */ proto.google.api.expr.v1alpha1.Expr.prototype.getCallExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr.Call} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Call, 6)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr.Call|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setCallExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 6, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearCallExpr = function() { return this.setCallExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasCallExpr = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional CreateList list_expr = 7; * @return {?proto.google.api.expr.v1alpha1.Expr.CreateList} */ proto.google.api.expr.v1alpha1.Expr.prototype.getListExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr.CreateList} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.CreateList, 7)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr.CreateList|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setListExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 7, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearListExpr = function() { return this.setListExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasListExpr = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional CreateStruct struct_expr = 8; * @return {?proto.google.api.expr.v1alpha1.Expr.CreateStruct} */ proto.google.api.expr.v1alpha1.Expr.prototype.getStructExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr.CreateStruct} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.CreateStruct, 8)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr.CreateStruct|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setStructExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearStructExpr = function() { return this.setStructExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasStructExpr = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional Comprehension comprehension_expr = 9; * @return {?proto.google.api.expr.v1alpha1.Expr.Comprehension} */ proto.google.api.expr.v1alpha1.Expr.prototype.getComprehensionExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.Expr.Comprehension} */ ( jspb.Message.getWrapperField(this, proto.google.api.expr.v1alpha1.Expr.Comprehension, 9)); }; /** * @param {?proto.google.api.expr.v1alpha1.Expr.Comprehension|undefined} value * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.setComprehensionExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1alpha1.Expr.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Expr} returns this */ proto.google.api.expr.v1alpha1.Expr.prototype.clearComprehensionExpr = function() { return this.setComprehensionExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Expr.prototype.hasComprehensionExpr = function() { return jspb.Message.getField(this, 9) != null; }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array>} * @const */ proto.google.api.expr.v1alpha1.Constant.oneofGroups_ = [[1,2,3,4,5,6,7,8,9]]; /** * @enum {number} */ proto.google.api.expr.v1alpha1.Constant.ConstantKindCase = { CONSTANT_KIND_NOT_SET: 0, NULL_VALUE: 1, BOOL_VALUE: 2, INT64_VALUE: 3, UINT64_VALUE: 4, DOUBLE_VALUE: 5, STRING_VALUE: 6, BYTES_VALUE: 7, DURATION_VALUE: 8, TIMESTAMP_VALUE: 9 }; /** * @return {proto.google.api.expr.v1alpha1.Constant.ConstantKindCase} */ proto.google.api.expr.v1alpha1.Constant.prototype.getConstantKindCase = function() { return /** @type {proto.google.api.expr.v1alpha1.Constant.ConstantKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0])); }; 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.v1alpha1.Constant.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.Constant.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.v1alpha1.Constant} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Constant.toObject = function(includeInstance, msg) { var f, obj = { nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0), boolValue: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), int64Value: jspb.Message.getFieldWithDefault(msg, 3, 0), uint64Value: jspb.Message.getFieldWithDefault(msg, 4, 0), doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), stringValue: jspb.Message.getFieldWithDefault(msg, 6, ""), bytesValue: msg.getBytesValue_asB64(), durationValue: (f = msg.getDurationValue()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), timestampValue: (f = msg.getTimestampValue()) && google_protobuf_timestamp_pb.Timestamp.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.google.api.expr.v1alpha1.Constant} */ proto.google.api.expr.v1alpha1.Constant.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.Constant; return proto.google.api.expr.v1alpha1.Constant.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.v1alpha1.Constant} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.Constant} */ proto.google.api.expr.v1alpha1.Constant.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum()); msg.setNullValue(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setBoolValue(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setInt64Value(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setUint64Value(value); break; case 5: var value = /** @type {number} */ (reader.readDouble()); msg.setDoubleValue(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setStringValue(value); break; case 7: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setBytesValue(value); break; case 8: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setDurationValue(value); break; case 9: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTimestampValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Constant.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.Constant.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.v1alpha1.Constant} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.Constant.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeEnum( 1, f ); } f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeBool( 2, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeInt64( 3, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 4)); if (f != null) { writer.writeUint64( 4, f ); } f = /** @type {number} */ (jspb.Message.getField(message, 5)); if (f != null) { writer.writeDouble( 5, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 6)); if (f != null) { writer.writeString( 6, f ); } f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 7)); if (f != null) { writer.writeBytes( 7, f ); } f = message.getDurationValue(); if (f != null) { writer.writeMessage( 8, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = message.getTimestampValue(); if (f != null) { writer.writeMessage( 9, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** * optional google.protobuf.NullValue null_value = 1; * @return {!proto.google.protobuf.NullValue} */ proto.google.api.expr.v1alpha1.Constant.prototype.getNullValue = function() { return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.google.protobuf.NullValue} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setNullValue = function(value) { return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearNullValue = function() { return jspb.Message.setOneofField(this, 1, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasNullValue = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional bool bool_value = 2; * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.getBoolValue = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** * @param {boolean} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setBoolValue = function(value) { return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearBoolValue = function() { return jspb.Message.setOneofField(this, 2, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasBoolValue = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int64 int64_value = 3; * @return {number} */ proto.google.api.expr.v1alpha1.Constant.prototype.getInt64Value = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setInt64Value = function(value) { return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearInt64Value = function() { return jspb.Message.setOneofField(this, 3, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasInt64Value = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional uint64 uint64_value = 4; * @return {number} */ proto.google.api.expr.v1alpha1.Constant.prototype.getUint64Value = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setUint64Value = function(value) { return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearUint64Value = function() { return jspb.Message.setOneofField(this, 4, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasUint64Value = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional double double_value = 5; * @return {number} */ proto.google.api.expr.v1alpha1.Constant.prototype.getDoubleValue = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setDoubleValue = function(value) { return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearDoubleValue = function() { return jspb.Message.setOneofField(this, 5, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasDoubleValue = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional string string_value = 6; * @return {string} */ proto.google.api.expr.v1alpha1.Constant.prototype.getStringValue = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setStringValue = function(value) { return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearStringValue = function() { return jspb.Message.setOneofField(this, 6, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasStringValue = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional bytes bytes_value = 7; * @return {!(string|Uint8Array)} */ proto.google.api.expr.v1alpha1.Constant.prototype.getBytesValue = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * optional bytes bytes_value = 7; * This is a type-conversion wrapper around `getBytesValue()` * @return {string} */ proto.google.api.expr.v1alpha1.Constant.prototype.getBytesValue_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getBytesValue())); }; /** * optional bytes bytes_value = 7; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getBytesValue()` * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.Constant.prototype.getBytesValue_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getBytesValue())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setBytesValue = function(value) { return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearBytesValue = function() { return jspb.Message.setOneofField(this, 7, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasBytesValue = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional google.protobuf.Duration duration_value = 8; * @return {?proto.google.protobuf.Duration} */ proto.google.api.expr.v1alpha1.Constant.prototype.getDurationValue = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 8)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setDurationValue = function(value) { return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearDurationValue = function() { return this.setDurationValue(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasDurationValue = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional google.protobuf.Timestamp timestamp_value = 9; * @return {?proto.google.protobuf.Timestamp} */ proto.google.api.expr.v1alpha1.Constant.prototype.getTimestampValue = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.setTimestampValue = function(value) { return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.expr.v1alpha1.Constant.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.v1alpha1.Constant} returns this */ proto.google.api.expr.v1alpha1.Constant.prototype.clearTimestampValue = function() { return this.setTimestampValue(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.v1alpha1.Constant.prototype.hasTimestampValue = function() { return jspb.Message.getField(this, 9) != null; }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.v1alpha1.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.v1alpha1.SourceInfo.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.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.v1alpha1.SourceInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.SourceInfo.toObject = function(includeInstance, msg) { var f, obj = { syntaxVersion: jspb.Message.getFieldWithDefault(msg, 1, ""), location: jspb.Message.getFieldWithDefault(msg, 2, ""), lineOffsetsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, positionsMap: (f = msg.getPositionsMap()) ? f.toObject(includeInstance, undefined) : [], macroCallsMap: (f = msg.getMacroCallsMap()) ? f.toObject(includeInstance, proto.google.api.expr.v1alpha1.Expr.toObject) : [] }; 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.v1alpha1.SourceInfo} */ proto.google.api.expr.v1alpha1.SourceInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.SourceInfo; return proto.google.api.expr.v1alpha1.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.v1alpha1.SourceInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.SourceInfo} */ proto.google.api.expr.v1alpha1.SourceInfo.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.setSyntaxVersion(value); break; 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.readInt64, jspb.BinaryReader.prototype.readInt32, null, 0, 0); }); break; case 5: var value = msg.getMacroCallsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readInt64, jspb.BinaryReader.prototype.readMessage, proto.google.api.expr.v1alpha1.Expr.deserializeBinaryFromReader, 0, new proto.google.api.expr.v1alpha1.Expr()); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.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.v1alpha1.SourceInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.SourceInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSyntaxVersion(); if (f.length > 0) { writer.writeString( 1, f ); } 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.writeInt64, jspb.BinaryWriter.prototype.writeInt32); } f = message.getMacroCallsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeInt64, jspb.BinaryWriter.prototype.writeMessage, proto.google.api.expr.v1alpha1.Expr.serializeBinaryToWriter); } }; /** * optional string syntax_version = 1; * @return {string} */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.getSyntaxVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.setSyntaxVersion = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string location = 2; * @return {string} */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.getLocation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.setLocation = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated int32 line_offsets = 3; * @return {!Array} */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.getLineOffsetsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.setLineOffsetsList = function(value) { return jspb.Message.setField(this, 3, value || []); }; /** * @param {number} value * @param {number=} opt_index * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.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.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.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.v1alpha1.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.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.clearPositionsMap = function() { this.getPositionsMap().clear(); return this;}; /** * map macro_calls = 5; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.getMacroCallsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 5, opt_noLazyCreate, proto.google.api.expr.v1alpha1.Expr)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.google.api.expr.v1alpha1.SourceInfo} returns this */ proto.google.api.expr.v1alpha1.SourceInfo.prototype.clearMacroCallsMap = function() { this.getMacroCallsMap().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.v1alpha1.SourcePosition.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition} */ proto.google.api.expr.v1alpha1.SourcePosition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.v1alpha1.SourcePosition; return proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.v1alpha1.SourcePosition} */ proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.v1alpha1.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.v1alpha1.SourcePosition.prototype.getLocation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.setLocation = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional int32 offset = 2; * @return {number} */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.setOffset = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional int32 line = 3; * @return {number} */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.getLine = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.setLine = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional int32 column = 4; * @return {number} */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.getColumn = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.v1alpha1.SourcePosition} returns this */ proto.google.api.expr.v1alpha1.SourcePosition.prototype.setColumn = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; goog.object.extend(exports, proto.google.api.expr.v1alpha1);