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

namespace PhpWA\Protocol\Proto\SyncActionValue;

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

/**
 * Generated from protobuf message <code>proto.SyncActionValue.MarkChatAsReadAction</code>
 */
class MarkChatAsReadAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bool read = 1;</code>
     */
    protected $read = null;
    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.SyncActionMessageRange messageRange = 2;</code>
     */
    protected $messageRange = null;

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

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

    public function hasRead()
    {
        return isset($this->read);
    }

    public function clearRead()
    {
        unset($this->read);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.SyncActionMessageRange messageRange = 2;</code>
     * @return \PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessageRange|null
     */
    public function getMessageRange()
    {
        return $this->messageRange;
    }

    public function hasMessageRange()
    {
        return isset($this->messageRange);
    }

    public function clearMessageRange()
    {
        unset($this->messageRange);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SyncActionValue.SyncActionMessageRange messageRange = 2;</code>
     * @param \PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessageRange $var
     * @return $this
     */
    public function setMessageRange($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessageRange::class);
        $this->messageRange = $var;

        return $this;
    }

}

