<?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.ADVKeyIndexList</code>
 */
class ADVKeyIndexList extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 rawId = 1;</code>
     */
    protected $rawId = null;
    /**
     * Generated from protobuf field <code>optional uint64 timestamp = 2;</code>
     */
    protected $timestamp = null;
    /**
     * Generated from protobuf field <code>optional uint32 currentIndex = 3;</code>
     */
    protected $currentIndex = null;
    /**
     * Generated from protobuf field <code>repeated uint32 validIndexes = 4 [packed = true];</code>
     */
    private $validIndexes;
    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType accountType = 5;</code>
     */
    protected $accountType = null;

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

    /**
     * Generated from protobuf field <code>optional uint32 rawId = 1;</code>
     * @return int
     */
    public function getRawId()
    {
        return isset($this->rawId) ? $this->rawId : 0;
    }

    public function hasRawId()
    {
        return isset($this->rawId);
    }

    public function clearRawId()
    {
        unset($this->rawId);
    }

    /**
     * Generated from protobuf field <code>optional uint32 rawId = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setRawId($var)
    {
        GPBUtil::checkUint32($var);
        $this->rawId = $var;

        return $this;
    }

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

    public function hasTimestamp()
    {
        return isset($this->timestamp);
    }

    public function clearTimestamp()
    {
        unset($this->timestamp);
    }

    /**
     * Generated from protobuf field <code>optional uint64 timestamp = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setTimestamp($var)
    {
        GPBUtil::checkUint64($var);
        $this->timestamp = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional uint32 currentIndex = 3;</code>
     * @return int
     */
    public function getCurrentIndex()
    {
        return isset($this->currentIndex) ? $this->currentIndex : 0;
    }

    public function hasCurrentIndex()
    {
        return isset($this->currentIndex);
    }

    public function clearCurrentIndex()
    {
        unset($this->currentIndex);
    }

    /**
     * Generated from protobuf field <code>optional uint32 currentIndex = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setCurrentIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->currentIndex = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated uint32 validIndexes = 4 [packed = true];</code>
     * @return RepeatedField<int>
     */
    public function getValidIndexes()
    {
        return $this->validIndexes;
    }

    /**
     * Generated from protobuf field <code>repeated uint32 validIndexes = 4 [packed = true];</code>
     * @param int[] $var
     * @return $this
     */
    public function setValidIndexes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::UINT32);
        $this->validIndexes = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType accountType = 5;</code>
     * @return int
     */
    public function getAccountType()
    {
        return isset($this->accountType) ? $this->accountType : 0;
    }

    public function hasAccountType()
    {
        return isset($this->accountType);
    }

    public function clearAccountType()
    {
        unset($this->accountType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType accountType = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setAccountType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\ADVEncryptionType::class);
        $this->accountType = $var;

        return $this;
    }

}

