<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: livekit_sip.proto

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.TransferSIPParticipantRequest</code>
 */
class TransferSIPParticipantRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string participant_identity = 1;</code>
     */
    protected $participant_identity = '';
    /**
     * Generated from protobuf field <code>string room_name = 2;</code>
     */
    protected $room_name = '';
    /**
     * Generated from protobuf field <code>string transfer_to = 3;</code>
     */
    protected $transfer_to = '';
    /**
     * Optionally play dialtone to the SIP participant as an audible indicator of being transferred
     *
     * Generated from protobuf field <code>bool play_dialtone = 4;</code>
     */
    protected $play_dialtone = false;
    /**
     * Add the following headers to the REFER SIP request.
     *
     * Generated from protobuf field <code>map<string, string> headers = 5;</code>
     */
    private $headers;
    /**
     * Max time for the transfer destination to answer the call.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration ringing_timeout = 6;</code>
     */
    protected $ringing_timeout = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $participant_identity
     *     @type string $room_name
     *     @type string $transfer_to
     *     @type bool $play_dialtone
     *           Optionally play dialtone to the SIP participant as an audible indicator of being transferred
     *     @type array|\Google\Protobuf\Internal\MapField $headers
     *           Add the following headers to the REFER SIP request.
     *     @type \Google\Protobuf\Duration $ringing_timeout
     *           Max time for the transfer destination to answer the call.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitSip::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string transfer_to = 3;</code>
     * @return string
     */
    public function getTransferTo()
    {
        return $this->transfer_to;
    }

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

        return $this;
    }

    /**
     * Optionally play dialtone to the SIP participant as an audible indicator of being transferred
     *
     * Generated from protobuf field <code>bool play_dialtone = 4;</code>
     * @return bool
     */
    public function getPlayDialtone()
    {
        return $this->play_dialtone;
    }

    /**
     * Optionally play dialtone to the SIP participant as an audible indicator of being transferred
     *
     * Generated from protobuf field <code>bool play_dialtone = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setPlayDialtone($var)
    {
        GPBUtil::checkBool($var);
        $this->play_dialtone = $var;

        return $this;
    }

    /**
     * Add the following headers to the REFER SIP request.
     *
     * Generated from protobuf field <code>map<string, string> headers = 5;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getHeaders()
    {
        return $this->headers;
    }

    /**
     * Add the following headers to the REFER SIP request.
     *
     * Generated from protobuf field <code>map<string, string> headers = 5;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setHeaders($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->headers = $arr;

        return $this;
    }

    /**
     * Max time for the transfer destination to answer the call.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration ringing_timeout = 6;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getRingingTimeout()
    {
        return $this->ringing_timeout;
    }

    public function hasRingingTimeout()
    {
        return isset($this->ringing_timeout);
    }

    public function clearRingingTimeout()
    {
        unset($this->ringing_timeout);
    }

    /**
     * Max time for the transfer destination to answer the call.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration ringing_timeout = 6;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setRingingTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->ringing_timeout = $var;

        return $this;
    }

}

