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

namespace Google\Cloud\Dlp\V2;

use UnexpectedValueException;

/**
 * How a resource is encrypted.
 *
 * Protobuf type <code>google.privacy.dlp.v2.EncryptionStatus</code>
 */
class EncryptionStatus
{
    /**
     * Unused.
     *
     * Generated from protobuf enum <code>ENCRYPTION_STATUS_UNSPECIFIED = 0;</code>
     */
    const ENCRYPTION_STATUS_UNSPECIFIED = 0;
    /**
     * Google manages server-side encryption keys on your behalf.
     *
     * Generated from protobuf enum <code>ENCRYPTION_GOOGLE_MANAGED = 1;</code>
     */
    const ENCRYPTION_GOOGLE_MANAGED = 1;
    /**
     * Customer provides the key.
     *
     * Generated from protobuf enum <code>ENCRYPTION_CUSTOMER_MANAGED = 2;</code>
     */
    const ENCRYPTION_CUSTOMER_MANAGED = 2;

    private static $valueToName = [
        self::ENCRYPTION_STATUS_UNSPECIFIED => 'ENCRYPTION_STATUS_UNSPECIFIED',
        self::ENCRYPTION_GOOGLE_MANAGED => 'ENCRYPTION_GOOGLE_MANAGED',
        self::ENCRYPTION_CUSTOMER_MANAGED => 'ENCRYPTION_CUSTOMER_MANAGED',
    ];

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

