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

namespace Google\Cloud\VideoIntelligence\V1;

use UnexpectedValueException;

/**
 * Video annotation feature.
 *
 * Protobuf type <code>google.cloud.videointelligence.v1.Feature</code>
 */
class Feature
{
    /**
     * Unspecified.
     *
     * Generated from protobuf enum <code>FEATURE_UNSPECIFIED = 0;</code>
     */
    const FEATURE_UNSPECIFIED = 0;
    /**
     * Label detection. Detect objects, such as dog or flower.
     *
     * Generated from protobuf enum <code>LABEL_DETECTION = 1;</code>
     */
    const LABEL_DETECTION = 1;
    /**
     * Shot change detection.
     *
     * Generated from protobuf enum <code>SHOT_CHANGE_DETECTION = 2;</code>
     */
    const SHOT_CHANGE_DETECTION = 2;
    /**
     * Explicit content detection.
     *
     * Generated from protobuf enum <code>EXPLICIT_CONTENT_DETECTION = 3;</code>
     */
    const EXPLICIT_CONTENT_DETECTION = 3;
    /**
     * Human face detection and tracking.
     *
     * Generated from protobuf enum <code>FACE_DETECTION = 4;</code>
     */
    const FACE_DETECTION = 4;
    /**
     * Speech transcription.
     *
     * Generated from protobuf enum <code>SPEECH_TRANSCRIPTION = 6;</code>
     */
    const SPEECH_TRANSCRIPTION = 6;
    /**
     * OCR text detection and tracking.
     *
     * Generated from protobuf enum <code>TEXT_DETECTION = 7;</code>
     */
    const TEXT_DETECTION = 7;
    /**
     * Object detection and tracking.
     *
     * Generated from protobuf enum <code>OBJECT_TRACKING = 9;</code>
     */
    const OBJECT_TRACKING = 9;

    private static $valueToName = [
        self::FEATURE_UNSPECIFIED => 'FEATURE_UNSPECIFIED',
        self::LABEL_DETECTION => 'LABEL_DETECTION',
        self::SHOT_CHANGE_DETECTION => 'SHOT_CHANGE_DETECTION',
        self::EXPLICIT_CONTENT_DETECTION => 'EXPLICIT_CONTENT_DETECTION',
        self::FACE_DETECTION => 'FACE_DETECTION',
        self::SPEECH_TRANSCRIPTION => 'SPEECH_TRANSCRIPTION',
        self::TEXT_DETECTION => 'TEXT_DETECTION',
        self::OBJECT_TRACKING => 'OBJECT_TRACKING',
    ];

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

