blob: 6f876cc0fe9d3ca653c922e0bdc0454bd9d2defe [file] [log] [blame]
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proto/gtfs.proto
namespace Gtfs\StopTime;
use UnexpectedValueException;
/**
* Protobuf type <code>gtfs.StopTime.AvailabilityType</code>
*/
class AvailabilityType
{
/**
* Tram, Streetcar, Light rail. Any light rail or street level system within a metropolitan area.
*
* Generated from protobuf enum <code>REGULAR = 0;</code>
*/
const REGULAR = 0;
/**
* Subway, Metro. Any underground rail system within a metropolitan area.
*
* Generated from protobuf enum <code>NOT_AVAILABLE = 1;</code>
*/
const NOT_AVAILABLE = 1;
/**
* Rail. Used for intercity or long-distance travel.
*
* Generated from protobuf enum <code>PHONE = 2;</code>
*/
const PHONE = 2;
/**
* Bus. Used for short- and long-distance bus routes.
*
* Generated from protobuf enum <code>DRIVER = 3;</code>
*/
const DRIVER = 3;
private static $valueToName = [
self::REGULAR => 'REGULAR',
self::NOT_AVAILABLE => 'NOT_AVAILABLE',
self::PHONE => 'PHONE',
self::DRIVER => 'DRIVER',
];
public static function name($value)
{
if (!isset(self::$valueToName[$value])) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no name defined for value %s', __CLASS__, $value));
}
return self::$valueToName[$value];
}
public static function value($name)
{
$const = __CLASS__ . '::' . strtoupper($name);
if (!defined($const)) {
throw new UnexpectedValueException(sprintf(
'Enum %s has no value defined for name %s', __CLASS__, $name));
}
return constant($const);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(AvailabilityType::class, \Gtfs\StopTime_AvailabilityType::class);