<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto\SyncActionValue\LabelEditAction;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.SyncActionValue.LabelEditAction.ListType</code>
 */
class ListType
{
    /**
     * Generated from protobuf enum <code>NONE = 0;</code>
     */
    const NONE = 0;
    /**
     * Generated from protobuf enum <code>UNREAD = 1;</code>
     */
    const UNREAD = 1;
    /**
     * Generated from protobuf enum <code>GROUPS = 2;</code>
     */
    const GROUPS = 2;
    /**
     * Generated from protobuf enum <code>FAVORITES = 3;</code>
     */
    const FAVORITES = 3;
    /**
     * Generated from protobuf enum <code>PREDEFINED = 4;</code>
     */
    const PREDEFINED = 4;
    /**
     * Generated from protobuf enum <code>CUSTOM = 5;</code>
     */
    const CUSTOM = 5;
    /**
     * Generated from protobuf enum <code>COMMUNITY = 6;</code>
     */
    const COMMUNITY = 6;
    /**
     * Generated from protobuf enum <code>SERVER_ASSIGNED = 7;</code>
     */
    const SERVER_ASSIGNED = 7;
    /**
     * Generated from protobuf enum <code>DRAFTED = 8;</code>
     */
    const DRAFTED = 8;
    /**
     * Generated from protobuf enum <code>AI_HANDOFF = 9;</code>
     */
    const AI_HANDOFF = 9;

    private static $valueToName = [
        self::NONE => 'NONE',
        self::UNREAD => 'UNREAD',
        self::GROUPS => 'GROUPS',
        self::FAVORITES => 'FAVORITES',
        self::PREDEFINED => 'PREDEFINED',
        self::CUSTOM => 'CUSTOM',
        self::COMMUNITY => 'COMMUNITY',
        self::SERVER_ASSIGNED => 'SERVER_ASSIGNED',
        self::DRAFTED => 'DRAFTED',
        self::AI_HANDOFF => 'AI_HANDOFF',
    ];

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

