<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




class CallLogRecord extends \Google\Protobuf\Internal\Message
{
    


    protected $callResult = null;
    


    protected $isDndMode = null;
    


    protected $silenceReason = null;
    


    protected $duration = null;
    


    protected $startTime = null;
    


    protected $isIncoming = null;
    


    protected $isVideo = null;
    


    protected $isCallLink = null;
    


    protected $callLinkToken = null;
    


    protected $scheduledCallId = null;
    


    protected $callId = null;
    


    protected $callCreatorJid = null;
    


    protected $groupJid = null;
    


    private $participants;
    


    protected $callType = null;

    






















    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getCallResult()
    {
        return isset($this->callResult) ? $this->callResult : 0;
    }

    public function hasCallResult()
    {
        return isset($this->callResult);
    }

    public function clearCallResult()
    {
        unset($this->callResult);
    }

    




    public function setCallResult($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\CallLogRecord\CallResult::class);
        $this->callResult = $var;

        return $this;
    }

    



    public function getIsDndMode()
    {
        return isset($this->isDndMode) ? $this->isDndMode : false;
    }

    public function hasIsDndMode()
    {
        return isset($this->isDndMode);
    }

    public function clearIsDndMode()
    {
        unset($this->isDndMode);
    }

    




    public function setIsDndMode($var)
    {
        GPBUtil::checkBool($var);
        $this->isDndMode = $var;

        return $this;
    }

    



    public function getSilenceReason()
    {
        return isset($this->silenceReason) ? $this->silenceReason : 0;
    }

    public function hasSilenceReason()
    {
        return isset($this->silenceReason);
    }

    public function clearSilenceReason()
    {
        unset($this->silenceReason);
    }

    




    public function setSilenceReason($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\CallLogRecord\SilenceReason::class);
        $this->silenceReason = $var;

        return $this;
    }

    



    public function getDuration()
    {
        return isset($this->duration) ? $this->duration : 0;
    }

    public function hasDuration()
    {
        return isset($this->duration);
    }

    public function clearDuration()
    {
        unset($this->duration);
    }

    




    public function setDuration($var)
    {
        GPBUtil::checkInt64($var);
        $this->duration = $var;

        return $this;
    }

    



    public function getStartTime()
    {
        return isset($this->startTime) ? $this->startTime : 0;
    }

    public function hasStartTime()
    {
        return isset($this->startTime);
    }

    public function clearStartTime()
    {
        unset($this->startTime);
    }

    




    public function setStartTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->startTime = $var;

        return $this;
    }

    



    public function getIsIncoming()
    {
        return isset($this->isIncoming) ? $this->isIncoming : false;
    }

    public function hasIsIncoming()
    {
        return isset($this->isIncoming);
    }

    public function clearIsIncoming()
    {
        unset($this->isIncoming);
    }

    




    public function setIsIncoming($var)
    {
        GPBUtil::checkBool($var);
        $this->isIncoming = $var;

        return $this;
    }

    



    public function getIsVideo()
    {
        return isset($this->isVideo) ? $this->isVideo : false;
    }

    public function hasIsVideo()
    {
        return isset($this->isVideo);
    }

    public function clearIsVideo()
    {
        unset($this->isVideo);
    }

    




    public function setIsVideo($var)
    {
        GPBUtil::checkBool($var);
        $this->isVideo = $var;

        return $this;
    }

    



    public function getIsCallLink()
    {
        return isset($this->isCallLink) ? $this->isCallLink : false;
    }

    public function hasIsCallLink()
    {
        return isset($this->isCallLink);
    }

    public function clearIsCallLink()
    {
        unset($this->isCallLink);
    }

    




    public function setIsCallLink($var)
    {
        GPBUtil::checkBool($var);
        $this->isCallLink = $var;

        return $this;
    }

    



    public function getCallLinkToken()
    {
        return isset($this->callLinkToken) ? $this->callLinkToken : '';
    }

    public function hasCallLinkToken()
    {
        return isset($this->callLinkToken);
    }

    public function clearCallLinkToken()
    {
        unset($this->callLinkToken);
    }

    




    public function setCallLinkToken($var)
    {
        GPBUtil::checkString($var, True);
        $this->callLinkToken = $var;

        return $this;
    }

    



    public function getScheduledCallId()
    {
        return isset($this->scheduledCallId) ? $this->scheduledCallId : '';
    }

    public function hasScheduledCallId()
    {
        return isset($this->scheduledCallId);
    }

    public function clearScheduledCallId()
    {
        unset($this->scheduledCallId);
    }

    




    public function setScheduledCallId($var)
    {
        GPBUtil::checkString($var, True);
        $this->scheduledCallId = $var;

        return $this;
    }

    



    public function getCallId()
    {
        return isset($this->callId) ? $this->callId : '';
    }

    public function hasCallId()
    {
        return isset($this->callId);
    }

    public function clearCallId()
    {
        unset($this->callId);
    }

    




    public function setCallId($var)
    {
        GPBUtil::checkString($var, True);
        $this->callId = $var;

        return $this;
    }

    



    public function getCallCreatorJid()
    {
        return isset($this->callCreatorJid) ? $this->callCreatorJid : '';
    }

    public function hasCallCreatorJid()
    {
        return isset($this->callCreatorJid);
    }

    public function clearCallCreatorJid()
    {
        unset($this->callCreatorJid);
    }

    




    public function setCallCreatorJid($var)
    {
        GPBUtil::checkString($var, True);
        $this->callCreatorJid = $var;

        return $this;
    }

    



    public function getGroupJid()
    {
        return isset($this->groupJid) ? $this->groupJid : '';
    }

    public function hasGroupJid()
    {
        return isset($this->groupJid);
    }

    public function clearGroupJid()
    {
        unset($this->groupJid);
    }

    




    public function setGroupJid($var)
    {
        GPBUtil::checkString($var, True);
        $this->groupJid = $var;

        return $this;
    }

    



    public function getParticipants()
    {
        return $this->participants;
    }

    




    public function setParticipants($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\CallLogRecord\ParticipantInfo::class);
        $this->participants = $arr;

        return $this;
    }

    



    public function getCallType()
    {
        return isset($this->callType) ? $this->callType : 0;
    }

    public function hasCallType()
    {
        return isset($this->callType);
    }

    public function clearCallType()
    {
        unset($this->callType);
    }

    




    public function setCallType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\CallLogRecord\CallType::class);
        $this->callType = $var;

        return $this;
    }

}

