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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.AppStateSyncKeyFingerprint</code>
 */
class AppStateSyncKeyFingerprint extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 rawId = 1;</code>
     */
    protected $rawId = null;
    /**
     * Generated from protobuf field <code>optional uint32 currentIndex = 2;</code>
     */
    protected $currentIndex = null;
    /**
     * Generated from protobuf field <code>repeated uint32 deviceIndexes = 3 [packed = true];</code>
     */
    private $deviceIndexes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $rawId
     *     @type int $currentIndex
     *     @type int[] $deviceIndexes
     * }
     */
    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 uint32 currentIndex = 2;</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 = 2;</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 deviceIndexes = 3 [packed = true];</code>
     * @return RepeatedField<int>
     */
    public function getDeviceIndexes()
    {
        return $this->deviceIndexes;
    }

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

        return $this;
    }

}

