<?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;

/**
 * Label detection mode.
 *
 * Protobuf type <code>google.cloud.videointelligence.v1.LabelDetectionMode</code>
 */
class LabelDetectionMode
{
    /**
     * Unspecified.
     *
     * Generated from protobuf enum <code>LABEL_DETECTION_MODE_UNSPECIFIED = 0;</code>
     */
    const LABEL_DETECTION_MODE_UNSPECIFIED = 0;
    /**
     * Detect shot-level labels.
     *
     * Generated from protobuf enum <code>SHOT_MODE = 1;</code>
     */
    const SHOT_MODE = 1;
    /**
     * Detect frame-level labels.
     *
     * Generated from protobuf enum <code>FRAME_MODE = 2;</code>
     */
    const FRAME_MODE = 2;
    /**
     * Detect both shot-level and frame-level labels.
     *
     * Generated from protobuf enum <code>SHOT_AND_FRAME_MODE = 3;</code>
     */
    const SHOT_AND_FRAME_MODE = 3;

    private static $valueToName = [
        self::LABEL_DETECTION_MODE_UNSPECIFIED => 'LABEL_DETECTION_MODE_UNSPECIFIED',
        self::SHOT_MODE => 'SHOT_MODE',
        self::FRAME_MODE => 'FRAME_MODE',
        self::SHOT_AND_FRAME_MODE => 'SHOT_AND_FRAME_MODE',
    ];

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

