<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/enums/sentiment.proto

namespace Google\Ads\GoogleAds\V25\Enums\SentimentEnum;

use UnexpectedValueException;

/**
 * Sentiment for a brand - how a brand is viewed according to content related
 * to the brand.
 *
 * Protobuf type <code>google.ads.googleads.v25.enums.SentimentEnum.Sentiment</code>
 */
class Sentiment
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * The value is unknown in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * The sentiment is neutral; often this label is attributed to content
     * that is instructional (how-to videos).
     *
     * Generated from protobuf enum <code>SENTIMENT_NEUTRAL = 2;</code>
     */
    const SENTIMENT_NEUTRAL = 2;
    /**
     * The sentiment is positive.
     *
     * Generated from protobuf enum <code>SENTIMENT_POSITIVE = 3;</code>
     */
    const SENTIMENT_POSITIVE = 3;
    /**
     * The sentiment is negative.
     *
     * Generated from protobuf enum <code>SENTIMENT_NEGATIVE = 4;</code>
     */
    const SENTIMENT_NEGATIVE = 4;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::SENTIMENT_NEUTRAL => 'SENTIMENT_NEUTRAL',
        self::SENTIMENT_POSITIVE => 'SENTIMENT_POSITIVE',
        self::SENTIMENT_NEGATIVE => 'SENTIMENT_NEGATIVE',
    ];

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

