<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/api/cloudquotas/v1beta/quota_adjuster_settings.proto

namespace Google\Cloud\CloudQuotas\V1beta\QuotaAdjusterSettings;

use UnexpectedValueException;

/**
 * The enablement status of the quota adjuster.
 *
 * Protobuf type <code>google.api.cloudquotas.v1beta.QuotaAdjusterSettings.Enablement</code>
 */
class Enablement
{
    /**
     * The quota adjuster is in an unknown state.
     *
     * Generated from protobuf enum <code>ENABLEMENT_UNSPECIFIED = 0;</code>
     */
    const ENABLEMENT_UNSPECIFIED = 0;
    /**
     * The quota adjuster is enabled.
     *
     * Generated from protobuf enum <code>ENABLED = 2;</code>
     */
    const ENABLED = 2;
    /**
     * The quota adjuster is disabled.
     *
     * Generated from protobuf enum <code>DISABLED = 3;</code>
     */
    const DISABLED = 3;

    private static $valueToName = [
        self::ENABLEMENT_UNSPECIFIED => 'ENABLEMENT_UNSPECIFIED',
        self::ENABLED => 'ENABLED',
        self::DISABLED => 'DISABLED',
    ];

    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);
    }
}


