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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.CallLogMessage</code>
 */
class CallLogMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bool isVideo = 1;</code>
     */
    protected $isVideo = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.CallLogMessage.CallOutcome callOutcome = 2;</code>
     */
    protected $callOutcome = null;
    /**
     * Generated from protobuf field <code>optional int64 durationSecs = 3;</code>
     */
    protected $durationSecs = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.CallLogMessage.CallType callType = 4;</code>
     */
    protected $callType = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Message.CallLogMessage.CallParticipant participants = 5;</code>
     */
    private $participants;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $isVideo
     *     @type int $callOutcome
     *     @type int|string $durationSecs
     *     @type int $callType
     *     @type \PhpWA\Protocol\Proto\Message\CallLogMessage\CallParticipant[] $participants
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.CallLogMessage.CallOutcome callOutcome = 2;</code>
     * @return int
     */
    public function getCallOutcome()
    {
        return isset($this->callOutcome) ? $this->callOutcome : 0;
    }

    public function hasCallOutcome()
    {
        return isset($this->callOutcome);
    }

    public function clearCallOutcome()
    {
        unset($this->callOutcome);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.CallLogMessage.CallOutcome callOutcome = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setCallOutcome($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\CallLogMessage\CallOutcome::class);
        $this->callOutcome = $var;

        return $this;
    }

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

    public function hasDurationSecs()
    {
        return isset($this->durationSecs);
    }

    public function clearDurationSecs()
    {
        unset($this->durationSecs);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.CallLogMessage.CallType callType = 4;</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.Message.CallLogMessage.CallType callType = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setCallType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\CallLogMessage\CallType::class);
        $this->callType = $var;

        return $this;
    }

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

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

        return $this;
    }

}

