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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.SessionDescription</code>
 */
class SessionDescription extends \Google\Protobuf\Internal\Message
{
    /**
     * "answer" | "offer" | "pranswer" | "rollback"
     *
     * Generated from protobuf field <code>string type = 1;</code>
     */
    protected $type = '';
    /**
     * Generated from protobuf field <code>string sdp = 2;</code>
     */
    protected $sdp = '';
    /**
     * Generated from protobuf field <code>uint32 id = 3;</code>
     */
    protected $id = 0;
    /**
     * Generated from protobuf field <code>map<string, string> mid_to_track_id = 4 [(.logger.name) = "midToTrackID"];</code>
     */
    private $mid_to_track_id;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $type
     *           "answer" | "offer" | "pranswer" | "rollback"
     *     @type string $sdp
     *     @type int $id
     *     @type array|\Google\Protobuf\Internal\MapField $mid_to_track_id
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitRtc::initOnce();
        parent::__construct($data);
    }

    /**
     * "answer" | "offer" | "pranswer" | "rollback"
     *
     * Generated from protobuf field <code>string type = 1;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * "answer" | "offer" | "pranswer" | "rollback"
     *
     * Generated from protobuf field <code>string type = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 id = 3;</code>
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Generated from protobuf field <code>uint32 id = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkUint32($var);
        $this->id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>map<string, string> mid_to_track_id = 4 [(.logger.name) = "midToTrackID"];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getMidToTrackId()
    {
        return $this->mid_to_track_id;
    }

    /**
     * Generated from protobuf field <code>map<string, string> mid_to_track_id = 4 [(.logger.name) = "midToTrackID"];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setMidToTrackId($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->mid_to_track_id = $arr;

        return $this;
    }

}

