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

namespace Google\Cloud\VideoIntelligence\V1beta2;

use UnexpectedValueException;

/**
 * Video annotation feature.
 *
 * Protobuf type <code>google.cloud.videointelligence.v1beta2.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;

    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',
    ];

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

