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

namespace Google\Cloud\Language\V1\PartOfSpeech;

use UnexpectedValueException;

/**
 * Reciprocal features of a pronoun.
 *
 * Protobuf type <code>google.cloud.language.v1.PartOfSpeech.Reciprocity</code>
 */
class Reciprocity
{
    /**
     * Reciprocity is not applicable in the analyzed language or is not
     * predicted.
     *
     * Generated from protobuf enum <code>RECIPROCITY_UNKNOWN = 0;</code>
     */
    const RECIPROCITY_UNKNOWN = 0;
    /**
     * Reciprocal
     *
     * Generated from protobuf enum <code>RECIPROCAL = 1;</code>
     */
    const RECIPROCAL = 1;
    /**
     * Non-reciprocal
     *
     * Generated from protobuf enum <code>NON_RECIPROCAL = 2;</code>
     */
    const NON_RECIPROCAL = 2;

    private static $valueToName = [
        self::RECIPROCITY_UNKNOWN => 'RECIPROCITY_UNKNOWN',
        self::RECIPROCAL => 'RECIPROCAL',
        self::NON_RECIPROCAL => 'NON_RECIPROCAL',
    ];

    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(Reciprocity::class, \Google\Cloud\Language\V1\PartOfSpeech_Reciprocity::class);

