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

goog.provide('proto.transit_realtime.FeedEntity');

goog.require('jspb.Message');
goog.require('proto.transit_realtime.Alert');
goog.require('proto.transit_realtime.Shape');
goog.require('proto.transit_realtime.TripUpdate');
goog.require('proto.transit_realtime.VehiclePosition');


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


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.FeedEntity.prototype.toObject = function(opt_includeInstance) {
  return proto.transit_realtime.FeedEntity.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.FeedEntity} msg The msg instance to transform.
 * @return {!Object}
 */
proto.transit_realtime.FeedEntity.toObject = function(includeInstance, msg) {
  var f, obj = {
    id: jspb.Message.getField(msg, 1),
    isDeleted: !msg.hasIsDeleted() ? false : jspb.Message.getField(msg, 2),
    tripUpdate: (f = msg.getTripUpdate()) && proto.transit_realtime.TripUpdate.toObject(includeInstance, f),
    vehicle: (f = msg.getVehicle()) && proto.transit_realtime.VehiclePosition.toObject(includeInstance, f),
    alert: (f = msg.getAlert()) && proto.transit_realtime.Alert.toObject(includeInstance, f),
    shape: (f = msg.getShape()) && proto.transit_realtime.Shape.toObject(includeInstance, f)
  };

  jspb.Message.toObjectExtension(/** @type {!jspb.Message} */ (msg), obj,
      proto.transit_realtime.FeedEntity.extensions, proto.transit_realtime.FeedEntity.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.FeedEntity} The clone.
 */
proto.transit_realtime.FeedEntity.prototype.cloneMessage = function() {
  return /** @type {!proto.transit_realtime.FeedEntity} */ (jspb.Message.cloneMessage(this));
};


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


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


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


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


/**
 * optional bool is_deleted = 2;
 * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
 * You should avoid comparisons like {@code val === true/false} in those cases.
 * @return {boolean}
 */
proto.transit_realtime.FeedEntity.prototype.getIsDeleted = function() {
  return /** @type {boolean} */ (!this.hasIsDeleted() ? false : jspb.Message.getField(this, 2));
};


/** @param {boolean?|undefined} value  */
proto.transit_realtime.FeedEntity.prototype.setIsDeleted = function(value) {
  jspb.Message.setField(this, 2, value);
};


proto.transit_realtime.FeedEntity.prototype.clearIsDeleted = function() {
  jspb.Message.setField(this, 2, undefined);
};


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


/**
 * optional TripUpdate trip_update = 3;
 * @return {proto.transit_realtime.TripUpdate}
 */
proto.transit_realtime.FeedEntity.prototype.getTripUpdate = function() {
  return /** @type{proto.transit_realtime.TripUpdate} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TripUpdate, 3));
};


/** @param {proto.transit_realtime.TripUpdate|undefined} value  */
proto.transit_realtime.FeedEntity.prototype.setTripUpdate = function(value) {
  jspb.Message.setWrapperField(this, 3, value);
};


proto.transit_realtime.FeedEntity.prototype.clearTripUpdate = function() {
  this.setTripUpdate(undefined);
};


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


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


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


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


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


/**
 * optional Alert alert = 5;
 * @return {proto.transit_realtime.Alert}
 */
proto.transit_realtime.FeedEntity.prototype.getAlert = function() {
  return /** @type{proto.transit_realtime.Alert} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.Alert, 5));
};


/** @param {proto.transit_realtime.Alert|undefined} value  */
proto.transit_realtime.FeedEntity.prototype.setAlert = function(value) {
  jspb.Message.setWrapperField(this, 5, value);
};


proto.transit_realtime.FeedEntity.prototype.clearAlert = function() {
  this.setAlert(undefined);
};


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


/**
 * optional Shape shape = 6;
 * @return {proto.transit_realtime.Shape}
 */
proto.transit_realtime.FeedEntity.prototype.getShape = function() {
  return /** @type{proto.transit_realtime.Shape} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.Shape, 6));
};


/** @param {proto.transit_realtime.Shape|undefined} value  */
proto.transit_realtime.FeedEntity.prototype.setShape = function(value) {
  jspb.Message.setWrapperField(this, 6, value);
};


proto.transit_realtime.FeedEntity.prototype.clearShape = function() {
  this.setShape(undefined);
};


/**
 * Returns whether this field is set.
 * @return{!boolean}
 */
proto.transit_realtime.FeedEntity.prototype.hasShape = function() {
  return jspb.Message.getField(this, 6) != 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.FeedEntity.extensions = {};

