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

namespace Google\Cloud\DataLabeling\V1beta1;

use UnexpectedValueException;

/**
 * Protobuf type <code>google.cloud.datalabeling.v1beta1.AnnotationSentiment</code>
 */
class AnnotationSentiment
{
    /**
     * Generated from protobuf enum <code>ANNOTATION_SENTIMENT_UNSPECIFIED = 0;</code>
     */
    const ANNOTATION_SENTIMENT_UNSPECIFIED = 0;
    /**
     * This annotation describes negatively about the data.
     *
     * Generated from protobuf enum <code>NEGATIVE = 1;</code>
     */
    const NEGATIVE = 1;
    /**
     * This label describes positively about the data.
     *
     * Generated from protobuf enum <code>POSITIVE = 2;</code>
     */
    const POSITIVE = 2;

    private static $valueToName = [
        self::ANNOTATION_SENTIMENT_UNSPECIFIED => 'ANNOTATION_SENTIMENT_UNSPECIFIED',
        self::NEGATIVE => 'NEGATIVE',
        self::POSITIVE => 'POSITIVE',
    ];

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

