// source: server.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 common_pb = require('./common_pb.js'); goog.object.extend(proto, common_pb); var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js'); goog.object.extend(proto, google_protobuf_struct_pb); goog.exportSymbol('proto.BoundFunction', null, global); goog.exportSymbol('proto.EnvironmentDefinition', 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.BoundFunction = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.BoundFunction.repeatedFields_, null); }; goog.inherits(proto.BoundFunction, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.BoundFunction.displayName = 'proto.BoundFunction'; } /** * 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.EnvironmentDefinition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.EnvironmentDefinition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.EnvironmentDefinition.displayName = 'proto.EnvironmentDefinition'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.BoundFunction.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.BoundFunction.prototype.toObject = function(opt_includeInstance) { return proto.BoundFunction.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.BoundFunction} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.BoundFunction.toObject = function(includeInstance, msg) { var f, obj = { environmentsList: jspb.Message.toObjectList(msg.getEnvironmentsList(), proto.EnvironmentDefinition.toObject, includeInstance), pb_function: (f = msg.getFunction()) && common_pb.SerializedObject.toObject(includeInstance, f), setupFunc: (f = msg.getSetupFunc()) && common_pb.SerializedObject.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.BoundFunction} */ proto.BoundFunction.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.BoundFunction; return proto.BoundFunction.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.BoundFunction} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.BoundFunction} */ proto.BoundFunction.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.EnvironmentDefinition; reader.readMessage(value,proto.EnvironmentDefinition.deserializeBinaryFromReader); msg.addEnvironments(value); break; case 2: var value = new common_pb.SerializedObject; reader.readMessage(value,common_pb.SerializedObject.deserializeBinaryFromReader); msg.setFunction(value); break; case 3: var value = new common_pb.SerializedObject; reader.readMessage(value,common_pb.SerializedObject.deserializeBinaryFromReader); msg.setSetupFunc(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.BoundFunction.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.BoundFunction.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.BoundFunction} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.BoundFunction.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getEnvironmentsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.EnvironmentDefinition.serializeBinaryToWriter ); } f = message.getFunction(); if (f != null) { writer.writeMessage( 2, f, common_pb.SerializedObject.serializeBinaryToWriter ); } f = message.getSetupFunc(); if (f != null) { writer.writeMessage( 3, f, common_pb.SerializedObject.serializeBinaryToWriter ); } }; /** * repeated EnvironmentDefinition environments = 1; * @return {!Array} */ proto.BoundFunction.prototype.getEnvironmentsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.EnvironmentDefinition, 1)); }; /** * @param {!Array} value * @return {!proto.BoundFunction} returns this */ proto.BoundFunction.prototype.setEnvironmentsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.EnvironmentDefinition=} opt_value * @param {number=} opt_index * @return {!proto.EnvironmentDefinition} */ proto.BoundFunction.prototype.addEnvironments = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.EnvironmentDefinition, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.BoundFunction} returns this */ proto.BoundFunction.prototype.clearEnvironmentsList = function() { return this.setEnvironmentsList([]); }; /** * optional SerializedObject function = 2; * @return {?proto.SerializedObject} */ proto.BoundFunction.prototype.getFunction = function() { return /** @type{?proto.SerializedObject} */ ( jspb.Message.getWrapperField(this, common_pb.SerializedObject, 2)); }; /** * @param {?proto.SerializedObject|undefined} value * @return {!proto.BoundFunction} returns this */ proto.BoundFunction.prototype.setFunction = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.BoundFunction} returns this */ proto.BoundFunction.prototype.clearFunction = function() { return this.setFunction(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.BoundFunction.prototype.hasFunction = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional SerializedObject setup_func = 3; * @return {?proto.SerializedObject} */ proto.BoundFunction.prototype.getSetupFunc = function() { return /** @type{?proto.SerializedObject} */ ( jspb.Message.getWrapperField(this, common_pb.SerializedObject, 3)); }; /** * @param {?proto.SerializedObject|undefined} value * @return {!proto.BoundFunction} returns this */ proto.BoundFunction.prototype.setSetupFunc = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.BoundFunction} returns this */ proto.BoundFunction.prototype.clearSetupFunc = function() { return this.setSetupFunc(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.BoundFunction.prototype.hasSetupFunc = function() { return jspb.Message.getField(this, 3) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, 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.EnvironmentDefinition.prototype.toObject = function(opt_includeInstance) { return proto.EnvironmentDefinition.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.EnvironmentDefinition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.EnvironmentDefinition.toObject = function(includeInstance, msg) { var f, obj = { kind: jspb.Message.getFieldWithDefault(msg, 1, ""), configuration: (f = msg.getConfiguration()) && google_protobuf_struct_pb.Struct.toObject(includeInstance, f), force: 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.EnvironmentDefinition} */ proto.EnvironmentDefinition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.EnvironmentDefinition; return proto.EnvironmentDefinition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.EnvironmentDefinition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.EnvironmentDefinition} */ proto.EnvironmentDefinition.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.setKind(value); break; case 2: var value = new google_protobuf_struct_pb.Struct; reader.readMessage(value,google_protobuf_struct_pb.Struct.deserializeBinaryFromReader); msg.setConfiguration(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setForce(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.EnvironmentDefinition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.EnvironmentDefinition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.EnvironmentDefinition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.EnvironmentDefinition.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKind(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getConfiguration(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_struct_pb.Struct.serializeBinaryToWriter ); } f = message.getForce(); if (f) { writer.writeBool( 3, f ); } }; /** * optional string kind = 1; * @return {string} */ proto.EnvironmentDefinition.prototype.getKind = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.EnvironmentDefinition} returns this */ proto.EnvironmentDefinition.prototype.setKind = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional google.protobuf.Struct configuration = 2; * @return {?proto.google.protobuf.Struct} */ proto.EnvironmentDefinition.prototype.getConfiguration = function() { return /** @type{?proto.google.protobuf.Struct} */ ( jspb.Message.getWrapperField(this, google_protobuf_struct_pb.Struct, 2)); }; /** * @param {?proto.google.protobuf.Struct|undefined} value * @return {!proto.EnvironmentDefinition} returns this */ proto.EnvironmentDefinition.prototype.setConfiguration = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.EnvironmentDefinition} returns this */ proto.EnvironmentDefinition.prototype.clearConfiguration = function() { return this.setConfiguration(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.EnvironmentDefinition.prototype.hasConfiguration = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional bool force = 3; * @return {boolean} */ proto.EnvironmentDefinition.prototype.getForce = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.EnvironmentDefinition} returns this */ proto.EnvironmentDefinition.prototype.setForce = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; goog.object.extend(exports, proto);