UNPKG

auto-traffic-control

Version:

A video game for programmers about air traffic control

1,555 lines (1,342 loc) 44.5 kB
// source: atc/v1/map.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 || window || global || self || Function('return this')(); }).call(null); var atc_v1_tag_pb = require('../../atc/v1/tag_pb.js'); goog.object.extend(proto, atc_v1_tag_pb); goog.exportSymbol('proto.atc.v1.Airport', null, global); goog.exportSymbol('proto.atc.v1.GetMapRequest', null, global); goog.exportSymbol('proto.atc.v1.GetMapResponse', null, global); goog.exportSymbol('proto.atc.v1.Map', null, global); goog.exportSymbol('proto.atc.v1.Node', null, global); goog.exportSymbol('proto.atc.v1.NodeToPointRequest', null, global); goog.exportSymbol('proto.atc.v1.NodeToPointResponse', null, global); goog.exportSymbol('proto.atc.v1.Point', 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.atc.v1.Airport = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.Airport, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.Airport.displayName = 'proto.atc.v1.Airport'; } /** * 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.atc.v1.Map = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.atc.v1.Map.repeatedFields_, null); }; goog.inherits(proto.atc.v1.Map, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.Map.displayName = 'proto.atc.v1.Map'; } /** * 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.atc.v1.Node = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.Node, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.Node.displayName = 'proto.atc.v1.Node'; } /** * 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.atc.v1.Point = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.Point, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.Point.displayName = 'proto.atc.v1.Point'; } /** * 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.atc.v1.GetMapRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.GetMapRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.GetMapRequest.displayName = 'proto.atc.v1.GetMapRequest'; } /** * 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.atc.v1.GetMapResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.GetMapResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.GetMapResponse.displayName = 'proto.atc.v1.GetMapResponse'; } /** * 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.atc.v1.NodeToPointRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.NodeToPointRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.NodeToPointRequest.displayName = 'proto.atc.v1.NodeToPointRequest'; } /** * 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.atc.v1.NodeToPointResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.atc.v1.NodeToPointResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.atc.v1.NodeToPointResponse.displayName = 'proto.atc.v1.NodeToPointResponse'; } 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.atc.v1.Airport.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.Airport.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.atc.v1.Airport} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Airport.toObject = function(includeInstance, msg) { var f, obj = { node: (f = msg.getNode()) && proto.atc.v1.Node.toObject(includeInstance, f), tag: jspb.Message.getFieldWithDefault(msg, 2, 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.atc.v1.Airport} */ proto.atc.v1.Airport.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.Airport; return proto.atc.v1.Airport.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.Airport} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.Airport} */ proto.atc.v1.Airport.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.atc.v1.Node; reader.readMessage(value,proto.atc.v1.Node.deserializeBinaryFromReader); msg.setNode(value); break; case 2: var value = /** @type {!proto.atc.v1.Tag} */ (reader.readEnum()); msg.setTag(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.Airport.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.Airport.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.Airport} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Airport.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNode(); if (f != null) { writer.writeMessage( 1, f, proto.atc.v1.Node.serializeBinaryToWriter ); } f = message.getTag(); if (f !== 0.0) { writer.writeEnum( 2, f ); } }; /** * optional Node node = 1; * @return {?proto.atc.v1.Node} */ proto.atc.v1.Airport.prototype.getNode = function() { return /** @type{?proto.atc.v1.Node} */ ( jspb.Message.getWrapperField(this, proto.atc.v1.Node, 1)); }; /** * @param {?proto.atc.v1.Node|undefined} value * @return {!proto.atc.v1.Airport} returns this */ proto.atc.v1.Airport.prototype.setNode = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.atc.v1.Airport} returns this */ proto.atc.v1.Airport.prototype.clearNode = function() { return this.setNode(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.atc.v1.Airport.prototype.hasNode = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional Tag tag = 2; * @return {!proto.atc.v1.Tag} */ proto.atc.v1.Airport.prototype.getTag = function() { return /** @type {!proto.atc.v1.Tag} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {!proto.atc.v1.Tag} value * @return {!proto.atc.v1.Airport} returns this */ proto.atc.v1.Airport.prototype.setTag = function(value) { return jspb.Message.setProto3EnumField(this, 2, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.atc.v1.Map.repeatedFields_ = [1,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.atc.v1.Map.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.Map.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.atc.v1.Map} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Map.toObject = function(includeInstance, msg) { var f, obj = { airportsList: jspb.Message.toObjectList(msg.getAirportsList(), proto.atc.v1.Airport.toObject, includeInstance), routingGridList: jspb.Message.toObjectList(msg.getRoutingGridList(), proto.atc.v1.Node.toObject, includeInstance), width: jspb.Message.getFieldWithDefault(msg, 3, 0), height: jspb.Message.getFieldWithDefault(msg, 4, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.atc.v1.Map} */ proto.atc.v1.Map.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.Map; return proto.atc.v1.Map.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.Map} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.Map} */ proto.atc.v1.Map.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.atc.v1.Airport; reader.readMessage(value,proto.atc.v1.Airport.deserializeBinaryFromReader); msg.addAirports(value); break; case 2: var value = new proto.atc.v1.Node; reader.readMessage(value,proto.atc.v1.Node.deserializeBinaryFromReader); msg.addRoutingGrid(value); break; case 3: var value = /** @type {number} */ (reader.readUint32()); msg.setWidth(value); break; case 4: var value = /** @type {number} */ (reader.readUint32()); msg.setHeight(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.Map.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.Map.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.Map} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Map.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAirportsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.atc.v1.Airport.serializeBinaryToWriter ); } f = message.getRoutingGridList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, proto.atc.v1.Node.serializeBinaryToWriter ); } f = message.getWidth(); if (f !== 0) { writer.writeUint32( 3, f ); } f = message.getHeight(); if (f !== 0) { writer.writeUint32( 4, f ); } }; /** * repeated Airport airports = 1; * @return {!Array<!proto.atc.v1.Airport>} */ proto.atc.v1.Map.prototype.getAirportsList = function() { return /** @type{!Array<!proto.atc.v1.Airport>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.atc.v1.Airport, 1)); }; /** * @param {!Array<!proto.atc.v1.Airport>} value * @return {!proto.atc.v1.Map} returns this */ proto.atc.v1.Map.prototype.setAirportsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.atc.v1.Airport=} opt_value * @param {number=} opt_index * @return {!proto.atc.v1.Airport} */ proto.atc.v1.Map.prototype.addAirports = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.atc.v1.Airport, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.atc.v1.Map} returns this */ proto.atc.v1.Map.prototype.clearAirportsList = function() { return this.setAirportsList([]); }; /** * repeated Node routing_grid = 2; * @return {!Array<!proto.atc.v1.Node>} */ proto.atc.v1.Map.prototype.getRoutingGridList = function() { return /** @type{!Array<!proto.atc.v1.Node>} */ ( jspb.Message.getRepeatedWrapperField(this, proto.atc.v1.Node, 2)); }; /** * @param {!Array<!proto.atc.v1.Node>} value * @return {!proto.atc.v1.Map} returns this */ proto.atc.v1.Map.prototype.setRoutingGridList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.atc.v1.Node=} opt_value * @param {number=} opt_index * @return {!proto.atc.v1.Node} */ proto.atc.v1.Map.prototype.addRoutingGrid = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.atc.v1.Node, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.atc.v1.Map} returns this */ proto.atc.v1.Map.prototype.clearRoutingGridList = function() { return this.setRoutingGridList([]); }; /** * optional uint32 width = 3; * @return {number} */ proto.atc.v1.Map.prototype.getWidth = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.atc.v1.Map} returns this */ proto.atc.v1.Map.prototype.setWidth = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional uint32 height = 4; * @return {number} */ proto.atc.v1.Map.prototype.getHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.atc.v1.Map} returns this */ proto.atc.v1.Map.prototype.setHeight = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<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.atc.v1.Node.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.Node.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.atc.v1.Node} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Node.toObject = function(includeInstance, msg) { var f, obj = { longitude: jspb.Message.getFieldWithDefault(msg, 1, 0), latitude: jspb.Message.getFieldWithDefault(msg, 2, 0), restricted: 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.atc.v1.Node} */ proto.atc.v1.Node.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.Node; return proto.atc.v1.Node.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.Node} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.Node} */ proto.atc.v1.Node.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setLongitude(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setLatitude(value); break; case 3: var value = /** @type {boolean} */ (reader.readBool()); msg.setRestricted(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.Node.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.Node.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.Node} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Node.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLongitude(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getLatitude(); if (f !== 0) { writer.writeInt32( 2, f ); } f = message.getRestricted(); if (f) { writer.writeBool( 3, f ); } }; /** * optional int32 longitude = 1; * @return {number} */ proto.atc.v1.Node.prototype.getLongitude = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.atc.v1.Node} returns this */ proto.atc.v1.Node.prototype.setLongitude = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int32 latitude = 2; * @return {number} */ proto.atc.v1.Node.prototype.getLatitude = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.atc.v1.Node} returns this */ proto.atc.v1.Node.prototype.setLatitude = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional bool restricted = 3; * @return {boolean} */ proto.atc.v1.Node.prototype.getRestricted = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); }; /** * @param {boolean} value * @return {!proto.atc.v1.Node} returns this */ proto.atc.v1.Node.prototype.setRestricted = function(value) { return jspb.Message.setProto3BooleanField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<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.atc.v1.Point.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.Point.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.atc.v1.Point} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Point.toObject = function(includeInstance, msg) { var f, obj = { x: jspb.Message.getFieldWithDefault(msg, 1, 0), y: jspb.Message.getFieldWithDefault(msg, 2, 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.atc.v1.Point} */ proto.atc.v1.Point.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.Point; return proto.atc.v1.Point.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.Point} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.Point} */ proto.atc.v1.Point.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setX(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setY(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.Point.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.Point.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.Point} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.Point.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getX(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getY(); if (f !== 0) { writer.writeInt32( 2, f ); } }; /** * optional int32 x = 1; * @return {number} */ proto.atc.v1.Point.prototype.getX = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.atc.v1.Point} returns this */ proto.atc.v1.Point.prototype.setX = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional int32 y = 2; * @return {number} */ proto.atc.v1.Point.prototype.getY = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.atc.v1.Point} returns this */ proto.atc.v1.Point.prototype.setY = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<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.atc.v1.GetMapRequest.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.GetMapRequest.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.atc.v1.GetMapRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.GetMapRequest.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.atc.v1.GetMapRequest} */ proto.atc.v1.GetMapRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.GetMapRequest; return proto.atc.v1.GetMapRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.GetMapRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.GetMapRequest} */ proto.atc.v1.GetMapRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.GetMapRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.GetMapRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.GetMapRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.GetMapRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; 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.atc.v1.GetMapResponse.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.GetMapResponse.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.atc.v1.GetMapResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.GetMapResponse.toObject = function(includeInstance, msg) { var f, obj = { map: (f = msg.getMap()) && proto.atc.v1.Map.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.atc.v1.GetMapResponse} */ proto.atc.v1.GetMapResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.GetMapResponse; return proto.atc.v1.GetMapResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.GetMapResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.GetMapResponse} */ proto.atc.v1.GetMapResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.atc.v1.Map; reader.readMessage(value,proto.atc.v1.Map.deserializeBinaryFromReader); msg.setMap(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.GetMapResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.GetMapResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.GetMapResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.GetMapResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMap(); if (f != null) { writer.writeMessage( 1, f, proto.atc.v1.Map.serializeBinaryToWriter ); } }; /** * optional Map map = 1; * @return {?proto.atc.v1.Map} */ proto.atc.v1.GetMapResponse.prototype.getMap = function() { return /** @type{?proto.atc.v1.Map} */ ( jspb.Message.getWrapperField(this, proto.atc.v1.Map, 1)); }; /** * @param {?proto.atc.v1.Map|undefined} value * @return {!proto.atc.v1.GetMapResponse} returns this */ proto.atc.v1.GetMapResponse.prototype.setMap = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.atc.v1.GetMapResponse} returns this */ proto.atc.v1.GetMapResponse.prototype.clearMap = function() { return this.setMap(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.atc.v1.GetMapResponse.prototype.hasMap = function() { return jspb.Message.getField(this, 1) != 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_<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.atc.v1.NodeToPointRequest.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.NodeToPointRequest.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.atc.v1.NodeToPointRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.NodeToPointRequest.toObject = function(includeInstance, msg) { var f, obj = { node: (f = msg.getNode()) && proto.atc.v1.Node.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.atc.v1.NodeToPointRequest} */ proto.atc.v1.NodeToPointRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.NodeToPointRequest; return proto.atc.v1.NodeToPointRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.NodeToPointRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.NodeToPointRequest} */ proto.atc.v1.NodeToPointRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.atc.v1.Node; reader.readMessage(value,proto.atc.v1.Node.deserializeBinaryFromReader); msg.setNode(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.NodeToPointRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.NodeToPointRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.NodeToPointRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.NodeToPointRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNode(); if (f != null) { writer.writeMessage( 1, f, proto.atc.v1.Node.serializeBinaryToWriter ); } }; /** * optional Node node = 1; * @return {?proto.atc.v1.Node} */ proto.atc.v1.NodeToPointRequest.prototype.getNode = function() { return /** @type{?proto.atc.v1.Node} */ ( jspb.Message.getWrapperField(this, proto.atc.v1.Node, 1)); }; /** * @param {?proto.atc.v1.Node|undefined} value * @return {!proto.atc.v1.NodeToPointRequest} returns this */ proto.atc.v1.NodeToPointRequest.prototype.setNode = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.atc.v1.NodeToPointRequest} returns this */ proto.atc.v1.NodeToPointRequest.prototype.clearNode = function() { return this.setNode(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.atc.v1.NodeToPointRequest.prototype.hasNode = function() { return jspb.Message.getField(this, 1) != 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_<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.atc.v1.NodeToPointResponse.prototype.toObject = function(opt_includeInstance) { return proto.atc.v1.NodeToPointResponse.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.atc.v1.NodeToPointResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.NodeToPointResponse.toObject = function(includeInstance, msg) { var f, obj = { point: (f = msg.getPoint()) && proto.atc.v1.Point.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.atc.v1.NodeToPointResponse} */ proto.atc.v1.NodeToPointResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.atc.v1.NodeToPointResponse; return proto.atc.v1.NodeToPointResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.atc.v1.NodeToPointResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.atc.v1.NodeToPointResponse} */ proto.atc.v1.NodeToPointResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.atc.v1.Point; reader.readMessage(value,proto.atc.v1.Point.deserializeBinaryFromReader); msg.setPoint(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.atc.v1.NodeToPointResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.atc.v1.NodeToPointResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.atc.v1.NodeToPointResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.atc.v1.NodeToPointResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPoint(); if (f != null) { writer.writeMessage( 1, f, proto.atc.v1.Point.serializeBinaryToWriter ); } }; /** * optional Point point = 1; * @return {?proto.atc.v1.Point} */ proto.atc.v1.NodeToPointResponse.prototype.getPoint = function() { return /** @type{?proto.atc.v1.Point} */ ( jspb.Message.getWrapperField(this, proto.atc.v1.Point, 1)); }; /** * @param {?proto.atc.v1.Point|undefined} value * @return {!proto.atc.v1.NodeToPointResponse} returns this */ proto.atc.v1.NodeToPointResponse.prototype.setPoint = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.atc.v1.NodeToPointResponse} returns this */ proto.atc.v1.NodeToPointResponse.prototype.clearPoint = function() { return this.setPoint(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.atc.v1.NodeToPointResponse.prototype.hasPoint = function() { return jspb.Message.getField(this, 1) != null; }; goog.object.extend(exports, proto.atc.v1);