<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: keyapis/exchange/v1/keyapis_exchange_message_v1.proto

namespace Keyapis\Exchange\V1\MessageMobilePushCall\PushCall;

use UnexpectedValueException;

/**
 * Тип пуш-токена
 *
 * Protobuf type <code>keyapis.exchange.v1.MessageMobilePushCall.PushCall.Type</code>
 */
class Type
{
    /**
     * Не указан
     *
     * Generated from protobuf enum <code>TYPE_UNKNOWN = 0;</code>
     */
    const TYPE_UNKNOWN = 0;
    /**
     * Для Mobile Firebase Cloud Messaging
     *
     * Generated from protobuf enum <code>MOBILE_FCM = 1;</code>
     */
    const MOBILE_FCM = 1;
    /**
     * Для Mobile Huawei Messaging System
     *
     * Generated from protobuf enum <code>MOBILE_HMS = 2;</code>
     */
    const MOBILE_HMS = 2;
    /**
     * Для Mobile Apple PushToken System для текста
     *
     * Generated from protobuf enum <code>MOBILE_APNS_TEXT = 3;</code>
     */
    const MOBILE_APNS_TEXT = 3;
    /**
     * Для Mobile Apple PushToken System для звонков
     *
     * Generated from protobuf enum <code>MOBILE_APNS_CALL = 4;</code>
     */
    const MOBILE_APNS_CALL = 4;
    /**
     * Для Mobile RuStore
     *
     * Generated from protobuf enum <code>MOBILE_RUSTORE = 5;</code>
     */
    const MOBILE_RUSTORE = 5;

    private static $valueToName = [
        self::TYPE_UNKNOWN => 'TYPE_UNKNOWN',
        self::MOBILE_FCM => 'MOBILE_FCM',
        self::MOBILE_HMS => 'MOBILE_HMS',
        self::MOBILE_APNS_TEXT => 'MOBILE_APNS_TEXT',
        self::MOBILE_APNS_CALL => 'MOBILE_APNS_CALL',
        self::MOBILE_RUSTORE => 'MOBILE_RUSTORE',
    ];

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

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Type::class, \Keyapis\Exchange\V1\MessageMobilePushCall_PushCall_Type::class);

