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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.DataTrackInfo</code>
 */
class DataTrackInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Client-assigned, 16-bit identifier that will be attached to packets sent by the publisher.
     *
     * Generated from protobuf field <code>uint32 pub_handle = 1;</code>
     */
    protected $pub_handle = 0;
    /**
     * Server-assigned track identifier.
     *
     * Generated from protobuf field <code>string sid = 2;</code>
     */
    protected $sid = '';
    /**
     * Human-readable identifier (e.g., `geoLocation`, `servoPosition.x`, etc.), unique per publisher.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     */
    protected $name = '';
    /**
     * Method used for end-to-end encryption (E2EE) on packet payloads.
     *
     * Generated from protobuf field <code>.livekit.Encryption.Type encryption = 4;</code>
     */
    protected $encryption = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $pub_handle
     *           Client-assigned, 16-bit identifier that will be attached to packets sent by the publisher.
     *     @type string $sid
     *           Server-assigned track identifier.
     *     @type string $name
     *           Human-readable identifier (e.g., `geoLocation`, `servoPosition.x`, etc.), unique per publisher.
     *     @type int $encryption
     *           Method used for end-to-end encryption (E2EE) on packet payloads.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * Client-assigned, 16-bit identifier that will be attached to packets sent by the publisher.
     *
     * Generated from protobuf field <code>uint32 pub_handle = 1;</code>
     * @return int
     */
    public function getPubHandle()
    {
        return $this->pub_handle;
    }

    /**
     * Client-assigned, 16-bit identifier that will be attached to packets sent by the publisher.
     *
     * Generated from protobuf field <code>uint32 pub_handle = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPubHandle($var)
    {
        GPBUtil::checkUint32($var);
        $this->pub_handle = $var;

        return $this;
    }

    /**
     * Server-assigned track identifier.
     *
     * Generated from protobuf field <code>string sid = 2;</code>
     * @return string
     */
    public function getSid()
    {
        return $this->sid;
    }

    /**
     * Server-assigned track identifier.
     *
     * Generated from protobuf field <code>string sid = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setSid($var)
    {
        GPBUtil::checkString($var, True);
        $this->sid = $var;

        return $this;
    }

    /**
     * Human-readable identifier (e.g., `geoLocation`, `servoPosition.x`, etc.), unique per publisher.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Human-readable identifier (e.g., `geoLocation`, `servoPosition.x`, etc.), unique per publisher.
     *
     * Generated from protobuf field <code>string name = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Method used for end-to-end encryption (E2EE) on packet payloads.
     *
     * Generated from protobuf field <code>.livekit.Encryption.Type encryption = 4;</code>
     * @return int
     */
    public function getEncryption()
    {
        return $this->encryption;
    }

    /**
     * Method used for end-to-end encryption (E2EE) on packet payloads.
     *
     * Generated from protobuf field <code>.livekit.Encryption.Type encryption = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setEncryption($var)
    {
        GPBUtil::checkEnum($var, \Livekit\Encryption\Type::class);
        $this->encryption = $var;

        return $this;
    }

}

