--- a/lib/Protobuf-PHP/gtfs-realtime.php +++ b/lib/Protobuf-PHP/gtfs-realtime.php @@ -1,1 +1,3673 @@ - +<?php +// DO NOT EDIT! Generated by Protobuf-PHP protoc plugin @package_version@ +// cmd line php -f protoc-gen-php.php gtfs-realtime.proto -i ./ +// Source: gtfs-realtime.proto +// Date: 2011-08-23 07:08:46 + +// @@protoc_insertion_point(scope_file) + +namespace transit_realtime { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime) + + class FeedMessage extends \DrSlump\Protobuf\Message { + + /** @var \Closure[] */ + protected static $__extensions = array(); + + public static function descriptor() + { + $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'transit_realtime.FeedMessage'); + + // required .transit_realtime.FeedHeader header = 1 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 1; + $f->name = "header"; + $f->type = 11; + $f->rule = 2; + $f->reference = '\transit_realtime\FeedHeader'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedMessage:header) + $descriptor->addField($f); + + // repeated .transit_realtime.FeedEntity entity = 2 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 2; + $f->name = "entity"; + $f->type = 11; + $f->rule = 3; + $f->reference = '\transit_realtime\FeedEntity'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedMessage:entity) + $descriptor->addField($f); + + foreach (self::$__extensions as $cb) { + $descriptor->addField($cb(), true); + } + + // @@protoc_insertion_point(scope_descriptor) + // @@protoc_insertion_point(descriptor_transit_realtime.FeedMessage) + + return $descriptor; + } + + /** @var \transit_realtime\FeedHeader */ + public $header = null; + + /** @var \transit_realtime\FeedEntity[] */ + public $entity = array(); + + + /** + * Check if <header> has a value + * + * @return boolean + */ + public function hasHeader(){ + return $this->_has(1); + } + + /** + * Clear <header> value + * + * @return \transit_realtime\FeedMessage + */ + public function clearHeader(){ + return $this->_clear(1); + } + + /** + * Get <header> value + * + * @return \transit_realtime\FeedHeader + */ + public function getHeader(){ + return $this->_get(1); + } + + /** + * Set <header> value + * + * @param \transit_realtime\FeedHeader $value + * @return \transit_realtime\FeedMessage + */ + public function setHeader(\transit_realtime\FeedHeader $value){ + return $this->_set(1, $value); + } + + /** + * Check if <entity> has a value + * + * @return boolean + */ + public function hasEntity(){ + return $this->_has(2); + } + + /** + * Clear <entity> value + * + * @return \transit_realtime\FeedMessage + */ + public function clearEntity(){ + return $this->_clear(2); + } + + /** + * Get <entity> value + * + * @param int $idx + * @return \transit_realtime\FeedEntity + */ + public function getEntity($idx = NULL){ + return $this->_get(2, $idx); + } + + /** + * Set <entity> value + * + * @param \transit_realtime\FeedEntity $value + * @return \transit_realtime\FeedMessage + */ + public function setEntity(\transit_realtime\FeedEntity $value, $idx = NULL){ + return $this->_set(2, $value, $idx); + } + + /** + * Get all elements of <entity> + * + * @return \transit_realtime\FeedEntity[] + */ + public function getEntityList(){ + return $this->_get(2); + } + + /** + * Add a new element to <entity> + * + * @param \transit_realtime\FeedEntity $value + * @return \transit_realtime\FeedMessage + */ + public function addEntity(\transit_realtime\FeedEntity $value){ + return $this->_add(2, $value); + } + + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_transit_realtime.FeedMessage) + } +} + +namespace transit_realtime\FeedHeader { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime.FeedHeader) + + class Incrementality { + const FULL_DATASET = 0; + const DIFFERENTIAL = 1; + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_transit_realtime.FeedHeader.Incrementality) + } +} +namespace transit_realtime { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime) + + class FeedHeader extends \DrSlump\Protobuf\Message { + + /** @var \Closure[] */ + protected static $__extensions = array(); + + public static function descriptor() + { + $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'transit_realtime.FeedHeader'); + + // required gtfs_realtime_version = 1 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 1; + $f->name = "gtfs_realtime_version"; + $f->type = 9; + $f->rule = 2; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedHeader:gtfs_realtime_version) + $descriptor->addField($f); + + // optional .transit_realtime.FeedHeader.Incrementality incrementality = 2 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 2; + $f->name = "incrementality"; + $f->type = 14; + $f->rule = 1; + $f->reference = '\transit_realtime\FeedHeader\Incrementality'; + $f->default = \transit_realtime\FeedHeader\Incrementality::FULL_DATASET; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedHeader:incrementality) + $descriptor->addField($f); + + // optional timestamp = 3 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 3; + $f->name = "timestamp"; + $f->type = 4; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedHeader:timestamp) + $descriptor->addField($f); + + foreach (self::$__extensions as $cb) { + $descriptor->addField($cb(), true); + } + + // @@protoc_insertion_point(scope_descriptor) + // @@protoc_insertion_point(descriptor_transit_realtime.FeedHeader) + + return $descriptor; + } + + /** @var string */ + public $gtfs_realtime_version = null; + + /** @var int - \transit_realtime\FeedHeader\Incrementality */ + public $incrementality = \transit_realtime\FeedHeader\Incrementality::FULL_DATASET; + + /** @var int */ + public $timestamp = null; + + + /** + * Check if <gtfs_realtime_version> has a value + * + * @return boolean + */ + public function hasGtfsRealtimeVersion(){ + return $this->_has(1); + } + + /** + * Clear <gtfs_realtime_version> value + * + * @return \transit_realtime\FeedHeader + */ + public function clearGtfsRealtimeVersion(){ + return $this->_clear(1); + } + + /** + * Get <gtfs_realtime_version> value + * + * @return string + */ + public function getGtfsRealtimeVersion(){ + return $this->_get(1); + } + + /** + * Set <gtfs_realtime_version> value + * + * @param string $value + * @return \transit_realtime\FeedHeader + */ + public function setGtfsRealtimeVersion( $value){ + return $this->_set(1, $value); + } + + /** + * Check if <incrementality> has a value + * + * @return boolean + */ + public function hasIncrementality(){ + return $this->_has(2); + } + + /** + * Clear <incrementality> value + * + * @return \transit_realtime\FeedHeader + */ + public function clearIncrementality(){ + return $this->_clear(2); + } + + /** + * Get <incrementality> value + * + * @return int - \transit_realtime\FeedHeader\Incrementality + */ + public function getIncrementality(){ + return $this->_get(2); + } + + /** + * Set <incrementality> value + * + * @param int - \transit_realtime\FeedHeader\Incrementality $value + * @return \transit_realtime\FeedHeader + */ + public function setIncrementality( $value){ + return $this->_set(2, $value); + } + + /** + * Check if <timestamp> has a value + * + * @return boolean + */ + public function hasTimestamp(){ + return $this->_has(3); + } + + /** + * Clear <timestamp> value + * + * @return \transit_realtime\FeedHeader + */ + public function clearTimestamp(){ + return $this->_clear(3); + } + + /** + * Get <timestamp> value + * + * @return int + */ + public function getTimestamp(){ + return $this->_get(3); + } + + /** + * Set <timestamp> value + * + * @param int $value + * @return \transit_realtime\FeedHeader + */ + public function setTimestamp( $value){ + return $this->_set(3, $value); + } + + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_transit_realtime.FeedHeader) + } +} + +namespace transit_realtime { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime) + + class FeedEntity extends \DrSlump\Protobuf\Message { + + /** @var \Closure[] */ + protected static $__extensions = array(); + + public static function descriptor() + { + $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'transit_realtime.FeedEntity'); + + // required id = 1 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 1; + $f->name = "id"; + $f->type = 9; + $f->rule = 2; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedEntity:id) + $descriptor->addField($f); + + // optional is_deleted = 2 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 2; + $f->name = "is_deleted"; + $f->type = 8; + $f->rule = 1; + $f->default = false; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedEntity:is_deleted) + $descriptor->addField($f); + + // optional .transit_realtime.TripUpdate trip_update = 3 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 3; + $f->name = "trip_update"; + $f->type = 11; + $f->rule = 1; + $f->reference = '\transit_realtime\TripUpdate'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedEntity:trip_update) + $descriptor->addField($f); + + // optional .transit_realtime.VehiclePosition vehicle = 4 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 4; + $f->name = "vehicle"; + $f->type = 11; + $f->rule = 1; + $f->reference = '\transit_realtime\VehiclePosition'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedEntity:vehicle) + $descriptor->addField($f); + + // optional .transit_realtime.Alert alert = 5 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 5; + $f->name = "alert"; + $f->type = 11; + $f->rule = 1; + $f->reference = '\transit_realtime\Alert'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.FeedEntity:alert) + $descriptor->addField($f); + + foreach (self::$__extensions as $cb) { + $descriptor->addField($cb(), true); + } + + // @@protoc_insertion_point(scope_descriptor) + // @@protoc_insertion_point(descriptor_transit_realtime.FeedEntity) + + return $descriptor; + } + + /** @var string */ + public $id = null; + + /** @var boolean */ + public $is_deleted = true; + + /** @var \transit_realtime\TripUpdate */ + public $trip_update = null; + + /** @var \transit_realtime\VehiclePosition */ + public $vehicle = null; + + /** @var \transit_realtime\Alert */ + public $alert = null; + + + /** + * Check if <id> has a value + * + * @return boolean + */ + public function hasId(){ + return $this->_has(1); + } + + /** + * Clear <id> value + * + * @return \transit_realtime\FeedEntity + */ + public function clearId(){ + return $this->_clear(1); + } + + /** + * Get <id> value + * + * @return string + */ + public function getId(){ + return $this->_get(1); + } + + /** + * Set <id> value + * + * @param string $value + * @return \transit_realtime\FeedEntity + */ + public function setId( $value){ + return $this->_set(1, $value); + } + + /** + * Check if <is_deleted> has a value + * + * @return boolean + */ + public function hasIsDeleted(){ + return $this->_has(2); + } + + /** + * Clear <is_deleted> value + * + * @return \transit_realtime\FeedEntity + */ + public function clearIsDeleted(){ + return $this->_clear(2); + } + + /** + * Get <is_deleted> value + * + * @return boolean + */ + public function getIsDeleted(){ + return $this->_get(2); + } + + /** + * Set <is_deleted> value + * + * @param boolean $value + * @return \transit_realtime\FeedEntity + */ + public function setIsDeleted( $value){ + return $this->_set(2, $value); + } + + /** + * Check if <trip_update> has a value + * + * @return boolean + */ + public function hasTripUpdate(){ + return $this->_has(3); + } + + /** + * Clear <trip_update> value + * + * @return \transit_realtime\FeedEntity + */ + public function clearTripUpdate(){ + return $this->_clear(3); + } + + /** + * Get <trip_update> value + * + * @return \transit_realtime\TripUpdate + */ + public function getTripUpdate(){ + return $this->_get(3); + } + + /** + * Set <trip_update> value + * + * @param \transit_realtime\TripUpdate $value + * @return \transit_realtime\FeedEntity + */ + public function setTripUpdate(\transit_realtime\TripUpdate $value){ + return $this->_set(3, $value); + } + + /** + * Check if <vehicle> has a value + * + * @return boolean + */ + public function hasVehicle(){ + return $this->_has(4); + } + + /** + * Clear <vehicle> value + * + * @return \transit_realtime\FeedEntity + */ + public function clearVehicle(){ + return $this->_clear(4); + } + + /** + * Get <vehicle> value + * + * @return \transit_realtime\VehiclePosition + */ + public function getVehicle(){ + return $this->_get(4); + } + + /** + * Set <vehicle> value + * + * @param \transit_realtime\VehiclePosition $value + * @return \transit_realtime\FeedEntity + */ + public function setVehicle(\transit_realtime\VehiclePosition $value){ + return $this->_set(4, $value); + } + + /** + * Check if <alert> has a value + * + * @return boolean + */ + public function hasAlert(){ + return $this->_has(5); + } + + /** + * Clear <alert> value + * + * @return \transit_realtime\FeedEntity + */ + public function clearAlert(){ + return $this->_clear(5); + } + + /** + * Get <alert> value + * + * @return \transit_realtime\Alert + */ + public function getAlert(){ + return $this->_get(5); + } + + /** + * Set <alert> value + * + * @param \transit_realtime\Alert $value + * @return \transit_realtime\FeedEntity + */ + public function setAlert(\transit_realtime\Alert $value){ + return $this->_set(5, $value); + } + + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_transit_realtime.FeedEntity) + } +} + +namespace transit_realtime\TripUpdate { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime.TripUpdate) + + class StopTimeEvent extends \DrSlump\Protobuf\Message { + + /** @var \Closure[] */ + protected static $__extensions = array(); + + public static function descriptor() + { + $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'transit_realtime.TripUpdate.StopTimeEvent'); + + // optional delay = 1 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 1; + $f->name = "delay"; + $f->type = 5; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeEvent:delay) + $descriptor->addField($f); + + // optional time = 2 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 2; + $f->name = "time"; + $f->type = 3; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeEvent:time) + $descriptor->addField($f); + + // optional uncertainty = 3 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 3; + $f->name = "uncertainty"; + $f->type = 5; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeEvent:uncertainty) + $descriptor->addField($f); + + foreach (self::$__extensions as $cb) { + $descriptor->addField($cb(), true); + } + + // @@protoc_insertion_point(scope_descriptor) + // @@protoc_insertion_point(descriptor_transit_realtime.TripUpdate.StopTimeEvent) + + return $descriptor; + } + + /** @var int */ + public $delay = null; + + /** @var int */ + public $time = null; + + /** @var int */ + public $uncertainty = null; + + + /** + * Check if <delay> has a value + * + * @return boolean + */ + public function hasDelay(){ + return $this->_has(1); + } + + /** + * Clear <delay> value + * + * @return \transit_realtime\TripUpdate\StopTimeEvent + */ + public function clearDelay(){ + return $this->_clear(1); + } + + /** + * Get <delay> value + * + * @return int + */ + public function getDelay(){ + return $this->_get(1); + } + + /** + * Set <delay> value + * + * @param int $value + * @return \transit_realtime\TripUpdate\StopTimeEvent + */ + public function setDelay( $value){ + return $this->_set(1, $value); + } + + /** + * Check if <time> has a value + * + * @return boolean + */ + public function hasTime(){ + return $this->_has(2); + } + + /** + * Clear <time> value + * + * @return \transit_realtime\TripUpdate\StopTimeEvent + */ + public function clearTime(){ + return $this->_clear(2); + } + + /** + * Get <time> value + * + * @return int + */ + public function getTime(){ + return $this->_get(2); + } + + /** + * Set <time> value + * + * @param int $value + * @return \transit_realtime\TripUpdate\StopTimeEvent + */ + public function setTime( $value){ + return $this->_set(2, $value); + } + + /** + * Check if <uncertainty> has a value + * + * @return boolean + */ + public function hasUncertainty(){ + return $this->_has(3); + } + + /** + * Clear <uncertainty> value + * + * @return \transit_realtime\TripUpdate\StopTimeEvent + */ + public function clearUncertainty(){ + return $this->_clear(3); + } + + /** + * Get <uncertainty> value + * + * @return int + */ + public function getUncertainty(){ + return $this->_get(3); + } + + /** + * Set <uncertainty> value + * + * @param int $value + * @return \transit_realtime\TripUpdate\StopTimeEvent + */ + public function setUncertainty( $value){ + return $this->_set(3, $value); + } + + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_transit_realtime.TripUpdate.StopTimeEvent) + } +} + +namespace transit_realtime\TripUpdate\StopTimeUpdate { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime.TripUpdate.StopTimeUpdate) + + class ScheduleRelationship { + const SCHEDULED = 0; + const SKIPPED = 1; + const NO_DATA = 2; + + // @@protoc_insertion_point(scope_class) + // @@protoc_insertion_point(class_transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship) + } +} +namespace transit_realtime\TripUpdate { + + // @@protoc_insertion_point(scope_namespace) + // @@protoc_insertion_point(namespace_transit_realtime.TripUpdate) + + class StopTimeUpdate extends \DrSlump\Protobuf\Message { + + /** @var \Closure[] */ + protected static $__extensions = array(); + + public static function descriptor() + { + $descriptor = new \DrSlump\Protobuf\Descriptor(__CLASS__, 'transit_realtime.TripUpdate.StopTimeUpdate'); + + // optional stop_sequence = 1 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 1; + $f->name = "stop_sequence"; + $f->type = 13; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeUpdate:stop_sequence) + $descriptor->addField($f); + + // optional stop_id = 4 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 4; + $f->name = "stop_id"; + $f->type = 9; + $f->rule = 1; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeUpdate:stop_id) + $descriptor->addField($f); + + // optional .transit_realtime.TripUpdate.StopTimeEvent arrival = 2 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 2; + $f->name = "arrival"; + $f->type = 11; + $f->rule = 1; + $f->reference = '\transit_realtime\TripUpdate\StopTimeEvent'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeUpdate:arrival) + $descriptor->addField($f); + + // optional .transit_realtime.TripUpdate.StopTimeEvent departure = 3 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 3; + $f->name = "departure"; + $f->type = 11; + $f->rule = 1; + $f->reference = '\transit_realtime\TripUpdate\StopTimeEvent'; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeUpdate:departure) + $descriptor->addField($f); + + // optional .transit_realtime.TripUpdate.StopTimeUpdate.ScheduleRelationship schedule_relationship = 5 + $f = new \DrSlump\Protobuf\Field(); + $f->number = 5; + $f->name = "schedule_relationship"; + $f->type = 14; + $f->rule = 1; + $f->reference = '\transit_realtime\TripUpdate\StopTimeUpdate\ScheduleRelationship'; + $f->default = \transit_realtime\TripUpdate\StopTimeUpdate\ScheduleRelationship::SCHEDULED; + // @@protoc_insertion_point(scope_field) + // @@protoc_insertion_point(field_transit_realtime.TripUpdate.StopTimeUpdate:schedule_relationship) + $descriptor->addField($f); + + foreach (self::$__extensions as $cb) { + $descriptor->addField($cb(), true); + } + + // @@protoc_insertion_point(scope_descriptor) + // @@protoc_insertion_point(descriptor_transit_realtime.TripUpdate.StopTimeUpdate) + + return $descriptor; + } + + /** @var int */ + public $stop_sequence = null; + + /** @var string */ + public $stop_id = null; + + /** @var \transit_realtime\TripUpdate\StopTimeEvent */ + public $arrival = null; + + /** @var \transit_realtime\TripUpdate\StopTimeEvent */ + public $departure = null; + + /** @var int - \transit_realtime\TripUpdate\StopTimeUpdate\ScheduleRelationship */ + public $schedule_relationship = \transit_realtime\TripUpdate\StopTimeUpdate\ScheduleRelationship::SCHEDULED; + + + /** + * Check if <stop_sequence> has a value + * + * @return boolean + */ + public function hasStopSequence(){ + return $this->_has(1); + } + + /** + * Clear <stop_sequence> value + * + * @return \transit_realtime\TripUpdate\StopTimeUpdate + */ + public function clearStopSequence(){ + return $this->_clear(1); + } + + /** + * Get <stop_sequence> value + * + * @return int + */ + public function getStopSequence(){ + return $this->_get(1); + } + + /** + * Set <stop_sequence> value + * + * @param int $value + * @return \transit_realtime\TripUpdate\StopTimeUpdate + */ + public function setStopSequence( $value){ + return $this->_set(1, $value); + } + + /** + * Check if <stop_id> has a value + * + * @return boolean + */ + public function hasStopId(){ + return $this->_has(4); + } + + /** + * Clear <stop_id> value + * + * @return \transit_realtime\TripUpdate\StopTimeUpdate + */ + public function clearStopId(){ + return $this->_clear(4); + } + + /** + * Get <stop_id> value + * + * @return string + */ + public function getStopId(){ + return $this->_get(4); + } + + /** + * Set <stop_id> value + * + * @param string $value + * @return \transit_realtime\TripUpdate\StopTimeUpdate + */ + public function setStopId( $value){ + return $this->_set(4, $value); + } + + /** + * Check if <arrival> has a value + * + * @return boolean + */ + public function hasArrival(){ + return $this->_has(2); + } + + /** + * Clear <arrival> value