1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_export.proto
- namespace Ydb\Export\ExportProgress;
- use UnexpectedValueException;
- /**
- * Protobuf type <code>Ydb.Export.ExportProgress.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_DONE = 3;</code>
- */
- const PROGRESS_DONE = 3;
- /**
- * Generated from protobuf enum <code>PROGRESS_CANCELLATION = 4;</code>
- */
- const PROGRESS_CANCELLATION = 4;
- /**
- * Generated from protobuf enum <code>PROGRESS_CANCELLED = 5;</code>
- */
- const PROGRESS_CANCELLED = 5;
- private static $valueToName = [
- self::PROGRESS_UNSPECIFIED => 'PROGRESS_UNSPECIFIED',
- self::PROGRESS_PREPARING => 'PROGRESS_PREPARING',
- self::PROGRESS_TRANSFER_DATA => 'PROGRESS_TRANSFER_DATA',
- 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\Export\ExportProgress_Progress::class);
|