<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/aiplatform/v1/tuning_job.proto

namespace Google\Cloud\AIPlatform\V1\SupervisedHyperParameters;

use UnexpectedValueException;

/**
 * Supported adapter sizes for tuning.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.SupervisedHyperParameters.AdapterSize</code>
 */
class AdapterSize
{
    /**
     * Adapter size is unspecified.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_UNSPECIFIED = 0;</code>
     */
    const ADAPTER_SIZE_UNSPECIFIED = 0;
    /**
     * Adapter size 1.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_ONE = 1;</code>
     */
    const ADAPTER_SIZE_ONE = 1;
    /**
     * Adapter size 2.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_TWO = 6;</code>
     */
    const ADAPTER_SIZE_TWO = 6;
    /**
     * Adapter size 4.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_FOUR = 2;</code>
     */
    const ADAPTER_SIZE_FOUR = 2;
    /**
     * Adapter size 8.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_EIGHT = 3;</code>
     */
    const ADAPTER_SIZE_EIGHT = 3;
    /**
     * Adapter size 16.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_SIXTEEN = 4;</code>
     */
    const ADAPTER_SIZE_SIXTEEN = 4;
    /**
     * Adapter size 32.
     *
     * Generated from protobuf enum <code>ADAPTER_SIZE_THIRTY_TWO = 5;</code>
     */
    const ADAPTER_SIZE_THIRTY_TWO = 5;

    private static $valueToName = [
        self::ADAPTER_SIZE_UNSPECIFIED => 'ADAPTER_SIZE_UNSPECIFIED',
        self::ADAPTER_SIZE_ONE => 'ADAPTER_SIZE_ONE',
        self::ADAPTER_SIZE_TWO => 'ADAPTER_SIZE_TWO',
        self::ADAPTER_SIZE_FOUR => 'ADAPTER_SIZE_FOUR',
        self::ADAPTER_SIZE_EIGHT => 'ADAPTER_SIZE_EIGHT',
        self::ADAPTER_SIZE_SIXTEEN => 'ADAPTER_SIZE_SIXTEEN',
        self::ADAPTER_SIZE_THIRTY_TWO => 'ADAPTER_SIZE_THIRTY_TWO',
    ];

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


