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

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.CallLogRecord</code>
 */
class CallLogRecord extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.CallResult callResult = 1;</code>
     */
    protected $callResult = null;
    /**
     * Generated from protobuf field <code>optional bool isDndMode = 2;</code>
     */
    protected $isDndMode = null;
    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.SilenceReason silenceReason = 3;</code>
     */
    protected $silenceReason = null;
    /**
     * Generated from protobuf field <code>optional int64 duration = 4;</code>
     */
    protected $duration = null;
    /**
     * Generated from protobuf field <code>optional int64 startTime = 5;</code>
     */
    protected $startTime = null;
    /**
     * Generated from protobuf field <code>optional bool isIncoming = 6;</code>
     */
    protected $isIncoming = null;
    /**
     * Generated from protobuf field <code>optional bool isVideo = 7;</code>
     */
    protected $isVideo = null;
    /**
     * Generated from protobuf field <code>optional bool isCallLink = 8;</code>
     */
    protected $isCallLink = null;
    /**
     * Generated from protobuf field <code>optional string callLinkToken = 9;</code>
     */
    protected $callLinkToken = null;
    /**
     * Generated from protobuf field <code>optional string scheduledCallId = 10;</code>
     */
    protected $scheduledCallId = null;
    /**
     * Generated from protobuf field <code>optional string callId = 11;</code>
     */
    protected $callId = null;
    /**
     * Generated from protobuf field <code>optional string callCreatorJid = 12;</code>
     */
    protected $callCreatorJid = null;
    /**
     * Generated from protobuf field <code>optional string groupJid = 13;</code>
     */
    protected $groupJid = null;
    /**
     * Generated from protobuf field <code>repeated .proto.CallLogRecord.ParticipantInfo participants = 14;</code>
     */
    private $participants;
    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.CallType callType = 15;</code>
     */
    protected $callType = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $callResult
     *     @type bool $isDndMode
     *     @type int $silenceReason
     *     @type int|string $duration
     *     @type int|string $startTime
     *     @type bool $isIncoming
     *     @type bool $isVideo
     *     @type bool $isCallLink
     *     @type string $callLinkToken
     *     @type string $scheduledCallId
     *     @type string $callId
     *     @type string $callCreatorJid
     *     @type string $groupJid
     *     @type \PhpWA\Protocol\Proto\CallLogRecord\ParticipantInfo[] $participants
     *     @type int $callType
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.CallResult callResult = 1;</code>
     * @return int
     */
    public function getCallResult()
    {
        return isset($this->callResult) ? $this->callResult : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.CallResult callResult = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setCallResult($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\CallLogRecord\CallResult::class);
        $this->callResult = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isDndMode = 2;</code>
     * @return bool
     */
    public function getIsDndMode()
    {
        return isset($this->isDndMode) ? $this->isDndMode : false;
    }

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

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

    /**
     * Generated from protobuf field <code>optional bool isDndMode = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsDndMode($var)
    {
        GPBUtil::checkBool($var);
        $this->isDndMode = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.SilenceReason silenceReason = 3;</code>
     * @return int
     */
    public function getSilenceReason()
    {
        return isset($this->silenceReason) ? $this->silenceReason : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.SilenceReason silenceReason = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setSilenceReason($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\CallLogRecord\SilenceReason::class);
        $this->silenceReason = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 duration = 4;</code>
     * @return int|string
     */
    public function getDuration()
    {
        return isset($this->duration) ? $this->duration : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional int64 duration = 4;</code>
     * @param int|string $var
     * @return $this
     */
    public function setDuration($var)
    {
        GPBUtil::checkInt64($var);
        $this->duration = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional int64 startTime = 5;</code>
     * @return int|string
     */
    public function getStartTime()
    {
        return isset($this->startTime) ? $this->startTime : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional int64 startTime = 5;</code>
     * @param int|string $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkInt64($var);
        $this->startTime = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isIncoming = 6;</code>
     * @return bool
     */
    public function getIsIncoming()
    {
        return isset($this->isIncoming) ? $this->isIncoming : false;
    }

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

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

    /**
     * Generated from protobuf field <code>optional bool isIncoming = 6;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsIncoming($var)
    {
        GPBUtil::checkBool($var);
        $this->isIncoming = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isVideo = 7;</code>
     * @return bool
     */
    public function getIsVideo()
    {
        return isset($this->isVideo) ? $this->isVideo : false;
    }

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

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

    /**
     * Generated from protobuf field <code>optional bool isVideo = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsVideo($var)
    {
        GPBUtil::checkBool($var);
        $this->isVideo = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bool isCallLink = 8;</code>
     * @return bool
     */
    public function getIsCallLink()
    {
        return isset($this->isCallLink) ? $this->isCallLink : false;
    }

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

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

    /**
     * Generated from protobuf field <code>optional bool isCallLink = 8;</code>
     * @param bool $var
     * @return $this
     */
    public function setIsCallLink($var)
    {
        GPBUtil::checkBool($var);
        $this->isCallLink = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string callLinkToken = 9;</code>
     * @return string
     */
    public function getCallLinkToken()
    {
        return isset($this->callLinkToken) ? $this->callLinkToken : '';
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string scheduledCallId = 10;</code>
     * @return string
     */
    public function getScheduledCallId()
    {
        return isset($this->scheduledCallId) ? $this->scheduledCallId : '';
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string callId = 11;</code>
     * @return string
     */
    public function getCallId()
    {
        return isset($this->callId) ? $this->callId : '';
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string callCreatorJid = 12;</code>
     * @return string
     */
    public function getCallCreatorJid()
    {
        return isset($this->callCreatorJid) ? $this->callCreatorJid : '';
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string groupJid = 13;</code>
     * @return string
     */
    public function getGroupJid()
    {
        return isset($this->groupJid) ? $this->groupJid : '';
    }

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

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.CallLogRecord.ParticipantInfo participants = 14;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\CallLogRecord\ParticipantInfo>
     */
    public function getParticipants()
    {
        return $this->participants;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.CallLogRecord.ParticipantInfo participants = 14;</code>
     * @param \PhpWA\Protocol\Proto\CallLogRecord\ParticipantInfo[] $var
     * @return $this
     */
    public function setParticipants($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\CallLogRecord\ParticipantInfo::class);
        $this->participants = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.CallType callType = 15;</code>
     * @return int
     */
    public function getCallType()
    {
        return isset($this->callType) ? $this->callType : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.CallLogRecord.CallType callType = 15;</code>
     * @param int $var
     * @return $this
     */
    public function setCallType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\CallLogRecord\CallType::class);
        $this->callType = $var;

        return $this;
    }

}

