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

namespace Google\Cloud\Container\V1\NodeConfig;

use UnexpectedValueException;

/**
 * LocalSsdEncryptionMode specifies the method used for encrypting the Local
 * SSDs attached to the node.
 *
 * Protobuf type <code>google.container.v1.NodeConfig.LocalSsdEncryptionMode</code>
 */
class LocalSsdEncryptionMode
{
    /**
     * The given node will be encrypted using keys managed by Google
     * infrastructure and the keys will be deleted when the node is
     * deleted.
     *
     * Generated from protobuf enum <code>LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0;</code>
     */
    const LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED = 0;
    /**
     * The given node will be encrypted using keys managed by Google
     * infrastructure and the keys will be deleted when the node is
     * deleted.
     *
     * Generated from protobuf enum <code>STANDARD_ENCRYPTION = 1;</code>
     */
    const STANDARD_ENCRYPTION = 1;
    /**
     * The given node will opt-in for using ephemeral key for
     * encryption of Local SSDs.
     * The Local SSDs will not be able to recover data in case of node
     * crash.
     *
     * Generated from protobuf enum <code>EPHEMERAL_KEY_ENCRYPTION = 2;</code>
     */
    const EPHEMERAL_KEY_ENCRYPTION = 2;

    private static $valueToName = [
        self::LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED => 'LOCAL_SSD_ENCRYPTION_MODE_UNSPECIFIED',
        self::STANDARD_ENCRYPTION => 'STANDARD_ENCRYPTION',
        self::EPHEMERAL_KEY_ENCRYPTION => 'EPHEMERAL_KEY_ENCRYPTION',
    ];

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


