<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2\Error;

use UnexpectedValueException;

/**
 * Additional information about the error.
 *
 * Protobuf type <code>google.privacy.dlp.v2.Error.ErrorExtraInfo</code>
 */
class ErrorExtraInfo
{
    /**
     * Unused.
     *
     * Generated from protobuf enum <code>ERROR_INFO_UNSPECIFIED = 0;</code>
     */
    const ERROR_INFO_UNSPECIFIED = 0;
    /**
     * Image scan is not available in the region.
     *
     * Generated from protobuf enum <code>IMAGE_SCAN_UNAVAILABLE_IN_REGION = 1;</code>
     */
    const IMAGE_SCAN_UNAVAILABLE_IN_REGION = 1;
    /**
     * File store cluster is not supported for profile generation.
     *
     * Generated from protobuf enum <code>FILE_STORE_CLUSTER_UNSUPPORTED = 2;</code>
     */
    const FILE_STORE_CLUSTER_UNSUPPORTED = 2;

    private static $valueToName = [
        self::ERROR_INFO_UNSPECIFIED => 'ERROR_INFO_UNSPECIFIED',
        self::IMAGE_SCAN_UNAVAILABLE_IN_REGION => 'IMAGE_SCAN_UNAVAILABLE_IN_REGION',
        self::FILE_STORE_CLUSTER_UNSUPPORTED => 'FILE_STORE_CLUSTER_UNSUPPORTED',
    ];

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

