Ydb.Coordination.RateLimiterCountersMode */ class RateLimiterCountersMode { /** * The default or current value * * Generated from protobuf enum RATE_LIMITER_COUNTERS_MODE_UNSET = 0; */ const RATE_LIMITER_COUNTERS_MODE_UNSET = 0; /** * Aggregated counters for resource tree * * Generated from protobuf enum RATE_LIMITER_COUNTERS_MODE_AGGREGATED = 1; */ const RATE_LIMITER_COUNTERS_MODE_AGGREGATED = 1; /** * Counters on every resource * * Generated from protobuf enum RATE_LIMITER_COUNTERS_MODE_DETAILED = 2; */ const RATE_LIMITER_COUNTERS_MODE_DETAILED = 2; private static $valueToName = [ self::RATE_LIMITER_COUNTERS_MODE_UNSET => 'RATE_LIMITER_COUNTERS_MODE_UNSET', self::RATE_LIMITER_COUNTERS_MODE_AGGREGATED => 'RATE_LIMITER_COUNTERS_MODE_AGGREGATED', self::RATE_LIMITER_COUNTERS_MODE_DETAILED => 'RATE_LIMITER_COUNTERS_MODE_DETAILED', ]; 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); } }