<?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.SyncActionMessageRange</code>
 */
class SyncActionMessageRange extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional int64 lastMessageTimestamp = 1;</code>
     */
    protected $lastMessageTimestamp = null;
    /**
     * Generated from protobuf field <code>optional int64 lastSystemMessageTimestamp = 2;</code>
     */
    protected $lastSystemMessageTimestamp = null;
    /**
     * Generated from protobuf field <code>repeated .proto.SyncActionValue.SyncActionMessage messages = 3;</code>
     */
    private $messages;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int|string $lastMessageTimestamp
     *     @type int|string $lastSystemMessageTimestamp
     *     @type \PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessage[] $messages
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasLastMessageTimestamp()
    {
        return isset($this->lastMessageTimestamp);
    }

    public function clearLastMessageTimestamp()
    {
        unset($this->lastMessageTimestamp);
    }

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

        return $this;
    }

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

    public function hasLastSystemMessageTimestamp()
    {
        return isset($this->lastSystemMessageTimestamp);
    }

    public function clearLastSystemMessageTimestamp()
    {
        unset($this->lastSystemMessageTimestamp);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SyncActionValue.SyncActionMessage messages = 3;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessage>
     */
    public function getMessages()
    {
        return $this->messages;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SyncActionValue.SyncActionMessage messages = 3;</code>
     * @param \PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessage[] $var
     * @return $this
     */
    public function setMessages($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\SyncActionValue\SyncActionMessage::class);
        $this->messages = $arr;

        return $this;
    }

}

