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

namespace Google\Cloud\CloudDms\V1\CloudSqlSettings;

use UnexpectedValueException;

/**
 * The storage options for Cloud SQL databases.
 *
 * Protobuf type <code>google.cloud.clouddms.v1.CloudSqlSettings.SqlDataDiskType</code>
 */
class SqlDataDiskType
{
    /**
     * Unspecified.
     *
     * Generated from protobuf enum <code>SQL_DATA_DISK_TYPE_UNSPECIFIED = 0;</code>
     */
    const SQL_DATA_DISK_TYPE_UNSPECIFIED = 0;
    /**
     * SSD disk.
     *
     * Generated from protobuf enum <code>PD_SSD = 1;</code>
     */
    const PD_SSD = 1;
    /**
     * HDD disk.
     *
     * Generated from protobuf enum <code>PD_HDD = 2;</code>
     */
    const PD_HDD = 2;

    private static $valueToName = [
        self::SQL_DATA_DISK_TYPE_UNSPECIFIED => 'SQL_DATA_DISK_TYPE_UNSPECIFIED',
        self::PD_SSD => 'PD_SSD',
        self::PD_HDD => 'PD_HDD',
    ];

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

