/* eslint-disable */ /*Proudly generated by GenDocu.com*/ // source: google/api/expr/conformance/v1alpha1/conformance_service.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_api_expr_v1alpha1_checked_pb = require('../../../../../google/api/expr/v1alpha1/checked_pb.js'); goog.object.extend(proto, google_api_expr_v1alpha1_checked_pb); var google_api_expr_v1alpha1_eval_pb = require('../../../../../google/api/expr/v1alpha1/eval_pb.js'); goog.object.extend(proto, google_api_expr_v1alpha1_eval_pb); var google_api_expr_v1alpha1_syntax_pb = require('../../../../../google/api/expr/v1alpha1/syntax_pb.js'); goog.object.extend(proto, google_api_expr_v1alpha1_syntax_pb); var google_rpc_status_pb = require('../../../../../google/rpc/status_pb.js'); goog.object.extend(proto, google_rpc_status_pb); var google_api_client_pb = require('../../../../../google/api/client_pb.js'); goog.object.extend(proto, google_api_client_pb); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.CheckRequest', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.CheckResponse', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.EvalRequest', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.EvalRequest.ExprKindCase', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.EvalResponse', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.IssueDetails', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.IssueDetails.Severity', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.ParseRequest', null, global); goog.exportSymbol('proto.google.api.expr.conformance.v1alpha1.ParseResponse', 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.conformance.v1alpha1.ParseRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.ParseRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.displayName = 'proto.google.api.expr.conformance.v1alpha1.ParseRequest'; } /** * 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.conformance.v1alpha1.ParseResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.conformance.v1alpha1.ParseResponse.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.ParseResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.displayName = 'proto.google.api.expr.conformance.v1alpha1.ParseResponse'; } /** * 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.conformance.v1alpha1.CheckRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.conformance.v1alpha1.CheckRequest.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.CheckRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.displayName = 'proto.google.api.expr.conformance.v1alpha1.CheckRequest'; } /** * 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.conformance.v1alpha1.CheckResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.conformance.v1alpha1.CheckResponse.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.CheckResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.displayName = 'proto.google.api.expr.conformance.v1alpha1.CheckResponse'; } /** * 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.conformance.v1alpha1.EvalRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.expr.conformance.v1alpha1.EvalRequest.oneofGroups_); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.EvalRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.displayName = 'proto.google.api.expr.conformance.v1alpha1.EvalRequest'; } /** * 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.conformance.v1alpha1.EvalResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.expr.conformance.v1alpha1.EvalResponse.repeatedFields_, null); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.EvalResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.displayName = 'proto.google.api.expr.conformance.v1alpha1.EvalResponse'; } /** * 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.conformance.v1alpha1.IssueDetails = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.expr.conformance.v1alpha1.IssueDetails, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.displayName = 'proto.google.api.expr.conformance.v1alpha1.IssueDetails'; } 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.conformance.v1alpha1.ParseRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.ParseRequest.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.conformance.v1alpha1.ParseRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.toObject = function(includeInstance, msg) { var f, obj = { celSource: jspb.Message.getFieldWithDefault(msg, 1, ""), syntaxVersion: jspb.Message.getFieldWithDefault(msg, 2, ""), sourceLocation: jspb.Message.getFieldWithDefault(msg, 3, ""), disableMacros: jspb.Message.getBooleanFieldWithDefault(msg, 4, 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.conformance.v1alpha1.ParseRequest} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.ParseRequest; return proto.google.api.expr.conformance.v1alpha1.ParseRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.ParseRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.ParseRequest} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.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.setCelSource(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSyntaxVersion(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setSourceLocation(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setDisableMacros(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.ParseRequest.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.conformance.v1alpha1.ParseRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCelSource(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getSyntaxVersion(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getSourceLocation(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getDisableMacros(); if (f) { writer.writeBool( 4, f ); } }; /** * optional string cel_source = 1; * @return {string} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.getCelSource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.conformance.v1alpha1.ParseRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.setCelSource = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string syntax_version = 2; * @return {string} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.getSyntaxVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.conformance.v1alpha1.ParseRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.setSyntaxVersion = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string source_location = 3; * @return {string} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.getSourceLocation = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.conformance.v1alpha1.ParseRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.setSourceLocation = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional bool disable_macros = 4; * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.getDisableMacros = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.google.api.expr.conformance.v1alpha1.ParseRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseRequest.prototype.setDisableMacros = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.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.conformance.v1alpha1.ParseResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.ParseResponse.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.conformance.v1alpha1.ParseResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.toObject = function(includeInstance, msg) { var f, obj = { parsedExpr: (f = msg.getParsedExpr()) && google_api_expr_v1alpha1_syntax_pb.ParsedExpr.toObject(includeInstance, f), issuesList: jspb.Message.toObjectList(msg.getIssuesList(), google_rpc_status_pb.Status.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.conformance.v1alpha1.ParseResponse} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.ParseResponse; return proto.google.api.expr.conformance.v1alpha1.ParseResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.ParseResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.ParseResponse} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_api_expr_v1alpha1_syntax_pb.ParsedExpr; reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.ParsedExpr.deserializeBinaryFromReader); msg.setParsedExpr(value); break; case 2: var value = new google_rpc_status_pb.Status; reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); msg.addIssues(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.ParseResponse.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.conformance.v1alpha1.ParseResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getParsedExpr(); if (f != null) { writer.writeMessage( 1, f, google_api_expr_v1alpha1_syntax_pb.ParsedExpr.serializeBinaryToWriter ); } f = message.getIssuesList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, google_rpc_status_pb.Status.serializeBinaryToWriter ); } }; /** * optional google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1; * @return {?proto.google.api.expr.v1alpha1.ParsedExpr} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.getParsedExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.ParsedExpr} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.ParsedExpr, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.ParsedExpr|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.ParseResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.setParsedExpr = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.ParseResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.clearParsedExpr = function() { return this.setParsedExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.hasParsedExpr = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated google.rpc.Status issues = 2; * @return {!Array} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.getIssuesList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, google_rpc_status_pb.Status, 2)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.conformance.v1alpha1.ParseResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.setIssuesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.google.rpc.Status=} opt_value * @param {number=} opt_index * @return {!proto.google.rpc.Status} */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.addIssues = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.rpc.Status, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.conformance.v1alpha1.ParseResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.ParseResponse.prototype.clearIssuesList = function() { return this.setIssuesList([]); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.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.conformance.v1alpha1.CheckRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.CheckRequest.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.conformance.v1alpha1.CheckRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.toObject = function(includeInstance, msg) { var f, obj = { parsedExpr: (f = msg.getParsedExpr()) && google_api_expr_v1alpha1_syntax_pb.ParsedExpr.toObject(includeInstance, f), typeEnvList: jspb.Message.toObjectList(msg.getTypeEnvList(), google_api_expr_v1alpha1_checked_pb.Decl.toObject, includeInstance), container: jspb.Message.getFieldWithDefault(msg, 3, ""), noStdEnv: jspb.Message.getBooleanFieldWithDefault(msg, 4, 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.conformance.v1alpha1.CheckRequest} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.CheckRequest; return proto.google.api.expr.conformance.v1alpha1.CheckRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_api_expr_v1alpha1_syntax_pb.ParsedExpr; reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.ParsedExpr.deserializeBinaryFromReader); msg.setParsedExpr(value); break; case 2: var value = new google_api_expr_v1alpha1_checked_pb.Decl; reader.readMessage(value,google_api_expr_v1alpha1_checked_pb.Decl.deserializeBinaryFromReader); msg.addTypeEnv(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setContainer(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setNoStdEnv(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.CheckRequest.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.conformance.v1alpha1.CheckRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getParsedExpr(); if (f != null) { writer.writeMessage( 1, f, google_api_expr_v1alpha1_syntax_pb.ParsedExpr.serializeBinaryToWriter ); } f = message.getTypeEnvList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, google_api_expr_v1alpha1_checked_pb.Decl.serializeBinaryToWriter ); } f = message.getContainer(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getNoStdEnv(); if (f) { writer.writeBool( 4, f ); } }; /** * optional google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1; * @return {?proto.google.api.expr.v1alpha1.ParsedExpr} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.getParsedExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.ParsedExpr} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.ParsedExpr, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.ParsedExpr|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.setParsedExpr = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.clearParsedExpr = function() { return this.setParsedExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.hasParsedExpr = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated google.api.expr.v1alpha1.Decl type_env = 2; * @return {!Array} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.getTypeEnvList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, google_api_expr_v1alpha1_checked_pb.Decl, 2)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.setTypeEnvList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.google.api.expr.v1alpha1.Decl=} opt_value * @param {number=} opt_index * @return {!proto.google.api.expr.v1alpha1.Decl} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.addTypeEnv = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.api.expr.v1alpha1.Decl, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.clearTypeEnvList = function() { return this.setTypeEnvList([]); }; /** * optional string container = 3; * @return {string} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.getContainer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.setContainer = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional bool no_std_env = 4; * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.getNoStdEnv = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** * @param {boolean} value * @return {!proto.google.api.expr.conformance.v1alpha1.CheckRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckRequest.prototype.setNoStdEnv = function(value) { return jspb.Message.setProto3BooleanField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.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.conformance.v1alpha1.CheckResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.CheckResponse.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.conformance.v1alpha1.CheckResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.toObject = function(includeInstance, msg) { var f, obj = { checkedExpr: (f = msg.getCheckedExpr()) && google_api_expr_v1alpha1_checked_pb.CheckedExpr.toObject(includeInstance, f), issuesList: jspb.Message.toObjectList(msg.getIssuesList(), google_rpc_status_pb.Status.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.conformance.v1alpha1.CheckResponse} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.CheckResponse; return proto.google.api.expr.conformance.v1alpha1.CheckResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.CheckResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.CheckResponse} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_api_expr_v1alpha1_checked_pb.CheckedExpr; reader.readMessage(value,google_api_expr_v1alpha1_checked_pb.CheckedExpr.deserializeBinaryFromReader); msg.setCheckedExpr(value); break; case 2: var value = new google_rpc_status_pb.Status; reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); msg.addIssues(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.CheckResponse.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.conformance.v1alpha1.CheckResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCheckedExpr(); if (f != null) { writer.writeMessage( 1, f, google_api_expr_v1alpha1_checked_pb.CheckedExpr.serializeBinaryToWriter ); } f = message.getIssuesList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, google_rpc_status_pb.Status.serializeBinaryToWriter ); } }; /** * optional google.api.expr.v1alpha1.CheckedExpr checked_expr = 1; * @return {?proto.google.api.expr.v1alpha1.CheckedExpr} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.getCheckedExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.CheckedExpr} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_checked_pb.CheckedExpr, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.CheckedExpr|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.CheckResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.setCheckedExpr = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.CheckResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.clearCheckedExpr = function() { return this.setCheckedExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.hasCheckedExpr = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated google.rpc.Status issues = 2; * @return {!Array} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.getIssuesList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, google_rpc_status_pb.Status, 2)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.conformance.v1alpha1.CheckResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.setIssuesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.google.rpc.Status=} opt_value * @param {number=} opt_index * @return {!proto.google.rpc.Status} */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.addIssues = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.rpc.Status, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.conformance.v1alpha1.CheckResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.CheckResponse.prototype.clearIssuesList = function() { return this.setIssuesList([]); }; /** * 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.conformance.v1alpha1.EvalRequest.oneofGroups_ = [[1,2]]; /** * @enum {number} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.ExprKindCase = { EXPR_KIND_NOT_SET: 0, PARSED_EXPR: 1, CHECKED_EXPR: 2 }; /** * @return {proto.google.api.expr.conformance.v1alpha1.EvalRequest.ExprKindCase} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.getExprKindCase = function() { return /** @type {proto.google.api.expr.conformance.v1alpha1.EvalRequest.ExprKindCase} */(jspb.Message.computeOneofCase(this, proto.google.api.expr.conformance.v1alpha1.EvalRequest.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.conformance.v1alpha1.EvalRequest.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.EvalRequest.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.conformance.v1alpha1.EvalRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.toObject = function(includeInstance, msg) { var f, obj = { parsedExpr: (f = msg.getParsedExpr()) && google_api_expr_v1alpha1_syntax_pb.ParsedExpr.toObject(includeInstance, f), checkedExpr: (f = msg.getCheckedExpr()) && google_api_expr_v1alpha1_checked_pb.CheckedExpr.toObject(includeInstance, f), bindingsMap: (f = msg.getBindingsMap()) ? f.toObject(includeInstance, proto.google.api.expr.v1alpha1.ExprValue.toObject) : [], container: jspb.Message.getFieldWithDefault(msg, 4, "") }; 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.conformance.v1alpha1.EvalRequest} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.EvalRequest; return proto.google.api.expr.conformance.v1alpha1.EvalRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_api_expr_v1alpha1_syntax_pb.ParsedExpr; reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.ParsedExpr.deserializeBinaryFromReader); msg.setParsedExpr(value); break; case 2: var value = new google_api_expr_v1alpha1_checked_pb.CheckedExpr; reader.readMessage(value,google_api_expr_v1alpha1_checked_pb.CheckedExpr.deserializeBinaryFromReader); msg.setCheckedExpr(value); break; case 3: var value = msg.getBindingsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.api.expr.v1alpha1.ExprValue.deserializeBinaryFromReader, "", new proto.google.api.expr.v1alpha1.ExprValue()); }); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setContainer(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.EvalRequest.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.conformance.v1alpha1.EvalRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getParsedExpr(); if (f != null) { writer.writeMessage( 1, f, google_api_expr_v1alpha1_syntax_pb.ParsedExpr.serializeBinaryToWriter ); } f = message.getCheckedExpr(); if (f != null) { writer.writeMessage( 2, f, google_api_expr_v1alpha1_checked_pb.CheckedExpr.serializeBinaryToWriter ); } f = message.getBindingsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.api.expr.v1alpha1.ExprValue.serializeBinaryToWriter); } f = message.getContainer(); if (f.length > 0) { writer.writeString( 4, f ); } }; /** * optional google.api.expr.v1alpha1.ParsedExpr parsed_expr = 1; * @return {?proto.google.api.expr.v1alpha1.ParsedExpr} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.getParsedExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.ParsedExpr} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.ParsedExpr, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.ParsedExpr|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.setParsedExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.google.api.expr.conformance.v1alpha1.EvalRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.clearParsedExpr = function() { return this.setParsedExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.hasParsedExpr = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional google.api.expr.v1alpha1.CheckedExpr checked_expr = 2; * @return {?proto.google.api.expr.v1alpha1.CheckedExpr} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.getCheckedExpr = function() { return /** @type{?proto.google.api.expr.v1alpha1.CheckedExpr} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_checked_pb.CheckedExpr, 2)); }; /** * @param {?proto.google.api.expr.v1alpha1.CheckedExpr|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.setCheckedExpr = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.google.api.expr.conformance.v1alpha1.EvalRequest.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.clearCheckedExpr = function() { return this.setCheckedExpr(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.hasCheckedExpr = function() { return jspb.Message.getField(this, 2) != null; }; /** * map bindings = 3; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.getBindingsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 3, opt_noLazyCreate, proto.google.api.expr.v1alpha1.ExprValue)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.clearBindingsMap = function() { this.getBindingsMap().clear(); return this;}; /** * optional string container = 4; * @return {string} */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.getContainer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.google.api.expr.conformance.v1alpha1.EvalRequest} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalRequest.prototype.setContainer = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.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.conformance.v1alpha1.EvalResponse.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.EvalResponse.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.conformance.v1alpha1.EvalResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.toObject = function(includeInstance, msg) { var f, obj = { result: (f = msg.getResult()) && google_api_expr_v1alpha1_eval_pb.ExprValue.toObject(includeInstance, f), issuesList: jspb.Message.toObjectList(msg.getIssuesList(), google_rpc_status_pb.Status.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.conformance.v1alpha1.EvalResponse} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.EvalResponse; return proto.google.api.expr.conformance.v1alpha1.EvalResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.EvalResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalResponse} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_api_expr_v1alpha1_eval_pb.ExprValue; reader.readMessage(value,google_api_expr_v1alpha1_eval_pb.ExprValue.deserializeBinaryFromReader); msg.setResult(value); break; case 2: var value = new google_rpc_status_pb.Status; reader.readMessage(value,google_rpc_status_pb.Status.deserializeBinaryFromReader); msg.addIssues(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.EvalResponse.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.conformance.v1alpha1.EvalResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResult(); if (f != null) { writer.writeMessage( 1, f, google_api_expr_v1alpha1_eval_pb.ExprValue.serializeBinaryToWriter ); } f = message.getIssuesList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, google_rpc_status_pb.Status.serializeBinaryToWriter ); } }; /** * optional google.api.expr.v1alpha1.ExprValue result = 1; * @return {?proto.google.api.expr.v1alpha1.ExprValue} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.getResult = function() { return /** @type{?proto.google.api.expr.v1alpha1.ExprValue} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_eval_pb.ExprValue, 1)); }; /** * @param {?proto.google.api.expr.v1alpha1.ExprValue|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.EvalResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.setResult = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.clearResult = function() { return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.hasResult = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated google.rpc.Status issues = 2; * @return {!Array} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.getIssuesList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, google_rpc_status_pb.Status, 2)); }; /** * @param {!Array} value * @return {!proto.google.api.expr.conformance.v1alpha1.EvalResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.setIssuesList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.google.rpc.Status=} opt_value * @param {number=} opt_index * @return {!proto.google.rpc.Status} */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.addIssues = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.google.rpc.Status, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.expr.conformance.v1alpha1.EvalResponse} returns this */ proto.google.api.expr.conformance.v1alpha1.EvalResponse.prototype.clearIssuesList = function() { return this.setIssuesList([]); }; 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.conformance.v1alpha1.IssueDetails.prototype.toObject = function(opt_includeInstance) { return proto.google.api.expr.conformance.v1alpha1.IssueDetails.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.conformance.v1alpha1.IssueDetails} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.toObject = function(includeInstance, msg) { var f, obj = { severity: jspb.Message.getFieldWithDefault(msg, 1, 0), position: (f = msg.getPosition()) && google_api_expr_v1alpha1_syntax_pb.SourcePosition.toObject(includeInstance, f), id: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.expr.conformance.v1alpha1.IssueDetails; return proto.google.api.expr.conformance.v1alpha1.IssueDetails.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.google.api.expr.conformance.v1alpha1.IssueDetails.Severity} */ (reader.readEnum()); msg.setSeverity(value); break; case 2: var value = new google_api_expr_v1alpha1_syntax_pb.SourcePosition; reader.readMessage(value,google_api_expr_v1alpha1_syntax_pb.SourcePosition.deserializeBinaryFromReader); msg.setPosition(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.expr.conformance.v1alpha1.IssueDetails.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.conformance.v1alpha1.IssueDetails} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSeverity(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getPosition(); if (f != null) { writer.writeMessage( 2, f, google_api_expr_v1alpha1_syntax_pb.SourcePosition.serializeBinaryToWriter ); } f = message.getId(); if (f !== 0) { writer.writeInt64( 3, f ); } }; /** * @enum {number} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.Severity = { SEVERITY_UNSPECIFIED: 0, DEPRECATION: 1, WARNING: 2, ERROR: 3 }; /** * optional Severity severity = 1; * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails.Severity} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.getSeverity = function() { return /** @type {!proto.google.api.expr.conformance.v1alpha1.IssueDetails.Severity} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.google.api.expr.conformance.v1alpha1.IssueDetails.Severity} value * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} returns this */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.setSeverity = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional google.api.expr.v1alpha1.SourcePosition position = 2; * @return {?proto.google.api.expr.v1alpha1.SourcePosition} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.getPosition = function() { return /** @type{?proto.google.api.expr.v1alpha1.SourcePosition} */ ( jspb.Message.getWrapperField(this, google_api_expr_v1alpha1_syntax_pb.SourcePosition, 2)); }; /** * @param {?proto.google.api.expr.v1alpha1.SourcePosition|undefined} value * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} returns this */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.setPosition = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} returns this */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.clearPosition = function() { return this.setPosition(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.hasPosition = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int64 id = 3; * @return {number} */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.google.api.expr.conformance.v1alpha1.IssueDetails} returns this */ proto.google.api.expr.conformance.v1alpha1.IssueDetails.prototype.setId = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; goog.object.extend(exports, proto.google.api.expr.conformance.v1alpha1);