<?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.EventResponse</code>
 */
class EventResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.MessageKey eventResponseMessageKey = 1;</code>
     */
    protected $eventResponseMessageKey = null;
    /**
     * Generated from protobuf field <code>optional int64 timestampMs = 2;</code>
     */
    protected $timestampMs = null;
    /**
     * Generated from protobuf field <code>optional .proto.Message.EventResponseMessage eventResponseMessage = 3;</code>
     */
    protected $eventResponseMessage = null;
    /**
     * Generated from protobuf field <code>optional bool unread = 4;</code>
     */
    protected $unread = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \PhpWA\Protocol\Proto\MessageKey $eventResponseMessageKey
     *     @type int|string $timestampMs
     *     @type \PhpWA\Protocol\Proto\Message\EventResponseMessage $eventResponseMessage
     *     @type bool $unread
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageKey eventResponseMessageKey = 1;</code>
     * @return \PhpWA\Protocol\Proto\MessageKey|null
     */
    public function getEventResponseMessageKey()
    {
        return $this->eventResponseMessageKey;
    }

    public function hasEventResponseMessageKey()
    {
        return isset($this->eventResponseMessageKey);
    }

    public function clearEventResponseMessageKey()
    {
        unset($this->eventResponseMessageKey);
    }

    /**
     * Generated from protobuf field <code>optional .proto.MessageKey eventResponseMessageKey = 1;</code>
     * @param \PhpWA\Protocol\Proto\MessageKey $var
     * @return $this
     */
    public function setEventResponseMessageKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\MessageKey::class);
        $this->eventResponseMessageKey = $var;

        return $this;
    }

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

    public function hasTimestampMs()
    {
        return isset($this->timestampMs);
    }

    public function clearTimestampMs()
    {
        unset($this->timestampMs);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.EventResponseMessage eventResponseMessage = 3;</code>
     * @return \PhpWA\Protocol\Proto\Message\EventResponseMessage|null
     */
    public function getEventResponseMessage()
    {
        return $this->eventResponseMessage;
    }

    public function hasEventResponseMessage()
    {
        return isset($this->eventResponseMessage);
    }

    public function clearEventResponseMessage()
    {
        unset($this->eventResponseMessage);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.EventResponseMessage eventResponseMessage = 3;</code>
     * @param \PhpWA\Protocol\Proto\Message\EventResponseMessage $var
     * @return $this
     */
    public function setEventResponseMessage($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\Message\EventResponseMessage::class);
        $this->eventResponseMessage = $var;

        return $this;
    }

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

    public function hasUnread()
    {
        return isset($this->unread);
    }

    public function clearUnread()
    {
        unset($this->unread);
    }

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

        return $this;
    }

}

