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

namespace Google\Ads\GoogleAds\V24\Enums\LocalServicesLeadSurveyAnswerEnum;

use UnexpectedValueException;

/**
 * Survey answer for Local Services Ads Lead.
 *
 * Protobuf type <code>google.ads.googleads.v24.enums.LocalServicesLeadSurveyAnswerEnum.SurveyAnswer</code>
 */
class SurveyAnswer
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Used for return value only. Represents value unknown in this version.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * Very satisfied with the lead.
     *
     * Generated from protobuf enum <code>VERY_SATISFIED = 2;</code>
     */
    const VERY_SATISFIED = 2;
    /**
     * Satisfied with the lead.
     *
     * Generated from protobuf enum <code>SATISFIED = 3;</code>
     */
    const SATISFIED = 3;
    /**
     * Neutral with the lead.
     *
     * Generated from protobuf enum <code>NEUTRAL = 4;</code>
     */
    const NEUTRAL = 4;
    /**
     * Dissatisfied with the lead.
     *
     * Generated from protobuf enum <code>DISSATISFIED = 5;</code>
     */
    const DISSATISFIED = 5;
    /**
     * Very dissatisfied with the lead.
     *
     * Generated from protobuf enum <code>VERY_DISSATISFIED = 6;</code>
     */
    const VERY_DISSATISFIED = 6;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::VERY_SATISFIED => 'VERY_SATISFIED',
        self::SATISFIED => 'SATISFIED',
        self::NEUTRAL => 'NEUTRAL',
        self::DISSATISFIED => 'DISSATISFIED',
        self::VERY_DISSATISFIED => 'VERY_DISSATISFIED',
    ];

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

