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

goog.provide('proto.transit_realtime.TripDescriptor');
goog.provide('proto.transit_realtime.TripDescriptor.ScheduleRelationship');

goog.require('jspb.Message');


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


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.TripDescriptor.prototype.toObject = function(opt_includeInstance) {
  return proto.transit_realtime.TripDescriptor.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.TripDescriptor} msg The msg instance to transform.
 * @return {!Object}
 */
proto.transit_realtime.TripDescriptor.toObject = function(includeInstance, msg) {
  var f, obj = {
    tripId: jspb.Message.getField(msg, 1),
    routeId: jspb.Message.getField(msg, 5),
    directionId: jspb.Message.getField(msg, 6),
    startTime: jspb.Message.getField(msg, 2),
    startDate: jspb.Message.getField(msg, 3),
    scheduleRelationship: jspb.Message.getField(msg, 4)
  };

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


/**
 * optional string trip_id = 1;
 * @return {string}
 */
proto.transit_realtime.TripDescriptor.prototype.getTripId = function() {
  return /** @type {string} */ (!this.hasTripId() ? "" : jspb.Message.getField(this, 1));
};


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


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


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


/**
 * optional string route_id = 5;
 * @return {string}
 */
proto.transit_realtime.TripDescriptor.prototype.getRouteId = function() {
  return /** @type {string} */ (!this.hasRouteId() ? "" : jspb.Message.getField(this, 5));
};


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


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


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


/**
 * optional uint32 direction_id = 6;
 * @return {number}
 */
proto.transit_realtime.TripDescriptor.prototype.getDirectionId = function() {
  return /** @type {number} */ (!this.hasDirectionId() ? 0 : jspb.Message.getField(this, 6));
};


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


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


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


/**
 * optional string start_time = 2;
 * @return {string}
 */
proto.transit_realtime.TripDescriptor.prototype.getStartTime = function() {
  return /** @type {string} */ (!this.hasStartTime() ? "" : jspb.Message.getField(this, 2));
};


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


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


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


/**
 * optional string start_date = 3;
 * @return {string}
 */
proto.transit_realtime.TripDescriptor.prototype.getStartDate = function() {
  return /** @type {string} */ (!this.hasStartDate() ? "" : jspb.Message.getField(this, 3));
};


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


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


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


/**
 * optional ScheduleRelationship schedule_relationship = 4;
 * @return {proto.transit_realtime.TripDescriptor.ScheduleRelationship}
 */
proto.transit_realtime.TripDescriptor.prototype.getScheduleRelationship = function() {
  return /** @type {proto.transit_realtime.TripDescriptor.ScheduleRelationship} */ (!this.hasScheduleRelationship() ? 0 : jspb.Message.getField(this, 4));
};


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


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


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

/**
 * @enum {number}
 */
proto.transit_realtime.TripDescriptor.ScheduleRelationship = {
  SCHEDULED: 0,
  ADDED: 1,
  UNSCHEDULED: 2,
  CANCELED: 3,
  REPLACEMENT: 5,
  DUPLICATED: 6
};

