<?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.ArchiveChatAction</code>
 */
class ArchiveChatAction extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bool archived = 1;</code>
     */
    protected $archived = 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 $archived
     *     @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 archived = 1;</code>
     * @return bool
     */
    public function getArchived()
    {
        return isset($this->archived) ? $this->archived : false;
    }

    public function hasArchived()
    {
        return isset($this->archived);
    }

    public function clearArchived()
    {
        unset($this->archived);
    }

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

}

