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

namespace Google\Ads\GoogleAds\V23\Enums\LocalServicesLeadSurveySatisfiedReasonEnum;

use UnexpectedValueException;

/**
 * Provider's reason for being satisfied with the lead.
 *
 * Protobuf type <code>google.ads.googleads.v23.enums.LocalServicesLeadSurveySatisfiedReasonEnum.SurveySatisfiedReason</code>
 */
class SurveySatisfiedReason
{
    /**
     * 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;
    /**
     * Other reasons.
     *
     * Generated from protobuf enum <code>OTHER_SATISFIED_REASON = 2;</code>
     */
    const OTHER_SATISFIED_REASON = 2;
    /**
     * Lead converted into a booked customer or client.
     *
     * Generated from protobuf enum <code>BOOKED_CUSTOMER = 3;</code>
     */
    const BOOKED_CUSTOMER = 3;
    /**
     * Lead could convert into a booked customer or client soon.
     *
     * Generated from protobuf enum <code>LIKELY_BOOKED_CUSTOMER = 4;</code>
     */
    const LIKELY_BOOKED_CUSTOMER = 4;
    /**
     * Lead was related to the services the business offers.
     *
     * Generated from protobuf enum <code>SERVICE_RELATED = 5;</code>
     */
    const SERVICE_RELATED = 5;
    /**
     * Lead was for a service that generates high value for the business.
     *
     * Generated from protobuf enum <code>HIGH_VALUE_SERVICE = 6;</code>
     */
    const HIGH_VALUE_SERVICE = 6;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::OTHER_SATISFIED_REASON => 'OTHER_SATISFIED_REASON',
        self::BOOKED_CUSTOMER => 'BOOKED_CUSTOMER',
        self::LIKELY_BOOKED_CUSTOMER => 'LIKELY_BOOKED_CUSTOMER',
        self::SERVICE_RELATED => 'SERVICE_RELATED',
        self::HIGH_VALUE_SERVICE => 'HIGH_VALUE_SERVICE',
    ];

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

