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

namespace Livekit;

use UnexpectedValueException;

/**
 * Protobuf type <code>livekit.AnalyticsEventType</code>
 */
class AnalyticsEventType
{
    /**
     * Generated from protobuf enum <code>ROOM_CREATED = 0;</code>
     */
    const ROOM_CREATED = 0;
    /**
     * Generated from protobuf enum <code>ROOM_ENDED = 1;</code>
     */
    const ROOM_ENDED = 1;
    /**
     * Generated from protobuf enum <code>PARTICIPANT_JOINED = 2;</code>
     */
    const PARTICIPANT_JOINED = 2;
    /**
     * Generated from protobuf enum <code>PARTICIPANT_LEFT = 3;</code>
     */
    const PARTICIPANT_LEFT = 3;
    /**
     * Generated from protobuf enum <code>PARTICIPANT_CONNECTION_ABORTED = 45;</code>
     */
    const PARTICIPANT_CONNECTION_ABORTED = 45;
    /**
     * Generated from protobuf enum <code>TRACK_PUBLISHED = 4;</code>
     */
    const TRACK_PUBLISHED = 4;
    /**
     * Generated from protobuf enum <code>TRACK_PUBLISH_REQUESTED = 20;</code>
     */
    const TRACK_PUBLISH_REQUESTED = 20;
    /**
     * Generated from protobuf enum <code>TRACK_UNPUBLISHED = 5;</code>
     */
    const TRACK_UNPUBLISHED = 5;
    /**
     * Generated from protobuf enum <code>TRACK_SUBSCRIBED = 6;</code>
     */
    const TRACK_SUBSCRIBED = 6;
    /**
     * Generated from protobuf enum <code>TRACK_SUBSCRIBE_REQUESTED = 21;</code>
     */
    const TRACK_SUBSCRIBE_REQUESTED = 21;
    /**
     * Generated from protobuf enum <code>TRACK_SUBSCRIBE_FAILED = 25;</code>
     */
    const TRACK_SUBSCRIBE_FAILED = 25;
    /**
     * Generated from protobuf enum <code>TRACK_UNSUBSCRIBED = 7;</code>
     */
    const TRACK_UNSUBSCRIBED = 7;
    /**
     * Generated from protobuf enum <code>TRACK_PUBLISHED_UPDATE = 10;</code>
     */
    const TRACK_PUBLISHED_UPDATE = 10;
    /**
     * Generated from protobuf enum <code>TRACK_MUTED = 23;</code>
     */
    const TRACK_MUTED = 23;
    /**
     * Generated from protobuf enum <code>TRACK_UNMUTED = 24;</code>
     */
    const TRACK_UNMUTED = 24;
    /**
     * Generated from protobuf enum <code>TRACK_PUBLISH_STATS = 26;</code>
     */
    const TRACK_PUBLISH_STATS = 26;
    /**
     * Generated from protobuf enum <code>TRACK_SUBSCRIBE_STATS = 27;</code>
     */
    const TRACK_SUBSCRIBE_STATS = 27;
    /**
     * Generated from protobuf enum <code>PARTICIPANT_ACTIVE = 11;</code>
     */
    const PARTICIPANT_ACTIVE = 11;
    /**
     * Generated from protobuf enum <code>PARTICIPANT_RESUMED = 22;</code>
     */
    const PARTICIPANT_RESUMED = 22;
    /**
     * Generated from protobuf enum <code>EGRESS_STARTED = 12;</code>
     */
    const EGRESS_STARTED = 12;
    /**
     * Generated from protobuf enum <code>EGRESS_ENDED = 13;</code>
     */
    const EGRESS_ENDED = 13;
    /**
     * Generated from protobuf enum <code>EGRESS_UPDATED = 28;</code>
     */
    const EGRESS_UPDATED = 28;
    /**
     * Generated from protobuf enum <code>TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY = 14;</code>
     */
    const TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY = 14;
    /**
     * Generated from protobuf enum <code>RECONNECTED = 15;</code>
     */
    const RECONNECTED = 15;
    /**
     * Generated from protobuf enum <code>INGRESS_CREATED = 18;</code>
     */
    const INGRESS_CREATED = 18;
    /**
     * Generated from protobuf enum <code>INGRESS_DELETED = 19;</code>
     */
    const INGRESS_DELETED = 19;
    /**
     * Generated from protobuf enum <code>INGRESS_STARTED = 16;</code>
     */
    const INGRESS_STARTED = 16;
    /**
     * Generated from protobuf enum <code>INGRESS_ENDED = 17;</code>
     */
    const INGRESS_ENDED = 17;
    /**
     * Generated from protobuf enum <code>INGRESS_UPDATED = 29;</code>
     */
    const INGRESS_UPDATED = 29;
    /**
     * Generated from protobuf enum <code>SIP_INBOUND_TRUNK_CREATED = 30;</code>
     */
    const SIP_INBOUND_TRUNK_CREATED = 30;
    /**
     * Generated from protobuf enum <code>SIP_INBOUND_TRUNK_DELETED = 31;</code>
     */
    const SIP_INBOUND_TRUNK_DELETED = 31;
    /**
     * Generated from protobuf enum <code>SIP_OUTBOUND_TRUNK_CREATED = 32;</code>
     */
    const SIP_OUTBOUND_TRUNK_CREATED = 32;
    /**
     * Generated from protobuf enum <code>SIP_OUTBOUND_TRUNK_DELETED = 33;</code>
     */
    const SIP_OUTBOUND_TRUNK_DELETED = 33;
    /**
     * Generated from protobuf enum <code>SIP_DISPATCH_RULE_CREATED = 34;</code>
     */
    const SIP_DISPATCH_RULE_CREATED = 34;
    /**
     * Generated from protobuf enum <code>SIP_DISPATCH_RULE_DELETED = 35;</code>
     */
    const SIP_DISPATCH_RULE_DELETED = 35;
    /**
     * Generated from protobuf enum <code>SIP_PARTICIPANT_CREATED = 36;</code>
     */
    const SIP_PARTICIPANT_CREATED = 36;
    /**
     * Generated from protobuf enum <code>SIP_CALL_INCOMING = 37;</code>
     */
    const SIP_CALL_INCOMING = 37;
    /**
     * Generated from protobuf enum <code>SIP_CALL_STARTED = 38;</code>
     */
    const SIP_CALL_STARTED = 38;
    /**
     * Generated from protobuf enum <code>SIP_CALL_ENDED = 39;</code>
     */
    const SIP_CALL_ENDED = 39;
    /**
     * Generated from protobuf enum <code>SIP_TRANSFER_REQUESTED = 43;</code>
     */
    const SIP_TRANSFER_REQUESTED = 43;
    /**
     * Generated from protobuf enum <code>SIP_TRANSFER_COMPLETE = 44;</code>
     */
    const SIP_TRANSFER_COMPLETE = 44;
    /**
     * Generated from protobuf enum <code>SIP_CALL_UPDATE = 46;</code>
     */
    const SIP_CALL_UPDATE = 46;
    /**
     * Generated from protobuf enum <code>REPORT = 40;</code>
     */
    const REPORT = 40;
    /**
     * Generated from protobuf enum <code>API_CALL = 41;</code>
     */
    const API_CALL = 41;
    /**
     * Generated from protobuf enum <code>WEBHOOK = 42;</code>
     */
    const WEBHOOK = 42;

    private static $valueToName = [
        self::ROOM_CREATED => 'ROOM_CREATED',
        self::ROOM_ENDED => 'ROOM_ENDED',
        self::PARTICIPANT_JOINED => 'PARTICIPANT_JOINED',
        self::PARTICIPANT_LEFT => 'PARTICIPANT_LEFT',
        self::PARTICIPANT_CONNECTION_ABORTED => 'PARTICIPANT_CONNECTION_ABORTED',
        self::TRACK_PUBLISHED => 'TRACK_PUBLISHED',
        self::TRACK_PUBLISH_REQUESTED => 'TRACK_PUBLISH_REQUESTED',
        self::TRACK_UNPUBLISHED => 'TRACK_UNPUBLISHED',
        self::TRACK_SUBSCRIBED => 'TRACK_SUBSCRIBED',
        self::TRACK_SUBSCRIBE_REQUESTED => 'TRACK_SUBSCRIBE_REQUESTED',
        self::TRACK_SUBSCRIBE_FAILED => 'TRACK_SUBSCRIBE_FAILED',
        self::TRACK_UNSUBSCRIBED => 'TRACK_UNSUBSCRIBED',
        self::TRACK_PUBLISHED_UPDATE => 'TRACK_PUBLISHED_UPDATE',
        self::TRACK_MUTED => 'TRACK_MUTED',
        self::TRACK_UNMUTED => 'TRACK_UNMUTED',
        self::TRACK_PUBLISH_STATS => 'TRACK_PUBLISH_STATS',
        self::TRACK_SUBSCRIBE_STATS => 'TRACK_SUBSCRIBE_STATS',
        self::PARTICIPANT_ACTIVE => 'PARTICIPANT_ACTIVE',
        self::PARTICIPANT_RESUMED => 'PARTICIPANT_RESUMED',
        self::EGRESS_STARTED => 'EGRESS_STARTED',
        self::EGRESS_ENDED => 'EGRESS_ENDED',
        self::EGRESS_UPDATED => 'EGRESS_UPDATED',
        self::TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY => 'TRACK_MAX_SUBSCRIBED_VIDEO_QUALITY',
        self::RECONNECTED => 'RECONNECTED',
        self::INGRESS_CREATED => 'INGRESS_CREATED',
        self::INGRESS_DELETED => 'INGRESS_DELETED',
        self::INGRESS_STARTED => 'INGRESS_STARTED',
        self::INGRESS_ENDED => 'INGRESS_ENDED',
        self::INGRESS_UPDATED => 'INGRESS_UPDATED',
        self::SIP_INBOUND_TRUNK_CREATED => 'SIP_INBOUND_TRUNK_CREATED',
        self::SIP_INBOUND_TRUNK_DELETED => 'SIP_INBOUND_TRUNK_DELETED',
        self::SIP_OUTBOUND_TRUNK_CREATED => 'SIP_OUTBOUND_TRUNK_CREATED',
        self::SIP_OUTBOUND_TRUNK_DELETED => 'SIP_OUTBOUND_TRUNK_DELETED',
        self::SIP_DISPATCH_RULE_CREATED => 'SIP_DISPATCH_RULE_CREATED',
        self::SIP_DISPATCH_RULE_DELETED => 'SIP_DISPATCH_RULE_DELETED',
        self::SIP_PARTICIPANT_CREATED => 'SIP_PARTICIPANT_CREATED',
        self::SIP_CALL_INCOMING => 'SIP_CALL_INCOMING',
        self::SIP_CALL_STARTED => 'SIP_CALL_STARTED',
        self::SIP_CALL_ENDED => 'SIP_CALL_ENDED',
        self::SIP_TRANSFER_REQUESTED => 'SIP_TRANSFER_REQUESTED',
        self::SIP_TRANSFER_COMPLETE => 'SIP_TRANSFER_COMPLETE',
        self::SIP_CALL_UPDATE => 'SIP_CALL_UPDATE',
        self::REPORT => 'REPORT',
        self::API_CALL => 'API_CALL',
        self::WEBHOOK => 'WEBHOOK',
    ];

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

