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

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

goog.require('jspb.Message');
goog.require('proto.transit_realtime.FeedEntity');
goog.require('proto.transit_realtime.FeedHeader');


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



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.FeedMessage.prototype.toObject = function(opt_includeInstance) {
  return proto.transit_realtime.FeedMessage.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.FeedMessage} msg The msg instance to transform.
 * @return {!Object}
 */
proto.transit_realtime.FeedMessage.toObject = function(includeInstance, msg) {
  var f, obj = {
    header: (f = msg.getHeader()) && proto.transit_realtime.FeedHeader.toObject(includeInstance, f),
    entityList: jspb.Message.toObjectList(msg.getEntityList(),
    proto.transit_realtime.FeedEntity.toObject, includeInstance)
  };

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


/**
 * required FeedHeader header = 1;
 * @return {!proto.transit_realtime.FeedHeader}
 */
proto.transit_realtime.FeedMessage.prototype.getHeader = function() {
  return /** @type{!proto.transit_realtime.FeedHeader} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.FeedHeader, 1, 1));
};


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


proto.transit_realtime.FeedMessage.prototype.clearHeader = function() {
  this.setHeader(undefined);
};


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


/**
 * repeated FeedEntity entity = 2;
 * 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.FeedEntity>}
 */
proto.transit_realtime.FeedMessage.prototype.getEntityList = function() {
  return /** @type{!Array.<!proto.transit_realtime.FeedEntity>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.FeedEntity, 2));
};


/** @param {Array.<!proto.transit_realtime.FeedEntity>} value  */
proto.transit_realtime.FeedMessage.prototype.setEntityList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 2, value);
};


proto.transit_realtime.FeedMessage.prototype.clearEntityList = function() {
  this.setEntityList([]);
};



/**
 * 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.FeedMessage.extensions = {};

