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

namespace Google\Cloud\AIPlatform\V1\Model;

use UnexpectedValueException;

/**
 * Identifies a type of Model's prediction resources.
 *
 * Protobuf type <code>google.cloud.aiplatform.v1.Model.DeploymentResourcesType</code>
 */
class DeploymentResourcesType
{
    /**
     * Should not be used.
     *
     * Generated from protobuf enum <code>DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0;</code>
     */
    const DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0;
    /**
     * Resources that are dedicated to the
     * [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], and that need
     * a higher degree of manual configuration.
     *
     * Generated from protobuf enum <code>DEDICATED_RESOURCES = 1;</code>
     */
    const DEDICATED_RESOURCES = 1;
    /**
     * Resources that to large degree are decided by Vertex AI, and require
     * only a modest additional configuration.
     *
     * Generated from protobuf enum <code>AUTOMATIC_RESOURCES = 2;</code>
     */
    const AUTOMATIC_RESOURCES = 2;
    /**
     * Resources that can be shared by multiple
     * [DeployedModels][google.cloud.aiplatform.v1.DeployedModel]. A
     * pre-configured
     * [DeploymentResourcePool][google.cloud.aiplatform.v1.DeploymentResourcePool]
     * is required.
     *
     * Generated from protobuf enum <code>SHARED_RESOURCES = 3;</code>
     */
    const SHARED_RESOURCES = 3;

    private static $valueToName = [
        self::DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED => 'DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED',
        self::DEDICATED_RESOURCES => 'DEDICATED_RESOURCES',
        self::AUTOMATIC_RESOURCES => 'AUTOMATIC_RESOURCES',
        self::SHARED_RESOURCES => 'SHARED_RESOURCES',
    ];

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


