/**
 * @fileoverview
 * @enhanceable
 * @public
 */
// GENERATED CODE -- DO NOT EDIT!

goog.provide('proto.transit_realtime.VehiclePosition');
goog.provide('proto.transit_realtime.VehiclePosition.CarriageDetails');
goog.provide('proto.transit_realtime.VehiclePosition.CongestionLevel');
goog.provide('proto.transit_realtime.VehiclePosition.OccupancyStatus');
goog.provide('proto.transit_realtime.VehiclePosition.VehicleStopStatus');

goog.require('jspb.Message');
goog.require('proto.transit_realtime.Position');
goog.require('proto.transit_realtime.TripDescriptor');
goog.require('proto.transit_realtime.VehicleDescriptor');


/**
 * 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.transit_realtime.VehiclePosition = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, 12, proto.transit_realtime.VehiclePosition.repeatedFields_, null);
};
goog.inherits(proto.transit_realtime.VehiclePosition, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.transit_realtime.VehiclePosition.displayName = 'proto.transit_realtime.VehiclePosition';
}
/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.transit_realtime.VehiclePosition.repeatedFields_ = [11];



if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.transit_realtime.VehiclePosition.prototype.toObject = function(opt_includeInstance) {
  return proto.transit_realtime.VehiclePosition.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.transit_realtime.VehiclePosition} msg The msg instance to transform.
 * @return {!Object}
 */
proto.transit_realtime.VehiclePosition.toObject = function(includeInstance, msg) {
  var f, obj = {
    trip: (f = msg.getTrip()) && proto.transit_realtime.TripDescriptor.toObject(includeInstance, f),
    vehicle: (f = msg.getVehicle()) && proto.transit_realtime.VehicleDescriptor.toObject(includeInstance, f),
    position: (f = msg.getPosition()) && proto.transit_realtime.Position.toObject(includeInstance, f),
    currentStopSequence: jspb.Message.getField(msg, 3),
    stopId: jspb.Message.getField(msg, 7),
    currentStatus: !msg.hasCurrentStatus() ? 2 : jspb.Message.getField(msg, 4),
    timestamp: jspb.Message.getField(msg, 5),
    congestionLevel: jspb.Message.getField(msg, 6),
    occupancyStatus: jspb.Message.getField(msg, 9),
    occupancyPercentage: jspb.Message.getField(msg, 10),
    multiCarriageDetailsList: jspb.Message.toObjectList(msg.getMultiCarriageDetailsList(),
    proto.transit_realtime.VehiclePosition.CarriageDetails.toObject, includeInstance)
  };

  jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
      proto.transit_realtime.VehiclePosition.extensions, proto.transit_realtime.VehiclePosition.prototype.getExtension,
      includeInstance);
  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.transit_realtime.VehiclePosition} The clone.
 */
proto.transit_realtime.VehiclePosition.prototype.cloneMessage = function() {
  return /** @type {!proto.transit_realtime.VehiclePosition} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional TripDescriptor trip = 1;
 * @return {proto.transit_realtime.TripDescriptor}
 */
proto.transit_realtime.VehiclePosition.prototype.getTrip = function() {
  return /** @type{proto.transit_realtime.TripDescriptor} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TripDescriptor, 1));
};


/** @param {proto.transit_realtime.TripDescriptor|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setTrip = function(value) {
  jspb.Message.setWrapperField(this, 1, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearTrip = function() {
  this.setTrip(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasTrip = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional VehicleDescriptor vehicle = 8;
 * @return {proto.transit_realtime.VehicleDescriptor}
 */
proto.transit_realtime.VehiclePosition.prototype.getVehicle = function() {
  return /** @type{proto.transit_realtime.VehicleDescriptor} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.VehicleDescriptor, 8));
};


/** @param {proto.transit_realtime.VehicleDescriptor|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setVehicle = function(value) {
  jspb.Message.setWrapperField(this, 8, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearVehicle = function() {
  this.setVehicle(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasVehicle = function() {
  return jspb.Message.getField(this, 8) != null;
};


/**
 * optional Position position = 2;
 * @return {proto.transit_realtime.Position}
 */
proto.transit_realtime.VehiclePosition.prototype.getPosition = function() {
  return /** @type{proto.transit_realtime.Position} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.Position, 2));
};


/** @param {proto.transit_realtime.Position|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setPosition = function(value) {
  jspb.Message.setWrapperField(this, 2, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearPosition = function() {
  this.setPosition(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasPosition = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional uint32 current_stop_sequence = 3;
 * @return {number}
 */
proto.transit_realtime.VehiclePosition.prototype.getCurrentStopSequence = function() {
  return /** @type {number} */ (!this.hasCurrentStopSequence() ? 0 : jspb.Message.getField(this, 3));
};


/** @param {number?|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setCurrentStopSequence = function(value) {
  jspb.Message.setField(this, 3, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearCurrentStopSequence = function() {
  jspb.Message.setField(this, 3, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasCurrentStopSequence = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional string stop_id = 7;
 * @return {string}
 */
proto.transit_realtime.VehiclePosition.prototype.getStopId = function() {
  return /** @type {string} */ (!this.hasStopId() ? "" : jspb.Message.getField(this, 7));
};


/** @param {string?|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setStopId = function(value) {
  jspb.Message.setField(this, 7, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearStopId = function() {
  jspb.Message.setField(this, 7, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasStopId = function() {
  return jspb.Message.getField(this, 7) != null;
};


/**
 * optional VehicleStopStatus current_status = 4;
 * @return {proto.transit_realtime.VehiclePosition.VehicleStopStatus}
 */
proto.transit_realtime.VehiclePosition.prototype.getCurrentStatus = function() {
  return /** @type {proto.transit_realtime.VehiclePosition.VehicleStopStatus} */ (!this.hasCurrentStatus() ? 2 : jspb.Message.getField(this, 4));
};


/** @param {proto.transit_realtime.VehiclePosition.VehicleStopStatus|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setCurrentStatus = function(value) {
  jspb.Message.setField(this, 4, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearCurrentStatus = function() {
  jspb.Message.setField(this, 4, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasCurrentStatus = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional uint64 timestamp = 5;
 * @return {number}
 */
proto.transit_realtime.VehiclePosition.prototype.getTimestamp = function() {
  return /** @type {number} */ (!this.hasTimestamp() ? 0 : jspb.Message.getField(this, 5));
};


/** @param {number?|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setTimestamp = function(value) {
  jspb.Message.setField(this, 5, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearTimestamp = function() {
  jspb.Message.setField(this, 5, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasTimestamp = function() {
  return jspb.Message.getField(this, 5) != null;
};


/**
 * optional CongestionLevel congestion_level = 6;
 * @return {proto.transit_realtime.VehiclePosition.CongestionLevel}
 */
proto.transit_realtime.VehiclePosition.prototype.getCongestionLevel = function() {
  return /** @type {proto.transit_realtime.VehiclePosition.CongestionLevel} */ (!this.hasCongestionLevel() ? 0 : jspb.Message.getField(this, 6));
};


/** @param {proto.transit_realtime.VehiclePosition.CongestionLevel|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setCongestionLevel = function(value) {
  jspb.Message.setField(this, 6, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearCongestionLevel = function() {
  jspb.Message.setField(this, 6, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasCongestionLevel = function() {
  return jspb.Message.getField(this, 6) != null;
};


/**
 * optional OccupancyStatus occupancy_status = 9;
 * @return {proto.transit_realtime.VehiclePosition.OccupancyStatus}
 */
proto.transit_realtime.VehiclePosition.prototype.getOccupancyStatus = function() {
  return /** @type {proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (!this.hasOccupancyStatus() ? 0 : jspb.Message.getField(this, 9));
};


/** @param {proto.transit_realtime.VehiclePosition.OccupancyStatus|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setOccupancyStatus = function(value) {
  jspb.Message.setField(this, 9, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearOccupancyStatus = function() {
  jspb.Message.setField(this, 9, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasOccupancyStatus = function() {
  return jspb.Message.getField(this, 9) != null;
};


/**
 * optional uint32 occupancy_percentage = 10;
 * @return {number}
 */
proto.transit_realtime.VehiclePosition.prototype.getOccupancyPercentage = function() {
  return /** @type {number} */ (!this.hasOccupancyPercentage() ? 0 : jspb.Message.getField(this, 10));
};


/** @param {number?|undefined} value  */
proto.transit_realtime.VehiclePosition.prototype.setOccupancyPercentage = function(value) {
  jspb.Message.setField(this, 10, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearOccupancyPercentage = function() {
  jspb.Message.setField(this, 10, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.prototype.hasOccupancyPercentage = function() {
  return jspb.Message.getField(this, 10) != null;
};


/**
 * repeated CarriageDetails multi_carriage_details = 11;
 * If you change this array by adding, removing or replacing elements, or if you
 * replace the array itself, then you must call the setter to update it.
 * @return {!Array.<!proto.transit_realtime.VehiclePosition.CarriageDetails>}
 */
proto.transit_realtime.VehiclePosition.prototype.getMultiCarriageDetailsList = function() {
  return /** @type{!Array.<!proto.transit_realtime.VehiclePosition.CarriageDetails>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.VehiclePosition.CarriageDetails, 11));
};


/** @param {Array.<!proto.transit_realtime.VehiclePosition.CarriageDetails>} value  */
proto.transit_realtime.VehiclePosition.prototype.setMultiCarriageDetailsList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 11, value);
};


proto.transit_realtime.VehiclePosition.prototype.clearMultiCarriageDetailsList = function() {
  this.setMultiCarriageDetailsList([]);
};



/**
 * The extensions registered with this message class. This is a map of
 * extension field number to fieldInfo object.
 *
 * For example:
 *     { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
 *
 * fieldName contains the JsCompiler renamed field name property so that it
 * works in OPTIMIZED mode.
 *
 * @type {!Object.<number, jspb.ExtensionFieldInfo>}
 */
proto.transit_realtime.VehiclePosition.extensions = {};

/**
 * @enum {number}
 */
proto.transit_realtime.VehiclePosition.VehicleStopStatus = {
  INCOMING_AT: 0,
  STOPPED_AT: 1,
  IN_TRANSIT_TO: 2
};

/**
 * @enum {number}
 */
proto.transit_realtime.VehiclePosition.CongestionLevel = {
  UNKNOWN_CONGESTION_LEVEL: 0,
  RUNNING_SMOOTHLY: 1,
  STOP_AND_GO: 2,
  CONGESTION: 3,
  SEVERE_CONGESTION: 4
};

/**
 * @enum {number}
 */
proto.transit_realtime.VehiclePosition.OccupancyStatus = {
  EMPTY: 0,
  MANY_SEATS_AVAILABLE: 1,
  FEW_SEATS_AVAILABLE: 2,
  STANDING_ROOM_ONLY: 3,
  CRUSHED_STANDING_ROOM_ONLY: 4,
  FULL: 5,
  NOT_ACCEPTING_PASSENGERS: 6,
  NO_DATA_AVAILABLE: 7,
  NOT_BOARDABLE: 8
};


/**
 * 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.transit_realtime.VehiclePosition.CarriageDetails = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, 6, null, null);
};
goog.inherits(proto.transit_realtime.VehiclePosition.CarriageDetails, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  proto.transit_realtime.VehiclePosition.CarriageDetails.displayName = 'proto.transit_realtime.VehiclePosition.CarriageDetails';
}


if (jspb.Message.GENERATE_TO_OBJECT) {
/**
 * Creates an object representation of this proto suitable for use in Soy templates.
 * Field names that are reserved in JavaScript and will be renamed to pb_name.
 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
 * For the list of reserved names please see:
 *     com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
 * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
 *     for transitional soy proto support: http://goto/soy-param-migration
 * @return {!Object}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.toObject = function(opt_includeInstance) {
  return proto.transit_realtime.VehiclePosition.CarriageDetails.toObject(opt_includeInstance, this);
};


/**
 * Static version of the {@see toObject} method.
 * @param {boolean|undefined} includeInstance Whether to include the JSPB
 *     instance for transitional soy proto support:
 *     http://goto/soy-param-migration
 * @param {!proto.transit_realtime.VehiclePosition.CarriageDetails} msg The msg instance to transform.
 * @return {!Object}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: jspb.Message.getField(msg, 1),
    label: jspb.Message.getField(msg, 2),
    occupancyStatus: !msg.hasOccupancyStatus() ? 7 : jspb.Message.getField(msg, 3),
    occupancyPercentage: !msg.hasOccupancyPercentage() ? -1 : jspb.Message.getField(msg, 4),
    carriageSequence: jspb.Message.getField(msg, 5)
  };

  jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
      proto.transit_realtime.VehiclePosition.CarriageDetails.extensions, proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getExtension,
      includeInstance);
  if (includeInstance) {
    obj.$jspbMessageInstance = msg;
  }
  return obj;
};
}


/**
 * Creates a deep clone of this proto. No data is shared with the original.
 * @return {!proto.transit_realtime.VehiclePosition.CarriageDetails} The clone.
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.cloneMessage = function() {
  return /** @type {!proto.transit_realtime.VehiclePosition.CarriageDetails} */ (jspb.Message.cloneMessage(this));
};


/**
 * optional string id = 1;
 * @return {string}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getId = function() {
  return /** @type {string} */ (!this.hasId() ? "" : jspb.Message.getField(this, 1));
};


/** @param {string?|undefined} value  */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setId = function(value) {
  jspb.Message.setField(this, 1, value);
};


proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearId = function() {
  jspb.Message.setField(this, 1, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasId = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional string label = 2;
 * @return {string}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getLabel = function() {
  return /** @type {string} */ (!this.hasLabel() ? "" : jspb.Message.getField(this, 2));
};


/** @param {string?|undefined} value  */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setLabel = function(value) {
  jspb.Message.setField(this, 2, value);
};


proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearLabel = function() {
  jspb.Message.setField(this, 2, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasLabel = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional OccupancyStatus occupancy_status = 3;
 * @return {proto.transit_realtime.VehiclePosition.OccupancyStatus}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getOccupancyStatus = function() {
  return /** @type {proto.transit_realtime.VehiclePosition.OccupancyStatus} */ (!this.hasOccupancyStatus() ? 7 : jspb.Message.getField(this, 3));
};


/** @param {proto.transit_realtime.VehiclePosition.OccupancyStatus|undefined} value  */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setOccupancyStatus = function(value) {
  jspb.Message.setField(this, 3, value);
};


proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearOccupancyStatus = function() {
  jspb.Message.setField(this, 3, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasOccupancyStatus = function() {
  return jspb.Message.getField(this, 3) != null;
};


/**
 * optional int32 occupancy_percentage = 4;
 * @return {number}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getOccupancyPercentage = function() {
  return /** @type {number} */ (!this.hasOccupancyPercentage() ? -1 : jspb.Message.getField(this, 4));
};


/** @param {number?|undefined} value  */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setOccupancyPercentage = function(value) {
  jspb.Message.setField(this, 4, value);
};


proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearOccupancyPercentage = function() {
  jspb.Message.setField(this, 4, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasOccupancyPercentage = function() {
  return jspb.Message.getField(this, 4) != null;
};


/**
 * optional uint32 carriage_sequence = 5;
 * @return {number}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.getCarriageSequence = function() {
  return /** @type {number} */ (!this.hasCarriageSequence() ? 0 : jspb.Message.getField(this, 5));
};


/** @param {number?|undefined} value  */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.setCarriageSequence = function(value) {
  jspb.Message.setField(this, 5, value);
};


proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.clearCarriageSequence = function() {
  jspb.Message.setField(this, 5, undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.prototype.hasCarriageSequence = function() {
  return jspb.Message.getField(this, 5) != null;
};



/**
 * The extensions registered with this message class. This is a map of
 * extension field number to fieldInfo object.
 *
 * For example:
 *     { 123: {fieldIndex: 123, fieldName: {my_field_name: 0}, ctor: proto.example.MyMessage} }
 *
 * fieldName contains the JsCompiler renamed field name property so that it
 * works in OPTIMIZED mode.
 *
 * @type {!Object.<number, jspb.ExtensionFieldInfo>}
 */
proto.transit_realtime.VehiclePosition.CarriageDetails.extensions = {};

