auto-traffic-control
Version:
A video game for programmers about air traffic control
1,420 lines (1,225 loc) • 43.8 kB
JavaScript
// source: atc/v1/airplane.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_map_pb = require('../../atc/v1/map_pb.js');
goog.object.extend(proto, atc_v1_map_pb);
var atc_v1_tag_pb = require('../../atc/v1/tag_pb.js');
goog.object.extend(proto, atc_v1_tag_pb);
goog.exportSymbol('proto.atc.v1.Airplane', null, global);
goog.exportSymbol('proto.atc.v1.GetAirplaneRequest', null, global);
goog.exportSymbol('proto.atc.v1.GetAirplaneResponse', null, global);
goog.exportSymbol('proto.atc.v1.UpdateFlightPlanError', null, global);
goog.exportSymbol('proto.atc.v1.UpdateFlightPlanError.ValidationError', null, global);
goog.exportSymbol('proto.atc.v1.UpdateFlightPlanRequest', null, global);
goog.exportSymbol('proto.atc.v1.UpdateFlightPlanResponse', null, global);
goog.exportSymbol('proto.atc.v1.UpdateFlightPlanResponse.PayloadCase', null, global);
goog.exportSymbol('proto.atc.v1.UpdateFlightPlanSuccess', 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.Airplane = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.atc.v1.Airplane.repeatedFields_, null);
};
goog.inherits(proto.atc.v1.Airplane, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.Airplane.displayName = 'proto.atc.v1.Airplane';
}
/**
* 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.GetAirplaneRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.atc.v1.GetAirplaneRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.GetAirplaneRequest.displayName = 'proto.atc.v1.GetAirplaneRequest';
}
/**
* 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.GetAirplaneResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.atc.v1.GetAirplaneResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.GetAirplaneResponse.displayName = 'proto.atc.v1.GetAirplaneResponse';
}
/**
* 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.UpdateFlightPlanRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.atc.v1.UpdateFlightPlanRequest.repeatedFields_, null);
};
goog.inherits(proto.atc.v1.UpdateFlightPlanRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.UpdateFlightPlanRequest.displayName = 'proto.atc.v1.UpdateFlightPlanRequest';
}
/**
* 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.UpdateFlightPlanResponse = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.atc.v1.UpdateFlightPlanResponse.oneofGroups_);
};
goog.inherits(proto.atc.v1.UpdateFlightPlanResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.UpdateFlightPlanResponse.displayName = 'proto.atc.v1.UpdateFlightPlanResponse';
}
/**
* 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.UpdateFlightPlanSuccess = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.atc.v1.UpdateFlightPlanSuccess, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.UpdateFlightPlanSuccess.displayName = 'proto.atc.v1.UpdateFlightPlanSuccess';
}
/**
* 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.UpdateFlightPlanError = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.atc.v1.UpdateFlightPlanError.repeatedFields_, null);
};
goog.inherits(proto.atc.v1.UpdateFlightPlanError, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.atc.v1.UpdateFlightPlanError.displayName = 'proto.atc.v1.UpdateFlightPlanError';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.atc.v1.Airplane.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<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.Airplane.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.Airplane.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.Airplane} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.Airplane.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
point: (f = msg.getPoint()) && atc_v1_map_pb.Point.toObject(includeInstance, f),
flightPlanList: jspb.Message.toObjectList(msg.getFlightPlanList(),
atc_v1_map_pb.Node.toObject, includeInstance),
tag: 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.Airplane}
*/
proto.atc.v1.Airplane.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.Airplane;
return proto.atc.v1.Airplane.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.Airplane} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.Airplane}
*/
proto.atc.v1.Airplane.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.setId(value);
break;
case 2:
var value = new atc_v1_map_pb.Point;
reader.readMessage(value,atc_v1_map_pb.Point.deserializeBinaryFromReader);
msg.setPoint(value);
break;
case 3:
var value = new atc_v1_map_pb.Node;
reader.readMessage(value,atc_v1_map_pb.Node.deserializeBinaryFromReader);
msg.addFlightPlan(value);
break;
case 4:
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.Airplane.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.Airplane.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.Airplane} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.Airplane.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPoint();
if (f != null) {
writer.writeMessage(
2,
f,
atc_v1_map_pb.Point.serializeBinaryToWriter
);
}
f = message.getFlightPlanList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
atc_v1_map_pb.Node.serializeBinaryToWriter
);
}
f = message.getTag();
if (f !== 0.0) {
writer.writeEnum(
4,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.atc.v1.Airplane.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.atc.v1.Airplane} returns this
*/
proto.atc.v1.Airplane.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Point point = 2;
* @return {?proto.atc.v1.Point}
*/
proto.atc.v1.Airplane.prototype.getPoint = function() {
return /** @type{?proto.atc.v1.Point} */ (
jspb.Message.getWrapperField(this, atc_v1_map_pb.Point, 2));
};
/**
* @param {?proto.atc.v1.Point|undefined} value
* @return {!proto.atc.v1.Airplane} returns this
*/
proto.atc.v1.Airplane.prototype.setPoint = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.atc.v1.Airplane} returns this
*/
proto.atc.v1.Airplane.prototype.clearPoint = function() {
return this.setPoint(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.atc.v1.Airplane.prototype.hasPoint = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated Node flight_plan = 3;
* @return {!Array<!proto.atc.v1.Node>}
*/
proto.atc.v1.Airplane.prototype.getFlightPlanList = function() {
return /** @type{!Array<!proto.atc.v1.Node>} */ (
jspb.Message.getRepeatedWrapperField(this, atc_v1_map_pb.Node, 3));
};
/**
* @param {!Array<!proto.atc.v1.Node>} value
* @return {!proto.atc.v1.Airplane} returns this
*/
proto.atc.v1.Airplane.prototype.setFlightPlanList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.atc.v1.Node=} opt_value
* @param {number=} opt_index
* @return {!proto.atc.v1.Node}
*/
proto.atc.v1.Airplane.prototype.addFlightPlan = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.atc.v1.Node, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.atc.v1.Airplane} returns this
*/
proto.atc.v1.Airplane.prototype.clearFlightPlanList = function() {
return this.setFlightPlanList([]);
};
/**
* optional Tag tag = 4;
* @return {!proto.atc.v1.Tag}
*/
proto.atc.v1.Airplane.prototype.getTag = function() {
return /** @type {!proto.atc.v1.Tag} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/**
* @param {!proto.atc.v1.Tag} value
* @return {!proto.atc.v1.Airplane} returns this
*/
proto.atc.v1.Airplane.prototype.setTag = function(value) {
return jspb.Message.setProto3EnumField(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.GetAirplaneRequest.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.GetAirplaneRequest.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.GetAirplaneRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.GetAirplaneRequest.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.atc.v1.GetAirplaneRequest}
*/
proto.atc.v1.GetAirplaneRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.GetAirplaneRequest;
return proto.atc.v1.GetAirplaneRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.GetAirplaneRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.GetAirplaneRequest}
*/
proto.atc.v1.GetAirplaneRequest.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.setId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.atc.v1.GetAirplaneRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.GetAirplaneRequest.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.GetAirplaneRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.GetAirplaneRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.atc.v1.GetAirplaneRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.atc.v1.GetAirplaneRequest} returns this
*/
proto.atc.v1.GetAirplaneRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<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.GetAirplaneResponse.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.GetAirplaneResponse.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.GetAirplaneResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.GetAirplaneResponse.toObject = function(includeInstance, msg) {
var f, obj = {
airplane: (f = msg.getAirplane()) && proto.atc.v1.Airplane.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.GetAirplaneResponse}
*/
proto.atc.v1.GetAirplaneResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.GetAirplaneResponse;
return proto.atc.v1.GetAirplaneResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.GetAirplaneResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.GetAirplaneResponse}
*/
proto.atc.v1.GetAirplaneResponse.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.Airplane;
reader.readMessage(value,proto.atc.v1.Airplane.deserializeBinaryFromReader);
msg.setAirplane(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.atc.v1.GetAirplaneResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.GetAirplaneResponse.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.GetAirplaneResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.GetAirplaneResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAirplane();
if (f != null) {
writer.writeMessage(
1,
f,
proto.atc.v1.Airplane.serializeBinaryToWriter
);
}
};
/**
* optional Airplane airplane = 1;
* @return {?proto.atc.v1.Airplane}
*/
proto.atc.v1.GetAirplaneResponse.prototype.getAirplane = function() {
return /** @type{?proto.atc.v1.Airplane} */ (
jspb.Message.getWrapperField(this, proto.atc.v1.Airplane, 1));
};
/**
* @param {?proto.atc.v1.Airplane|undefined} value
* @return {!proto.atc.v1.GetAirplaneResponse} returns this
*/
proto.atc.v1.GetAirplaneResponse.prototype.setAirplane = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.atc.v1.GetAirplaneResponse} returns this
*/
proto.atc.v1.GetAirplaneResponse.prototype.clearAirplane = function() {
return this.setAirplane(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.atc.v1.GetAirplaneResponse.prototype.hasAirplane = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.atc.v1.UpdateFlightPlanRequest.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.atc.v1.UpdateFlightPlanRequest.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.UpdateFlightPlanRequest.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.UpdateFlightPlanRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanRequest.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
flightPlanList: jspb.Message.toObjectList(msg.getFlightPlanList(),
atc_v1_map_pb.Node.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.atc.v1.UpdateFlightPlanRequest}
*/
proto.atc.v1.UpdateFlightPlanRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.UpdateFlightPlanRequest;
return proto.atc.v1.UpdateFlightPlanRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.UpdateFlightPlanRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.UpdateFlightPlanRequest}
*/
proto.atc.v1.UpdateFlightPlanRequest.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.setId(value);
break;
case 2:
var value = new atc_v1_map_pb.Node;
reader.readMessage(value,atc_v1_map_pb.Node.deserializeBinaryFromReader);
msg.addFlightPlan(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.atc.v1.UpdateFlightPlanRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.UpdateFlightPlanRequest.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.UpdateFlightPlanRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getId();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getFlightPlanList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
atc_v1_map_pb.Node.serializeBinaryToWriter
);
}
};
/**
* optional string id = 1;
* @return {string}
*/
proto.atc.v1.UpdateFlightPlanRequest.prototype.getId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.atc.v1.UpdateFlightPlanRequest} returns this
*/
proto.atc.v1.UpdateFlightPlanRequest.prototype.setId = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* repeated Node flight_plan = 2;
* @return {!Array<!proto.atc.v1.Node>}
*/
proto.atc.v1.UpdateFlightPlanRequest.prototype.getFlightPlanList = function() {
return /** @type{!Array<!proto.atc.v1.Node>} */ (
jspb.Message.getRepeatedWrapperField(this, atc_v1_map_pb.Node, 2));
};
/**
* @param {!Array<!proto.atc.v1.Node>} value
* @return {!proto.atc.v1.UpdateFlightPlanRequest} returns this
*/
proto.atc.v1.UpdateFlightPlanRequest.prototype.setFlightPlanList = 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.UpdateFlightPlanRequest.prototype.addFlightPlan = 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.UpdateFlightPlanRequest} returns this
*/
proto.atc.v1.UpdateFlightPlanRequest.prototype.clearFlightPlanList = function() {
return this.setFlightPlanList([]);
};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.atc.v1.UpdateFlightPlanResponse.oneofGroups_ = [[1,2]];
/**
* @enum {number}
*/
proto.atc.v1.UpdateFlightPlanResponse.PayloadCase = {
PAYLOAD_NOT_SET: 0,
SUCCESS: 1,
ERROR: 2
};
/**
* @return {proto.atc.v1.UpdateFlightPlanResponse.PayloadCase}
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.getPayloadCase = function() {
return /** @type {proto.atc.v1.UpdateFlightPlanResponse.PayloadCase} */(jspb.Message.computeOneofCase(this, proto.atc.v1.UpdateFlightPlanResponse.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<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.UpdateFlightPlanResponse.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.UpdateFlightPlanResponse.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.UpdateFlightPlanResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanResponse.toObject = function(includeInstance, msg) {
var f, obj = {
success: (f = msg.getSuccess()) && proto.atc.v1.UpdateFlightPlanSuccess.toObject(includeInstance, f),
error: (f = msg.getError()) && proto.atc.v1.UpdateFlightPlanError.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.UpdateFlightPlanResponse}
*/
proto.atc.v1.UpdateFlightPlanResponse.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.UpdateFlightPlanResponse;
return proto.atc.v1.UpdateFlightPlanResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.UpdateFlightPlanResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.UpdateFlightPlanResponse}
*/
proto.atc.v1.UpdateFlightPlanResponse.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.UpdateFlightPlanSuccess;
reader.readMessage(value,proto.atc.v1.UpdateFlightPlanSuccess.deserializeBinaryFromReader);
msg.setSuccess(value);
break;
case 2:
var value = new proto.atc.v1.UpdateFlightPlanError;
reader.readMessage(value,proto.atc.v1.UpdateFlightPlanError.deserializeBinaryFromReader);
msg.setError(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.UpdateFlightPlanResponse.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.UpdateFlightPlanResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanResponse.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSuccess();
if (f != null) {
writer.writeMessage(
1,
f,
proto.atc.v1.UpdateFlightPlanSuccess.serializeBinaryToWriter
);
}
f = message.getError();
if (f != null) {
writer.writeMessage(
2,
f,
proto.atc.v1.UpdateFlightPlanError.serializeBinaryToWriter
);
}
};
/**
* optional UpdateFlightPlanSuccess success = 1;
* @return {?proto.atc.v1.UpdateFlightPlanSuccess}
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.getSuccess = function() {
return /** @type{?proto.atc.v1.UpdateFlightPlanSuccess} */ (
jspb.Message.getWrapperField(this, proto.atc.v1.UpdateFlightPlanSuccess, 1));
};
/**
* @param {?proto.atc.v1.UpdateFlightPlanSuccess|undefined} value
* @return {!proto.atc.v1.UpdateFlightPlanResponse} returns this
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.setSuccess = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.atc.v1.UpdateFlightPlanResponse.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.atc.v1.UpdateFlightPlanResponse} returns this
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.clearSuccess = function() {
return this.setSuccess(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.hasSuccess = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional UpdateFlightPlanError error = 2;
* @return {?proto.atc.v1.UpdateFlightPlanError}
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.getError = function() {
return /** @type{?proto.atc.v1.UpdateFlightPlanError} */ (
jspb.Message.getWrapperField(this, proto.atc.v1.UpdateFlightPlanError, 2));
};
/**
* @param {?proto.atc.v1.UpdateFlightPlanError|undefined} value
* @return {!proto.atc.v1.UpdateFlightPlanResponse} returns this
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.setError = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.atc.v1.UpdateFlightPlanResponse.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.atc.v1.UpdateFlightPlanResponse} returns this
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.clearError = function() {
return this.setError(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.atc.v1.UpdateFlightPlanResponse.prototype.hasError = function() {
return jspb.Message.getField(this, 2) != 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.UpdateFlightPlanSuccess.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.UpdateFlightPlanSuccess.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.UpdateFlightPlanSuccess} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanSuccess.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.UpdateFlightPlanSuccess}
*/
proto.atc.v1.UpdateFlightPlanSuccess.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.UpdateFlightPlanSuccess;
return proto.atc.v1.UpdateFlightPlanSuccess.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.UpdateFlightPlanSuccess} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.UpdateFlightPlanSuccess}
*/
proto.atc.v1.UpdateFlightPlanSuccess.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.UpdateFlightPlanSuccess.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.UpdateFlightPlanSuccess.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.UpdateFlightPlanSuccess} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanSuccess.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.atc.v1.UpdateFlightPlanError.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.atc.v1.UpdateFlightPlanError.prototype.toObject = function(opt_includeInstance) {
return proto.atc.v1.UpdateFlightPlanError.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.UpdateFlightPlanError} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanError.toObject = function(includeInstance, msg) {
var f, obj = {
errorsList: (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.atc.v1.UpdateFlightPlanError}
*/
proto.atc.v1.UpdateFlightPlanError.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.atc.v1.UpdateFlightPlanError;
return proto.atc.v1.UpdateFlightPlanError.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.atc.v1.UpdateFlightPlanError} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.atc.v1.UpdateFlightPlanError}
*/
proto.atc.v1.UpdateFlightPlanError.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var values = /** @type {!Array<!proto.atc.v1.UpdateFlightPlanError.ValidationError>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
for (var i = 0; i < values.length; i++) {
msg.addErrors(values[i]);
}
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.atc.v1.UpdateFlightPlanError.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.atc.v1.UpdateFlightPlanError.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.UpdateFlightPlanError} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.atc.v1.UpdateFlightPlanError.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getErrorsList();
if (f.length > 0) {
writer.writePackedEnum(
1,
f
);
}
};
/**
* @enum {number}
*/
proto.atc.v1.UpdateFlightPlanError.ValidationError = {
VALIDATION_ERROR_UNSPECIFIED: 0,
VALIDATION_ERROR_NODE_OUTSIDE_MAP: 1,
VALIDATION_ERROR_INVALID_STEP: 2,
VALIDATION_ERROR_SHARP_TURN: 3,
VALIDATION_ERROR_INVALID_START: 4,
VALIDATION_ERROR_RESTRICTED_NODE: 5
};
/**
* repeated ValidationError errors = 1;
* @return {!Array<!proto.atc.v1.UpdateFlightPlanError.ValidationError>}
*/
proto.atc.v1.UpdateFlightPlanError.prototype.getErrorsList = function() {
return /** @type {!Array<!proto.atc.v1.UpdateFlightPlanError.ValidationError>} */ (jspb.Message.getRepeatedField(this, 1));
};
/**
* @param {!Array<!proto.atc.v1.UpdateFlightPlanError.ValidationError>} value
* @return {!proto.atc.v1.UpdateFlightPlanError} returns this
*/
proto.atc.v1.UpdateFlightPlanError.prototype.setErrorsList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {!proto.atc.v1.UpdateFlightPlanError.ValidationError} value
* @param {number=} opt_index
* @return {!proto.atc.v1.UpdateFlightPlanError} returns this
*/
proto.atc.v1.UpdateFlightPlanError.prototype.addErrors = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.atc.v1.UpdateFlightPlanError} returns this
*/
proto.atc.v1.UpdateFlightPlanError.prototype.clearErrorsList = function() {
return this.setErrorsList([]);
};
goog.object.extend(exports, proto.atc.v1);