UNPKG

xray-grpc

Version:
1,499 lines (1,322 loc) 97.9 kB
// source: router.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() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var common_net_network_pb = require('./common/net/network_pb.js'); goog.object.extend(proto, common_net_network_pb); var common_serial_typed_message_pb = require('./common/serial/typed_message_pb.js'); goog.object.extend(proto, common_serial_typed_message_pb); goog.exportSymbol('proto.xray.app.router.command.AddRuleRequest', null, global); goog.exportSymbol('proto.xray.app.router.command.AddRuleResponse', null, global); goog.exportSymbol('proto.xray.app.router.command.BalancerMsg', null, global); goog.exportSymbol('proto.xray.app.router.command.Config', null, global); goog.exportSymbol('proto.xray.app.router.command.GetBalancerInfoRequest', null, global); goog.exportSymbol('proto.xray.app.router.command.GetBalancerInfoResponse', null, global); goog.exportSymbol('proto.xray.app.router.command.OverrideBalancerTargetRequest', null, global); goog.exportSymbol('proto.xray.app.router.command.OverrideBalancerTargetResponse', null, global); goog.exportSymbol('proto.xray.app.router.command.OverrideInfo', null, global); goog.exportSymbol('proto.xray.app.router.command.PrincipleTargetInfo', null, global); goog.exportSymbol('proto.xray.app.router.command.RemoveRuleRequest', null, global); goog.exportSymbol('proto.xray.app.router.command.RemoveRuleResponse', null, global); goog.exportSymbol('proto.xray.app.router.command.RoutingContext', null, global); goog.exportSymbol('proto.xray.app.router.command.SubscribeRoutingStatsRequest', null, global); goog.exportSymbol('proto.xray.app.router.command.TestRouteRequest', 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.xray.app.router.command.RoutingContext = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.xray.app.router.command.RoutingContext.repeatedFields_, null); }; goog.inherits(proto.xray.app.router.command.RoutingContext, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.RoutingContext.displayName = 'proto.xray.app.router.command.RoutingContext'; } /** * 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.xray.app.router.command.SubscribeRoutingStatsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.xray.app.router.command.SubscribeRoutingStatsRequest.repeatedFields_, null); }; goog.inherits(proto.xray.app.router.command.SubscribeRoutingStatsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.displayName = 'proto.xray.app.router.command.SubscribeRoutingStatsRequest'; } /** * 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.xray.app.router.command.TestRouteRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.xray.app.router.command.TestRouteRequest.repeatedFields_, null); }; goog.inherits(proto.xray.app.router.command.TestRouteRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.TestRouteRequest.displayName = 'proto.xray.app.router.command.TestRouteRequest'; } /** * 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.xray.app.router.command.PrincipleTargetInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.xray.app.router.command.PrincipleTargetInfo.repeatedFields_, null); }; goog.inherits(proto.xray.app.router.command.PrincipleTargetInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.PrincipleTargetInfo.displayName = 'proto.xray.app.router.command.PrincipleTargetInfo'; } /** * 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.xray.app.router.command.OverrideInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.OverrideInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.OverrideInfo.displayName = 'proto.xray.app.router.command.OverrideInfo'; } /** * 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.xray.app.router.command.BalancerMsg = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.BalancerMsg, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.BalancerMsg.displayName = 'proto.xray.app.router.command.BalancerMsg'; } /** * 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.xray.app.router.command.GetBalancerInfoRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.GetBalancerInfoRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.GetBalancerInfoRequest.displayName = 'proto.xray.app.router.command.GetBalancerInfoRequest'; } /** * 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.xray.app.router.command.GetBalancerInfoResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.GetBalancerInfoResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.GetBalancerInfoResponse.displayName = 'proto.xray.app.router.command.GetBalancerInfoResponse'; } /** * 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.xray.app.router.command.OverrideBalancerTargetRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.OverrideBalancerTargetRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.OverrideBalancerTargetRequest.displayName = 'proto.xray.app.router.command.OverrideBalancerTargetRequest'; } /** * 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.xray.app.router.command.OverrideBalancerTargetResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.OverrideBalancerTargetResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.OverrideBalancerTargetResponse.displayName = 'proto.xray.app.router.command.OverrideBalancerTargetResponse'; } /** * 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.xray.app.router.command.AddRuleRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.AddRuleRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.AddRuleRequest.displayName = 'proto.xray.app.router.command.AddRuleRequest'; } /** * 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.xray.app.router.command.AddRuleResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.AddRuleResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.AddRuleResponse.displayName = 'proto.xray.app.router.command.AddRuleResponse'; } /** * 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.xray.app.router.command.RemoveRuleRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.RemoveRuleRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.RemoveRuleRequest.displayName = 'proto.xray.app.router.command.RemoveRuleRequest'; } /** * 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.xray.app.router.command.RemoveRuleResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.RemoveRuleResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.RemoveRuleResponse.displayName = 'proto.xray.app.router.command.RemoveRuleResponse'; } /** * 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.xray.app.router.command.Config = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.xray.app.router.command.Config, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.xray.app.router.command.Config.displayName = 'proto.xray.app.router.command.Config'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.xray.app.router.command.RoutingContext.repeatedFields_ = [3,4,11]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.xray.app.router.command.RoutingContext.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.router.command.RoutingContext.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.xray.app.router.command.RoutingContext} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.RoutingContext.toObject = function(includeInstance, msg) { var f, obj = { inboundtag: jspb.Message.getFieldWithDefault(msg, 1, ""), network: jspb.Message.getFieldWithDefault(msg, 2, 0), sourceipsList: msg.getSourceipsList_asB64(), targetipsList: msg.getTargetipsList_asB64(), sourceport: jspb.Message.getFieldWithDefault(msg, 5, 0), targetport: jspb.Message.getFieldWithDefault(msg, 6, 0), targetdomain: jspb.Message.getFieldWithDefault(msg, 7, ""), protocol: jspb.Message.getFieldWithDefault(msg, 8, ""), user: jspb.Message.getFieldWithDefault(msg, 9, ""), attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [], outboundgrouptagsList: (f = jspb.Message.getRepeatedField(msg, 11)) == null ? undefined : f, outboundtag: jspb.Message.getFieldWithDefault(msg, 12, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.xray.app.router.command.RoutingContext} */ proto.xray.app.router.command.RoutingContext.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.router.command.RoutingContext; return proto.xray.app.router.command.RoutingContext.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.router.command.RoutingContext} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.router.command.RoutingContext} */ proto.xray.app.router.command.RoutingContext.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.setInboundtag(value); break; case 2: var value = /** @type {!proto.xray.common.net.Network} */ (reader.readEnum()); msg.setNetwork(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addSourceips(value); break; case 4: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addTargetips(value); break; case 5: var value = /** @type {number} */ (reader.readUint32()); msg.setSourceport(value); break; case 6: var value = /** @type {number} */ (reader.readUint32()); msg.setTargetport(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setTargetdomain(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setProtocol(value); break; case 9: var value = /** @type {string} */ (reader.readString()); msg.setUser(value); break; case 10: var value = msg.getAttributesMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); }); break; case 11: var value = /** @type {string} */ (reader.readString()); msg.addOutboundgrouptags(value); break; case 12: var value = /** @type {string} */ (reader.readString()); msg.setOutboundtag(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.router.command.RoutingContext.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.router.command.RoutingContext.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.router.command.RoutingContext} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.RoutingContext.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getInboundtag(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getNetwork(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = message.getSourceipsList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( 3, f ); } f = message.getTargetipsList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( 4, f ); } f = message.getSourceport(); if (f !== 0) { writer.writeUint32( 5, f ); } f = message.getTargetport(); if (f !== 0) { writer.writeUint32( 6, f ); } f = message.getTargetdomain(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getProtocol(); if (f.length > 0) { writer.writeString( 8, f ); } f = message.getUser(); if (f.length > 0) { writer.writeString( 9, f ); } f = message.getAttributesMap(true); if (f && f.getLength() > 0) { f.serializeBinary(10, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = message.getOutboundgrouptagsList(); if (f.length > 0) { writer.writeRepeatedString( 11, f ); } f = message.getOutboundtag(); if (f.length > 0) { writer.writeString( 12, f ); } }; /** * optional string InboundTag = 1; * @return {string} */ proto.xray.app.router.command.RoutingContext.prototype.getInboundtag = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setInboundtag = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional xray.common.net.Network Network = 2; * @return {!proto.xray.common.net.Network} */ proto.xray.app.router.command.RoutingContext.prototype.getNetwork = function() { return /** @type {!proto.xray.common.net.Network} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {!proto.xray.common.net.Network} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setNetwork = function(value) { return jspb.Message.setProto3EnumField(this, 2, value); }; /** * repeated bytes SourceIPs = 3; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.xray.app.router.command.RoutingContext.prototype.getSourceipsList = function() { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 3)); }; /** * repeated bytes SourceIPs = 3; * This is a type-conversion wrapper around `getSourceipsList()` * @return {!Array<string>} */ proto.xray.app.router.command.RoutingContext.prototype.getSourceipsList_asB64 = function() { return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64( this.getSourceipsList())); }; /** * repeated bytes SourceIPs = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSourceipsList()` * @return {!Array<!Uint8Array>} */ proto.xray.app.router.command.RoutingContext.prototype.getSourceipsList_asU8 = function() { return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8( this.getSourceipsList())); }; /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setSourceipsList = function(value) { return jspb.Message.setField(this, 3, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.addSourceips = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.clearSourceipsList = function() { return this.setSourceipsList([]); }; /** * repeated bytes TargetIPs = 4; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.xray.app.router.command.RoutingContext.prototype.getTargetipsList = function() { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 4)); }; /** * repeated bytes TargetIPs = 4; * This is a type-conversion wrapper around `getTargetipsList()` * @return {!Array<string>} */ proto.xray.app.router.command.RoutingContext.prototype.getTargetipsList_asB64 = function() { return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64( this.getTargetipsList())); }; /** * repeated bytes TargetIPs = 4; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getTargetipsList()` * @return {!Array<!Uint8Array>} */ proto.xray.app.router.command.RoutingContext.prototype.getTargetipsList_asU8 = function() { return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8( this.getTargetipsList())); }; /** * @param {!(Array<!Uint8Array>|Array<string>)} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setTargetipsList = function(value) { return jspb.Message.setField(this, 4, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.addTargetips = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 4, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.clearTargetipsList = function() { return this.setTargetipsList([]); }; /** * optional uint32 SourcePort = 5; * @return {number} */ proto.xray.app.router.command.RoutingContext.prototype.getSourceport = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** * @param {number} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setSourceport = function(value) { return jspb.Message.setProto3IntField(this, 5, value); }; /** * optional uint32 TargetPort = 6; * @return {number} */ proto.xray.app.router.command.RoutingContext.prototype.getTargetport = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; /** * @param {number} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setTargetport = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; /** * optional string TargetDomain = 7; * @return {string} */ proto.xray.app.router.command.RoutingContext.prototype.getTargetdomain = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setTargetdomain = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string Protocol = 8; * @return {string} */ proto.xray.app.router.command.RoutingContext.prototype.getProtocol = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setProtocol = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; /** * optional string User = 9; * @return {string} */ proto.xray.app.router.command.RoutingContext.prototype.getUser = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** * @param {string} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setUser = function(value) { return jspb.Message.setProto3StringField(this, 9, value); }; /** * map<string, string> Attributes = 10; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<string,string>} */ proto.xray.app.router.command.RoutingContext.prototype.getAttributesMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<string,string>} */ ( jspb.Message.getMapField(this, 10, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.clearAttributesMap = function() { this.getAttributesMap().clear(); return this;}; /** * repeated string OutboundGroupTags = 11; * @return {!Array<string>} */ proto.xray.app.router.command.RoutingContext.prototype.getOutboundgrouptagsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 11)); }; /** * @param {!Array<string>} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setOutboundgrouptagsList = function(value) { return jspb.Message.setField(this, 11, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.addOutboundgrouptags = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 11, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.clearOutboundgrouptagsList = function() { return this.setOutboundgrouptagsList([]); }; /** * optional string OutboundTag = 12; * @return {string} */ proto.xray.app.router.command.RoutingContext.prototype.getOutboundtag = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); }; /** * @param {string} value * @return {!proto.xray.app.router.command.RoutingContext} returns this */ proto.xray.app.router.command.RoutingContext.prototype.setOutboundtag = function(value) { return jspb.Message.setProto3StringField(this, 12, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.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_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.router.command.SubscribeRoutingStatsRequest.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.xray.app.router.command.SubscribeRoutingStatsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.toObject = function(includeInstance, msg) { var f, obj = { fieldselectorsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.xray.app.router.command.SubscribeRoutingStatsRequest} */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.router.command.SubscribeRoutingStatsRequest; return proto.xray.app.router.command.SubscribeRoutingStatsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.router.command.SubscribeRoutingStatsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.router.command.SubscribeRoutingStatsRequest} */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.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.addFieldselectors(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.router.command.SubscribeRoutingStatsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.router.command.SubscribeRoutingStatsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getFieldselectorsList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } }; /** * repeated string FieldSelectors = 1; * @return {!Array<string>} */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.prototype.getFieldselectorsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array<string>} value * @return {!proto.xray.app.router.command.SubscribeRoutingStatsRequest} returns this */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.prototype.setFieldselectorsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.xray.app.router.command.SubscribeRoutingStatsRequest} returns this */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.prototype.addFieldselectors = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.router.command.SubscribeRoutingStatsRequest} returns this */ proto.xray.app.router.command.SubscribeRoutingStatsRequest.prototype.clearFieldselectorsList = function() { return this.setFieldselectorsList([]); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.xray.app.router.command.TestRouteRequest.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.xray.app.router.command.TestRouteRequest.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.router.command.TestRouteRequest.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.xray.app.router.command.TestRouteRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.TestRouteRequest.toObject = function(includeInstance, msg) { var f, obj = { routingcontext: (f = msg.getRoutingcontext()) && proto.xray.app.router.command.RoutingContext.toObject(includeInstance, f), fieldselectorsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, publishresult: 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.xray.app.router.command.TestRouteRequest} */ proto.xray.app.router.command.TestRouteRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.router.command.TestRouteRequest; return proto.xray.app.router.command.TestRouteRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.router.command.TestRouteRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.router.command.TestRouteRequest} */ proto.xray.app.router.command.TestRouteRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.xray.app.router.command.RoutingContext; reader.readMessage(value,proto.xray.app.router.command.RoutingContext.deserializeBinaryFromReader); msg.setRoutingcontext(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.addFieldselectors(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setPublishresult(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.router.command.TestRouteRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.router.command.TestRouteRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.router.command.TestRouteRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.TestRouteRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRoutingcontext(); if (f != null) { writer.writeMessage( 1, f, proto.xray.app.router.command.RoutingContext.serializeBinaryToWriter ); } f = message.getFieldselectorsList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } f = message.getPublishresult(); if (f) { writer.writeBool( 3, f ); } }; /** * optional RoutingContext RoutingContext = 1; * @return {?proto.xray.app.router.command.RoutingContext} */ proto.xray.app.router.command.TestRouteRequest.prototype.getRoutingcontext = function() { return /** @type{?proto.xray.app.router.command.RoutingContext} */ ( jspb.Message.getWrapperField(this, proto.xray.app.router.command.RoutingContext, 1)); }; /** * @param {?proto.xray.app.router.command.RoutingContext|undefined} value * @return {!proto.xray.app.router.command.TestRouteRequest} returns this */ proto.xray.app.router.command.TestRouteRequest.prototype.setRoutingcontext = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.xray.app.router.command.TestRouteRequest} returns this */ proto.xray.app.router.command.TestRouteRequest.prototype.clearRoutingcontext = function() { return this.setRoutingcontext(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.xray.app.router.command.TestRouteRequest.prototype.hasRoutingcontext = function() { return jspb.Message.getField(this, 1) != null; }; /** * repeated string FieldSelectors = 2; * @return {!Array<string>} */ proto.xray.app.router.command.TestRouteRequest.prototype.getFieldselectorsList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2)); }; /** * @param {!Array<string>} value * @return {!proto.xray.app.router.command.TestRouteRequest} returns this */ proto.xray.app.router.command.TestRouteRequest.prototype.setFieldselectorsList = function(value) { return jspb.Message.setField(this, 2, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.xray.app.router.command.TestRouteRequest} returns this */ proto.xray.app.router.command.TestRouteRequest.prototype.addFieldselectors = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 2, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.router.command.TestRouteRequest} returns this */ proto.xray.app.router.command.TestRouteRequest.prototype.clearFieldselectorsList = function() { return this.setFieldselectorsList([]); }; /** * optional bool PublishResult = 3; * @return {boolean} */ proto.xray.app.router.command.TestRouteRequest.prototype.getPublishresult = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.xray.app.router.command.TestRouteRequest} returns this */ proto.xray.app.router.command.TestRouteRequest.prototype.setPublishresult = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.xray.app.router.command.PrincipleTargetInfo.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_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.xray.app.router.command.PrincipleTargetInfo.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.router.command.PrincipleTargetInfo.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.xray.app.router.command.PrincipleTargetInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.PrincipleTargetInfo.toObject = function(includeInstance, msg) { var f, obj = { tagList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.xray.app.router.command.PrincipleTargetInfo} */ proto.xray.app.router.command.PrincipleTargetInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.xray.app.router.command.PrincipleTargetInfo; return proto.xray.app.router.command.PrincipleTargetInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.xray.app.router.command.PrincipleTargetInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.xray.app.router.command.PrincipleTargetInfo} */ proto.xray.app.router.command.PrincipleTargetInfo.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.addTag(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.xray.app.router.command.PrincipleTargetInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.xray.app.router.command.PrincipleTargetInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.xray.app.router.command.PrincipleTargetInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.xray.app.router.command.PrincipleTargetInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getTagList(); if (f.length > 0) { writer.writeRepeatedString( 1, f ); } }; /** * repeated string tag = 1; * @return {!Array<string>} */ proto.xray.app.router.command.PrincipleTargetInfo.prototype.getTagList = function() { return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * @param {!Array<string>} value * @return {!proto.xray.app.router.command.PrincipleTargetInfo} returns this */ proto.xray.app.router.command.PrincipleTargetInfo.prototype.setTagList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value * @param {number=} opt_index * @return {!proto.xray.app.router.command.PrincipleTargetInfo} returns this */ proto.xray.app.router.command.PrincipleTargetInfo.prototype.addTag = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.xray.app.router.command.PrincipleTargetInfo} returns this */ proto.xray.app.router.command.PrincipleTargetInfo.prototype.clearTagList = function() { return this.setTagList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.xray.app.router.command.OverrideInfo.prototype.toObject = function(opt_includeInstance) { return proto.xray.app.router.command.OverrideInfo.toObject(opt_includeInstance,