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

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

use UnexpectedValueException;

/**
 * Possible plannable age range values.
 *
 * Protobuf type <code>google.ads.googleads.v23.enums.ReachPlanAgeRangeEnum.ReachPlanAgeRange</code>
 */
class ReachPlanAgeRange
{
    /**
     * 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;
    /**
     * Between 18 and 24 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_24 = 503001;</code>
     */
    const AGE_RANGE_18_24 = 503001;
    /**
     * Between 18 and 34 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_34 = 2;</code>
     */
    const AGE_RANGE_18_34 = 2;
    /**
     * Between 18 and 44 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_44 = 3;</code>
     */
    const AGE_RANGE_18_44 = 3;
    /**
     * Between 18 and 49 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_49 = 4;</code>
     */
    const AGE_RANGE_18_49 = 4;
    /**
     * Between 18 and 54 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_54 = 5;</code>
     */
    const AGE_RANGE_18_54 = 5;
    /**
     * Between 18 and 64 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_64 = 6;</code>
     */
    const AGE_RANGE_18_64 = 6;
    /**
     * Between 18 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_18_65_UP = 7;</code>
     */
    const AGE_RANGE_18_65_UP = 7;
    /**
     * Between 21 and 34 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_21_34 = 8;</code>
     */
    const AGE_RANGE_21_34 = 8;
    /**
     * Between 21 and 44 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_21_44 = 22;</code>
     */
    const AGE_RANGE_21_44 = 22;
    /**
     * Between 21 and 49 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_21_49 = 23;</code>
     */
    const AGE_RANGE_21_49 = 23;
    /**
     * Between 21 and 54 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_21_54 = 24;</code>
     */
    const AGE_RANGE_21_54 = 24;
    /**
     * Between 21 and 64 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_21_64 = 25;</code>
     */
    const AGE_RANGE_21_64 = 25;
    /**
     * Between 21 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_21_65_UP = 26;</code>
     */
    const AGE_RANGE_21_65_UP = 26;
    /**
     * Between 25 and 34 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_25_34 = 503002;</code>
     */
    const AGE_RANGE_25_34 = 503002;
    /**
     * Between 25 and 44 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_25_44 = 9;</code>
     */
    const AGE_RANGE_25_44 = 9;
    /**
     * Between 25 and 49 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_25_49 = 10;</code>
     */
    const AGE_RANGE_25_49 = 10;
    /**
     * Between 25 and 54 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_25_54 = 11;</code>
     */
    const AGE_RANGE_25_54 = 11;
    /**
     * Between 25 and 64 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_25_64 = 12;</code>
     */
    const AGE_RANGE_25_64 = 12;
    /**
     * Between 25 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_25_65_UP = 13;</code>
     */
    const AGE_RANGE_25_65_UP = 13;
    /**
     * Between 35 and 44 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_35_44 = 503003;</code>
     */
    const AGE_RANGE_35_44 = 503003;
    /**
     * Between 35 and 49 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_35_49 = 14;</code>
     */
    const AGE_RANGE_35_49 = 14;
    /**
     * Between 35 and 54 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_35_54 = 15;</code>
     */
    const AGE_RANGE_35_54 = 15;
    /**
     * Between 35 and 64 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_35_64 = 16;</code>
     */
    const AGE_RANGE_35_64 = 16;
    /**
     * Between 35 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_35_65_UP = 17;</code>
     */
    const AGE_RANGE_35_65_UP = 17;
    /**
     * Between 45 and 54 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_45_54 = 503004;</code>
     */
    const AGE_RANGE_45_54 = 503004;
    /**
     * Between 45 and 64 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_45_64 = 18;</code>
     */
    const AGE_RANGE_45_64 = 18;
    /**
     * Between 45 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_45_65_UP = 19;</code>
     */
    const AGE_RANGE_45_65_UP = 19;
    /**
     * Between 50 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_50_65_UP = 20;</code>
     */
    const AGE_RANGE_50_65_UP = 20;
    /**
     * Between 55 and 64 years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_55_64 = 503005;</code>
     */
    const AGE_RANGE_55_64 = 503005;
    /**
     * Between 55 and 65+ years old.
     *
     * Generated from protobuf enum <code>AGE_RANGE_55_65_UP = 21;</code>
     */
    const AGE_RANGE_55_65_UP = 21;
    /**
     * 65 years old and beyond.
     *
     * Generated from protobuf enum <code>AGE_RANGE_65_UP = 503006;</code>
     */
    const AGE_RANGE_65_UP = 503006;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::AGE_RANGE_18_24 => 'AGE_RANGE_18_24',
        self::AGE_RANGE_18_34 => 'AGE_RANGE_18_34',
        self::AGE_RANGE_18_44 => 'AGE_RANGE_18_44',
        self::AGE_RANGE_18_49 => 'AGE_RANGE_18_49',
        self::AGE_RANGE_18_54 => 'AGE_RANGE_18_54',
        self::AGE_RANGE_18_64 => 'AGE_RANGE_18_64',
        self::AGE_RANGE_18_65_UP => 'AGE_RANGE_18_65_UP',
        self::AGE_RANGE_21_34 => 'AGE_RANGE_21_34',
        self::AGE_RANGE_21_44 => 'AGE_RANGE_21_44',
        self::AGE_RANGE_21_49 => 'AGE_RANGE_21_49',
        self::AGE_RANGE_21_54 => 'AGE_RANGE_21_54',
        self::AGE_RANGE_21_64 => 'AGE_RANGE_21_64',
        self::AGE_RANGE_21_65_UP => 'AGE_RANGE_21_65_UP',
        self::AGE_RANGE_25_34 => 'AGE_RANGE_25_34',
        self::AGE_RANGE_25_44 => 'AGE_RANGE_25_44',
        self::AGE_RANGE_25_49 => 'AGE_RANGE_25_49',
        self::AGE_RANGE_25_54 => 'AGE_RANGE_25_54',
        self::AGE_RANGE_25_64 => 'AGE_RANGE_25_64',
        self::AGE_RANGE_25_65_UP => 'AGE_RANGE_25_65_UP',
        self::AGE_RANGE_35_44 => 'AGE_RANGE_35_44',
        self::AGE_RANGE_35_49 => 'AGE_RANGE_35_49',
        self::AGE_RANGE_35_54 => 'AGE_RANGE_35_54',
        self::AGE_RANGE_35_64 => 'AGE_RANGE_35_64',
        self::AGE_RANGE_35_65_UP => 'AGE_RANGE_35_65_UP',
        self::AGE_RANGE_45_54 => 'AGE_RANGE_45_54',
        self::AGE_RANGE_45_64 => 'AGE_RANGE_45_64',
        self::AGE_RANGE_45_65_UP => 'AGE_RANGE_45_65_UP',
        self::AGE_RANGE_50_65_UP => 'AGE_RANGE_50_65_UP',
        self::AGE_RANGE_55_64 => 'AGE_RANGE_55_64',
        self::AGE_RANGE_55_65_UP => 'AGE_RANGE_55_65_UP',
        self::AGE_RANGE_65_UP => 'AGE_RANGE_65_UP',
    ];

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

