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

namespace Livekit;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Generated from protobuf message <code>livekit.AudioRoute</code>
 */
class AudioRoute extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.livekit.AudioChannel channel = 4;</code>
     */
    protected $channel = 0;
    protected $match;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $track_id
     *     @type string $participant_identity
     *     @type int $participant_kind
     *     @type int $channel
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitEgress::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>string track_id = 1 [(.logger.name) = "trackID"];</code>
     * @return string
     */
    public function getTrackId()
    {
        return $this->readOneof(1);
    }

    public function hasTrackId()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>string track_id = 1 [(.logger.name) = "trackID"];</code>
     * @param string $var
     * @return $this
     */
    public function setTrackId($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>string participant_identity = 2;</code>
     * @return string
     */
    public function getParticipantIdentity()
    {
        return $this->readOneof(2);
    }

    public function hasParticipantIdentity()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>string participant_identity = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.ParticipantInfo.Kind participant_kind = 3;</code>
     * @return int
     */
    public function getParticipantKind()
    {
        return $this->readOneof(3);
    }

    public function hasParticipantKind()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>.livekit.ParticipantInfo.Kind participant_kind = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setParticipantKind($var)
    {
        GPBUtil::checkEnum($var, \Livekit\ParticipantInfo\Kind::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.livekit.AudioChannel channel = 4;</code>
     * @return int
     */
    public function getChannel()
    {
        return $this->channel;
    }

    /**
     * Generated from protobuf field <code>.livekit.AudioChannel channel = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setChannel($var)
    {
        GPBUtil::checkEnum($var, \Livekit\AudioChannel::class);
        $this->channel = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getMatch()
    {
        return $this->whichOneof("match");
    }

}

