<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/admanager/v1/team_enums.proto

namespace Google\Ads\AdManager\V1\TeamStatusEnum;

use UnexpectedValueException;

/**
 * Represents the status of a team, whether it is active or inactive.
 *
 * Protobuf type <code>google.ads.admanager.v1.TeamStatusEnum.TeamStatus</code>
 */
class TeamStatus
{
    /**
     * Default value. This value is unused.
     *
     * Generated from protobuf enum <code>TEAM_STATUS_UNSPECIFIED = 0;</code>
     */
    const TEAM_STATUS_UNSPECIFIED = 0;
    /**
     * The status of an active team.
     *
     * Generated from protobuf enum <code>ACTIVE = 1;</code>
     */
    const ACTIVE = 1;
    /**
     * The status of an inactive team.
     *
     * Generated from protobuf enum <code>INACTIVE = 2;</code>
     */
    const INACTIVE = 2;

    private static $valueToName = [
        self::TEAM_STATUS_UNSPECIFIED => 'TEAM_STATUS_UNSPECIFIED',
        self::ACTIVE => 'ACTIVE',
        self::INACTIVE => 'INACTIVE',
    ];

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

