1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- # Generated by the protocol buffer compiler. DO NOT EDIT!
- # source: protos/ydb_cms.proto
- namespace Ydb\Cms\GetDatabaseStatusResult;
- use UnexpectedValueException;
- /**
- * Protobuf type <code>Ydb.Cms.GetDatabaseStatusResult.State</code>
- */
- class State
- {
- /**
- * Generated from protobuf enum <code>STATE_UNSPECIFIED = 0;</code>
- */
- const STATE_UNSPECIFIED = 0;
- /**
- * Generated from protobuf enum <code>CREATING = 1;</code>
- */
- const CREATING = 1;
- /**
- * Generated from protobuf enum <code>RUNNING = 2;</code>
- */
- const RUNNING = 2;
- /**
- * Generated from protobuf enum <code>REMOVING = 3;</code>
- */
- const REMOVING = 3;
- /**
- * Generated from protobuf enum <code>PENDING_RESOURCES = 4;</code>
- */
- const PENDING_RESOURCES = 4;
- /**
- * Generated from protobuf enum <code>CONFIGURING = 5;</code>
- */
- const CONFIGURING = 5;
- private static $valueToName = [
- self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED',
- self::CREATING => 'CREATING',
- self::RUNNING => 'RUNNING',
- self::REMOVING => 'REMOVING',
- self::PENDING_RESOURCES => 'PENDING_RESOURCES',
- self::CONFIGURING => 'CONFIGURING',
- ];
- 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(State::class, \Ydb\Cms\GetDatabaseStatusResult_State::class);
|