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

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

use UnexpectedValueException;

/**
 * Enumerates loyalty membership.
 *
 * Protobuf type <code>google.ads.googleads.v25.enums.LoyaltyMembershipEnum.LoyaltyMembership</code>
 */
class LoyaltyMembership
{
    /**
     * Not specified.
     *
     * Generated from protobuf enum <code>UNSPECIFIED = 0;</code>
     */
    const UNSPECIFIED = 0;
    /**
     * Unknown.
     *
     * Generated from protobuf enum <code>UNKNOWN = 1;</code>
     */
    const UNKNOWN = 1;
    /**
     * The user is not a member of the loyalty program.
     *
     * Generated from protobuf enum <code>NONMEMBER = 2;</code>
     */
    const NONMEMBER = 2;
    /**
     * The user is a tier 1 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER1 = 3;</code>
     */
    const TIER1 = 3;
    /**
     * The user is a tier 2 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER2 = 4;</code>
     */
    const TIER2 = 4;
    /**
     * The user is a tier 3 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER3 = 5;</code>
     */
    const TIER3 = 5;
    /**
     * The user is a tier 4 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER4 = 6;</code>
     */
    const TIER4 = 6;
    /**
     * The user is a tier 5 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER5 = 7;</code>
     */
    const TIER5 = 7;
    /**
     * The user is a tier 6 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER6 = 8;</code>
     */
    const TIER6 = 8;
    /**
     * The user is a tier 7 member of the loyalty program.
     *
     * Generated from protobuf enum <code>TIER7 = 9;</code>
     */
    const TIER7 = 9;

    private static $valueToName = [
        self::UNSPECIFIED => 'UNSPECIFIED',
        self::UNKNOWN => 'UNKNOWN',
        self::NONMEMBER => 'NONMEMBER',
        self::TIER1 => 'TIER1',
        self::TIER2 => 'TIER2',
        self::TIER3 => 'TIER3',
        self::TIER4 => 'TIER4',
        self::TIER5 => 'TIER5',
        self::TIER6 => 'TIER6',
        self::TIER7 => 'TIER7',
    ];

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

