1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # NO CHECKED-IN PROTOBUF GENCODE
- # source: api/EntOrder.proto
- namespace Proto\Api;
- use UnexpectedValueException;
- /**
- * 设备租赁来源/类型
- *
- * Protobuf type <code>proto.api.DEVICE_HIRE_SOURCE</code>
- */
- class DEVICE_HIRE_SOURCE
- {
- /**
- * 保留
- *
- * Generated from protobuf enum <code>DEVICE_HIRE_SOURCE_RESERVED = 0;</code>
- */
- const DEVICE_HIRE_SOURCE_RESERVED = 0;
- /**
- * 门店
- *
- * Generated from protobuf enum <code>DEVICE_HIRE_SOURCE_SHOP = 1;</code>
- */
- const DEVICE_HIRE_SOURCE_SHOP = 1;
- /**
- * 换电柜
- *
- * Generated from protobuf enum <code>DEVICE_HIRE_SOURCE_CABINET = 2;</code>
- */
- const DEVICE_HIRE_SOURCE_CABINET = 2;
- /**
- * 手动绑定
- *
- * Generated from protobuf enum <code>DEVICE_HIRE_SOURCE_BIND = 3;</code>
- */
- const DEVICE_HIRE_SOURCE_BIND = 3;
- /**
- * IC卡
- *
- * Generated from protobuf enum <code>DEVICE_HIRE_SOURCE_IC = 4;</code>
- */
- const DEVICE_HIRE_SOURCE_IC = 4;
- /**
- * 充电柜
- *
- * Generated from protobuf enum <code>DEVICE_HIRE_SOURCE_CHARGE = 5;</code>
- */
- const DEVICE_HIRE_SOURCE_CHARGE = 5;
- private static $valueToName = [
- self::DEVICE_HIRE_SOURCE_RESERVED => 'DEVICE_HIRE_SOURCE_RESERVED',
- self::DEVICE_HIRE_SOURCE_SHOP => 'DEVICE_HIRE_SOURCE_SHOP',
- self::DEVICE_HIRE_SOURCE_CABINET => 'DEVICE_HIRE_SOURCE_CABINET',
- self::DEVICE_HIRE_SOURCE_BIND => 'DEVICE_HIRE_SOURCE_BIND',
- self::DEVICE_HIRE_SOURCE_IC => 'DEVICE_HIRE_SOURCE_IC',
- self::DEVICE_HIRE_SOURCE_CHARGE => 'DEVICE_HIRE_SOURCE_CHARGE',
- ];
- 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);
- }
- }
|