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

namespace PhpWA\Protocol\Proto\Message\ProtocolMessage;

use UnexpectedValueException;

/**
 * Protobuf type <code>proto.Message.ProtocolMessage.Type</code>
 */
class Type
{
    /**
     * Generated from protobuf enum <code>REVOKE = 0;</code>
     */
    const REVOKE = 0;
    /**
     * Generated from protobuf enum <code>EPHEMERAL_SETTING = 3;</code>
     */
    const EPHEMERAL_SETTING = 3;
    /**
     * Generated from protobuf enum <code>EPHEMERAL_SYNC_RESPONSE = 4;</code>
     */
    const EPHEMERAL_SYNC_RESPONSE = 4;
    /**
     * Generated from protobuf enum <code>HISTORY_SYNC_NOTIFICATION = 5;</code>
     */
    const HISTORY_SYNC_NOTIFICATION = 5;
    /**
     * Generated from protobuf enum <code>APP_STATE_SYNC_KEY_SHARE = 6;</code>
     */
    const APP_STATE_SYNC_KEY_SHARE = 6;
    /**
     * Generated from protobuf enum <code>APP_STATE_SYNC_KEY_REQUEST = 7;</code>
     */
    const APP_STATE_SYNC_KEY_REQUEST = 7;
    /**
     * Generated from protobuf enum <code>MSG_FANOUT_BACKFILL_REQUEST = 8;</code>
     */
    const MSG_FANOUT_BACKFILL_REQUEST = 8;
    /**
     * Generated from protobuf enum <code>INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9;</code>
     */
    const INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9;
    /**
     * Generated from protobuf enum <code>APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10;</code>
     */
    const APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10;
    /**
     * Generated from protobuf enum <code>SHARE_PHONE_NUMBER = 11;</code>
     */
    const SHARE_PHONE_NUMBER = 11;
    /**
     * Generated from protobuf enum <code>MESSAGE_EDIT = 14;</code>
     */
    const MESSAGE_EDIT = 14;
    /**
     * Generated from protobuf enum <code>PEER_DATA_OPERATION_REQUEST_MESSAGE = 16;</code>
     */
    const PEER_DATA_OPERATION_REQUEST_MESSAGE = 16;
    /**
     * Generated from protobuf enum <code>PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17;</code>
     */
    const PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17;
    /**
     * Generated from protobuf enum <code>REQUEST_WELCOME_MESSAGE = 18;</code>
     */
    const REQUEST_WELCOME_MESSAGE = 18;
    /**
     * Generated from protobuf enum <code>BOT_FEEDBACK_MESSAGE = 19;</code>
     */
    const BOT_FEEDBACK_MESSAGE = 19;
    /**
     * Generated from protobuf enum <code>MEDIA_NOTIFY_MESSAGE = 20;</code>
     */
    const MEDIA_NOTIFY_MESSAGE = 20;
    /**
     * Generated from protobuf enum <code>CLOUD_API_THREAD_CONTROL_NOTIFICATION = 21;</code>
     */
    const CLOUD_API_THREAD_CONTROL_NOTIFICATION = 21;
    /**
     * Generated from protobuf enum <code>LID_MIGRATION_MAPPING_SYNC = 22;</code>
     */
    const LID_MIGRATION_MAPPING_SYNC = 22;
    /**
     * Generated from protobuf enum <code>REMINDER_MESSAGE = 23;</code>
     */
    const REMINDER_MESSAGE = 23;
    /**
     * Generated from protobuf enum <code>BOT_MEMU_ONBOARDING_MESSAGE = 24;</code>
     */
    const BOT_MEMU_ONBOARDING_MESSAGE = 24;
    /**
     * Generated from protobuf enum <code>STATUS_MENTION_MESSAGE = 25;</code>
     */
    const STATUS_MENTION_MESSAGE = 25;
    /**
     * Generated from protobuf enum <code>STOP_GENERATION_MESSAGE = 26;</code>
     */
    const STOP_GENERATION_MESSAGE = 26;
    /**
     * Generated from protobuf enum <code>LIMIT_SHARING = 27;</code>
     */
    const LIMIT_SHARING = 27;
    /**
     * Generated from protobuf enum <code>AI_PSI_METADATA = 28;</code>
     */
    const AI_PSI_METADATA = 28;
    /**
     * Generated from protobuf enum <code>AI_QUERY_FANOUT = 29;</code>
     */
    const AI_QUERY_FANOUT = 29;
    /**
     * Generated from protobuf enum <code>GROUP_MEMBER_LABEL_CHANGE = 30;</code>
     */
    const GROUP_MEMBER_LABEL_CHANGE = 30;

    private static $valueToName = [
        self::REVOKE => 'REVOKE',
        self::EPHEMERAL_SETTING => 'EPHEMERAL_SETTING',
        self::EPHEMERAL_SYNC_RESPONSE => 'EPHEMERAL_SYNC_RESPONSE',
        self::HISTORY_SYNC_NOTIFICATION => 'HISTORY_SYNC_NOTIFICATION',
        self::APP_STATE_SYNC_KEY_SHARE => 'APP_STATE_SYNC_KEY_SHARE',
        self::APP_STATE_SYNC_KEY_REQUEST => 'APP_STATE_SYNC_KEY_REQUEST',
        self::MSG_FANOUT_BACKFILL_REQUEST => 'MSG_FANOUT_BACKFILL_REQUEST',
        self::INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC => 'INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC',
        self::APP_STATE_FATAL_EXCEPTION_NOTIFICATION => 'APP_STATE_FATAL_EXCEPTION_NOTIFICATION',
        self::SHARE_PHONE_NUMBER => 'SHARE_PHONE_NUMBER',
        self::MESSAGE_EDIT => 'MESSAGE_EDIT',
        self::PEER_DATA_OPERATION_REQUEST_MESSAGE => 'PEER_DATA_OPERATION_REQUEST_MESSAGE',
        self::PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE => 'PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE',
        self::REQUEST_WELCOME_MESSAGE => 'REQUEST_WELCOME_MESSAGE',
        self::BOT_FEEDBACK_MESSAGE => 'BOT_FEEDBACK_MESSAGE',
        self::MEDIA_NOTIFY_MESSAGE => 'MEDIA_NOTIFY_MESSAGE',
        self::CLOUD_API_THREAD_CONTROL_NOTIFICATION => 'CLOUD_API_THREAD_CONTROL_NOTIFICATION',
        self::LID_MIGRATION_MAPPING_SYNC => 'LID_MIGRATION_MAPPING_SYNC',
        self::REMINDER_MESSAGE => 'REMINDER_MESSAGE',
        self::BOT_MEMU_ONBOARDING_MESSAGE => 'BOT_MEMU_ONBOARDING_MESSAGE',
        self::STATUS_MENTION_MESSAGE => 'STATUS_MENTION_MESSAGE',
        self::STOP_GENERATION_MESSAGE => 'STOP_GENERATION_MESSAGE',
        self::LIMIT_SHARING => 'LIMIT_SHARING',
        self::AI_PSI_METADATA => 'AI_PSI_METADATA',
        self::AI_QUERY_FANOUT => 'AI_QUERY_FANOUT',
        self::GROUP_MEMBER_LABEL_CHANGE => 'GROUP_MEMBER_LABEL_CHANGE',
    ];

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

