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

goog.provide('proto.transit_realtime.Alert');
goog.provide('proto.transit_realtime.Alert.Cause');
goog.provide('proto.transit_realtime.Alert.Effect');
goog.provide('proto.transit_realtime.Alert.SeverityLevel');

goog.require('jspb.Message');
goog.require('proto.transit_realtime.EntitySelector');
goog.require('proto.transit_realtime.TimeRange');
goog.require('proto.transit_realtime.TranslatedString');


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



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.Alert.prototype.toObject = function(opt_includeInstance) {
  return proto.transit_realtime.Alert.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.Alert} msg The msg instance to transform.
 * @return {!Object}
 */
proto.transit_realtime.Alert.toObject = function(includeInstance, msg) {
  var f, obj = {
    activePeriodList: jspb.Message.toObjectList(msg.getActivePeriodList(),
    proto.transit_realtime.TimeRange.toObject, includeInstance),
    informedEntityList: jspb.Message.toObjectList(msg.getInformedEntityList(),
    proto.transit_realtime.EntitySelector.toObject, includeInstance),
    cause: !msg.hasCause() ? 1 : jspb.Message.getField(msg, 6),
    effect: !msg.hasEffect() ? 8 : jspb.Message.getField(msg, 7),
    url: (f = msg.getUrl()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
    headerText: (f = msg.getHeaderText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
    descriptionText: (f = msg.getDescriptionText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
    ttsHeaderText: (f = msg.getTtsHeaderText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
    ttsDescriptionText: (f = msg.getTtsDescriptionText()) && proto.transit_realtime.TranslatedString.toObject(includeInstance, f),
    severityLevel: !msg.hasSeverityLevel() ? 1 : jspb.Message.getField(msg, 14)
  };

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


/**
 * repeated TimeRange active_period = 1;
 * 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.TimeRange>}
 */
proto.transit_realtime.Alert.prototype.getActivePeriodList = function() {
  return /** @type{!Array.<!proto.transit_realtime.TimeRange>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.TimeRange, 1));
};


/** @param {Array.<!proto.transit_realtime.TimeRange>} value  */
proto.transit_realtime.Alert.prototype.setActivePeriodList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 1, value);
};


proto.transit_realtime.Alert.prototype.clearActivePeriodList = function() {
  this.setActivePeriodList([]);
};


/**
 * repeated EntitySelector informed_entity = 5;
 * 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.EntitySelector>}
 */
proto.transit_realtime.Alert.prototype.getInformedEntityList = function() {
  return /** @type{!Array.<!proto.transit_realtime.EntitySelector>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.transit_realtime.EntitySelector, 5));
};


/** @param {Array.<!proto.transit_realtime.EntitySelector>} value  */
proto.transit_realtime.Alert.prototype.setInformedEntityList = function(value) {
  jspb.Message.setRepeatedWrapperField(this, 5, value);
};


proto.transit_realtime.Alert.prototype.clearInformedEntityList = function() {
  this.setInformedEntityList([]);
};


/**
 * optional Cause cause = 6;
 * @return {proto.transit_realtime.Alert.Cause}
 */
proto.transit_realtime.Alert.prototype.getCause = function() {
  return /** @type {proto.transit_realtime.Alert.Cause} */ (!this.hasCause() ? 1 : jspb.Message.getField(this, 6));
};


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


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


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


/**
 * optional Effect effect = 7;
 * @return {proto.transit_realtime.Alert.Effect}
 */
proto.transit_realtime.Alert.prototype.getEffect = function() {
  return /** @type {proto.transit_realtime.Alert.Effect} */ (!this.hasEffect() ? 8 : jspb.Message.getField(this, 7));
};


/** @param {proto.transit_realtime.Alert.Effect|undefined} value  */
proto.transit_realtime.Alert.prototype.setEffect = function(value) {
  jspb.Message.setField(this, 7, value);
};


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


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


/**
 * optional TranslatedString url = 8;
 * @return {proto.transit_realtime.TranslatedString}
 */
proto.transit_realtime.Alert.prototype.getUrl = function() {
  return /** @type{proto.transit_realtime.TranslatedString} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 8));
};


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


proto.transit_realtime.Alert.prototype.clearUrl = function() {
  this.setUrl(undefined);
};


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


/**
 * optional TranslatedString header_text = 10;
 * @return {proto.transit_realtime.TranslatedString}
 */
proto.transit_realtime.Alert.prototype.getHeaderText = function() {
  return /** @type{proto.transit_realtime.TranslatedString} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 10));
};


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


proto.transit_realtime.Alert.prototype.clearHeaderText = function() {
  this.setHeaderText(undefined);
};


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


/**
 * optional TranslatedString description_text = 11;
 * @return {proto.transit_realtime.TranslatedString}
 */
proto.transit_realtime.Alert.prototype.getDescriptionText = function() {
  return /** @type{proto.transit_realtime.TranslatedString} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 11));
};


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


proto.transit_realtime.Alert.prototype.clearDescriptionText = function() {
  this.setDescriptionText(undefined);
};


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


/**
 * optional TranslatedString tts_header_text = 12;
 * @return {proto.transit_realtime.TranslatedString}
 */
proto.transit_realtime.Alert.prototype.getTtsHeaderText = function() {
  return /** @type{proto.transit_realtime.TranslatedString} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 12));
};


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


proto.transit_realtime.Alert.prototype.clearTtsHeaderText = function() {
  this.setTtsHeaderText(undefined);
};


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


/**
 * optional TranslatedString tts_description_text = 13;
 * @return {proto.transit_realtime.TranslatedString}
 */
proto.transit_realtime.Alert.prototype.getTtsDescriptionText = function() {
  return /** @type{proto.transit_realtime.TranslatedString} */ (
    jspb.Message.getWrapperField(this, proto.transit_realtime.TranslatedString, 13));
};


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


proto.transit_realtime.Alert.prototype.clearTtsDescriptionText = function() {
  this.setTtsDescriptionText(undefined);
};


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


/**
 * optional SeverityLevel severity_level = 14;
 * @return {proto.transit_realtime.Alert.SeverityLevel}
 */
proto.transit_realtime.Alert.prototype.getSeverityLevel = function() {
  return /** @type {proto.transit_realtime.Alert.SeverityLevel} */ (!this.hasSeverityLevel() ? 1 : jspb.Message.getField(this, 14));
};


/** @param {proto.transit_realtime.Alert.SeverityLevel|undefined} value  */
proto.transit_realtime.Alert.prototype.setSeverityLevel = function(value) {
  jspb.Message.setField(this, 14, value);
};


proto.transit_realtime.Alert.prototype.clearSeverityLevel = function() {
  jspb.Message.setField(this, 14, undefined);
};


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

/**
 * @enum {number}
 */
proto.transit_realtime.Alert.Cause = {
  UNKNOWN_CAUSE: 1,
  OTHER_CAUSE: 2,
  TECHNICAL_PROBLEM: 3,
  STRIKE: 4,
  DEMONSTRATION: 5,
  ACCIDENT: 6,
  HOLIDAY: 7,
  WEATHER: 8,
  MAINTENANCE: 9,
  CONSTRUCTION: 10,
  POLICE_ACTIVITY: 11,
  MEDICAL_EMERGENCY: 12
};

/**
 * @enum {number}
 */
proto.transit_realtime.Alert.Effect = {
  NO_SERVICE: 1,
  REDUCED_SERVICE: 2,
  SIGNIFICANT_DELAYS: 3,
  DETOUR: 4,
  ADDITIONAL_SERVICE: 5,
  MODIFIED_SERVICE: 6,
  OTHER_EFFECT: 7,
  UNKNOWN_EFFECT: 8,
  STOP_MOVED: 9,
  NO_EFFECT: 10,
  ACCESSIBILITY_ISSUE: 11
};

/**
 * @enum {number}
 */
proto.transit_realtime.Alert.SeverityLevel = {
  UNKNOWN_SEVERITY: 1,
  INFO: 2,
  WARNING: 3,
  SEVERE: 4
};

