12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_import.proto
- namespace Ydb\Import\ImportProgress;
- use UnexpectedValueException;
- /**
- * Protobuf type <code>Ydb.Import.ImportProgress.Progress</code>
- */
- class Progress
- {
- /**
- * Generated from protobuf enum <code>PROGRESS_UNSPECIFIED = 0;</code>
- */
- const PROGRESS_UNSPECIFIED = 0;
- /**
- * Generated from protobuf enum <code>PROGRESS_PREPARING = 1;</code>
- */
- const PROGRESS_PREPARING = 1;
- /**
- * Generated from protobuf enum <code>PROGRESS_TRANSFER_DATA = 2;</code>
- */
- const PROGRESS_TRANSFER_DATA = 2;
- /**
- * Generated from protobuf enum <code>PROGRESS_BUILD_INDEXES = 3;</code>
- */
- const PROGRESS_BUILD_INDEXES = 3;
- /**
- * Generated from protobuf enum <code>PROGRESS_DONE = 4;</code>
- */
- const PROGRESS_DONE = 4;
- /**
- * Generated from protobuf enum <code>PROGRESS_CANCELLATION = 5;</code>
- */
- const PROGRESS_CANCELLATION = 5;
- /**
- * Generated from protobuf enum <code>PROGRESS_CANCELLED = 6;</code>
- */
- const PROGRESS_CANCELLED = 6;
- private static $valueToName = [
- self::PROGRESS_UNSPECIFIED => 'PROGRESS_UNSPECIFIED',
- self::PROGRESS_PREPARING => 'PROGRESS_PREPARING',
- self::PROGRESS_TRANSFER_DATA => 'PROGRESS_TRANSFER_DATA',
- self::PROGRESS_BUILD_INDEXES => 'PROGRESS_BUILD_INDEXES',
- self::PROGRESS_DONE => 'PROGRESS_DONE',
- self::PROGRESS_CANCELLATION => 'PROGRESS_CANCELLATION',
- self::PROGRESS_CANCELLED => 'PROGRESS_CANCELLED',
- ];
- 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(Progress::class, \Ydb\Import\ImportProgress_Progress::class);
|