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

namespace Google\Cloud\DataCatalog\V1\FeatureOnlineStoreSpec;

use UnexpectedValueException;

/**
 * Type of underlying storage type.
 *
 * Protobuf type <code>google.cloud.datacatalog.v1.FeatureOnlineStoreSpec.StorageType</code>
 */
class StorageType
{
    /**
     * Should not be used.
     *
     * Generated from protobuf enum <code>STORAGE_TYPE_UNSPECIFIED = 0;</code>
     */
    const STORAGE_TYPE_UNSPECIFIED = 0;
    /**
     * Underlsying storgae is Bigtable.
     *
     * Generated from protobuf enum <code>BIGTABLE = 1;</code>
     */
    const BIGTABLE = 1;
    /**
     * Underlying is optimized online server (Lightning).
     *
     * Generated from protobuf enum <code>OPTIMIZED = 2;</code>
     */
    const OPTIMIZED = 2;

    private static $valueToName = [
        self::STORAGE_TYPE_UNSPECIFIED => 'STORAGE_TYPE_UNSPECIFIED',
        self::BIGTABLE => 'BIGTABLE',
        self::OPTIMIZED => 'OPTIMIZED',
    ];

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


