<?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.ADVDeviceIdentity</code>
 */
class ADVDeviceIdentity 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 keyIndex = 3;</code>
     */
    protected $keyIndex = null;
    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType accountType = 4;</code>
     */
    protected $accountType = null;
    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType deviceType = 5;</code>
     */
    protected $deviceType = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $rawId
     *     @type int|string $timestamp
     *     @type int $keyIndex
     *     @type int $accountType
     *     @type int $deviceType
     * }
     */
    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 keyIndex = 3;</code>
     * @return int
     */
    public function getKeyIndex()
    {
        return isset($this->keyIndex) ? $this->keyIndex : 0;
    }

    public function hasKeyIndex()
    {
        return isset($this->keyIndex);
    }

    public function clearKeyIndex()
    {
        unset($this->keyIndex);
    }

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

        return $this;
    }

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

        return $this;
    }

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

    public function hasDeviceType()
    {
        return isset($this->deviceType);
    }

    public function clearDeviceType()
    {
        unset($this->deviceType);
    }

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

        return $this;
    }

}

