<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/data_labeling_service.proto

namespace Google\Cloud\DataLabeling\V1beta1\LabelVideoRequest;

use UnexpectedValueException;

/**
 * Video labeling task feature.
 *
 * Protobuf type <code>google.cloud.datalabeling.v1beta1.LabelVideoRequest.Feature</code>
 */
class Feature
{
    /**
     * Generated from protobuf enum <code>FEATURE_UNSPECIFIED = 0;</code>
     */
    const FEATURE_UNSPECIFIED = 0;
    /**
     * Label whole video or video segment with one or more labels.
     *
     * Generated from protobuf enum <code>CLASSIFICATION = 1;</code>
     */
    const CLASSIFICATION = 1;
    /**
     * Label objects with bounding box on image frames extracted from the video.
     *
     * Generated from protobuf enum <code>OBJECT_DETECTION = 2;</code>
     */
    const OBJECT_DETECTION = 2;
    /**
     * Label and track objects in video.
     *
     * Generated from protobuf enum <code>OBJECT_TRACKING = 3;</code>
     */
    const OBJECT_TRACKING = 3;
    /**
     * Label the range of video for the specified events.
     *
     * Generated from protobuf enum <code>EVENT = 4;</code>
     */
    const EVENT = 4;

    private static $valueToName = [
        self::FEATURE_UNSPECIFIED => 'FEATURE_UNSPECIFIED',
        self::CLASSIFICATION => 'CLASSIFICATION',
        self::OBJECT_DETECTION => 'OBJECT_DETECTION',
        self::OBJECT_TRACKING => 'OBJECT_TRACKING',
        self::EVENT => 'EVENT',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Feature::class, \Google\Cloud\DataLabeling\V1beta1\LabelVideoRequest_Feature::class);

