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

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

use UnexpectedValueException;

/**
 * Expansion level, reflecting the size of the lookalike audience
 *
 * Protobuf type <code>google.ads.googleads.v24.enums.LookalikeExpansionLevelEnum.LookalikeExpansionLevel</code>
 */
class LookalikeExpansionLevel
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Invalid expansion level.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * Expansion to a small set of users that are similar to the seed lists
     *
     * Generated from protobuf enum <code>NARROW = 2;</code>
     */
    const NARROW = 2;
    /**
     * Expansion to a medium set of users that are similar to the seed lists.
     * Includes all users of EXPANSION_LEVEL_NARROW, and more.
     *
     * Generated from protobuf enum <code>BALANCED = 3;</code>
     */
    const BALANCED = 3;
    /**
     * Expansion to a large set of users that are similar to the seed lists.
     * Includes all users of EXPANSION_LEVEL_BALANCED, and more.
     *
     * Generated from protobuf enum <code>BROAD = 4;</code>
     */
    const BROAD = 4;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::NARROW => 'NARROW',
        self::BALANCED => 'BALANCED',
        self::BROAD => 'BROAD',
    ];

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

