<?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.MessageKey</code>
 */
class MessageKey extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional string remoteJid = 1;</code>
     */
    protected $remoteJid = null;
    /**
     * Generated from protobuf field <code>optional bool fromMe = 2;</code>
     */
    protected $fromMe = null;
    /**
     * Generated from protobuf field <code>optional string id = 3;</code>
     */
    protected $id = null;
    /**
     * Generated from protobuf field <code>optional string participant = 4;</code>
     */
    protected $participant = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $remoteJid
     *     @type bool $fromMe
     *     @type string $id
     *     @type string $participant
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasRemoteJid()
    {
        return isset($this->remoteJid);
    }

    public function clearRemoteJid()
    {
        unset($this->remoteJid);
    }

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

        return $this;
    }

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

    public function hasFromMe()
    {
        return isset($this->fromMe);
    }

    public function clearFromMe()
    {
        unset($this->fromMe);
    }

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

        return $this;
    }

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

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

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

        return $this;
    }

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

    public function hasParticipant()
    {
        return isset($this->participant);
    }

    public function clearParticipant()
    {
        unset($this->participant);
    }

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

        return $this;
    }

}

