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

namespace Google\Cloud\Dlp\V2;

use UnexpectedValueException;

/**
 * Deprecated and unused.
 *
 * Protobuf type <code>google.privacy.dlp.v2.ContentOption</code>
 */
class ContentOption
{
    /**
     * Includes entire content of a file or a data stream.
     *
     * Generated from protobuf enum <code>CONTENT_UNSPECIFIED = 0;</code>
     */
    const CONTENT_UNSPECIFIED = 0;
    /**
     * Text content within the data, excluding any metadata.
     *
     * Generated from protobuf enum <code>CONTENT_TEXT = 1;</code>
     */
    const CONTENT_TEXT = 1;
    /**
     * Images found in the data.
     *
     * Generated from protobuf enum <code>CONTENT_IMAGE = 2;</code>
     */
    const CONTENT_IMAGE = 2;

    private static $valueToName = [
        self::CONTENT_UNSPECIFIED => 'CONTENT_UNSPECIFIED',
        self::CONTENT_TEXT => 'CONTENT_TEXT',
        self::CONTENT_IMAGE => 'CONTENT_IMAGE',
    ];

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

