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

namespace Google\Cloud\Dlp\V2\InfoTypeDescription;

use UnexpectedValueException;

/**
 * The launch status of an infoType.
 *
 * Protobuf type <code>google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus</code>
 */
class InfoTypeLaunchStatus
{
    /**
     * Unspecified.
     *
     * Generated from protobuf enum <code>INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED = 0;</code>
     */
    const INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED = 0;
    /**
     * InfoType is generally available.
     *
     * Generated from protobuf enum <code>GENERAL_AVAILABILITY = 1;</code>
     */
    const GENERAL_AVAILABILITY = 1;
    /**
     * InfoType is in public preview.
     *
     * Generated from protobuf enum <code>PUBLIC_PREVIEW = 2;</code>
     */
    const PUBLIC_PREVIEW = 2;
    /**
     * InfoType is in private preview.
     *
     * Generated from protobuf enum <code>PRIVATE_PREVIEW = 3;</code>
     */
    const PRIVATE_PREVIEW = 3;

    private static $valueToName = [
        self::INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED => 'INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED',
        self::GENERAL_AVAILABILITY => 'GENERAL_AVAILABILITY',
        self::PUBLIC_PREVIEW => 'PUBLIC_PREVIEW',
        self::PRIVATE_PREVIEW => 'PRIVATE_PREVIEW',
    ];

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

