<?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.DeviceListMetadata</code>
 */
class DeviceListMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes senderKeyHash = 1;</code>
     */
    protected $senderKeyHash = null;
    /**
     * Generated from protobuf field <code>optional uint64 senderTimestamp = 2;</code>
     */
    protected $senderTimestamp = null;
    /**
     * Generated from protobuf field <code>repeated uint32 senderKeyIndexes = 3 [packed = true];</code>
     */
    private $senderKeyIndexes;
    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType senderAccountType = 4;</code>
     */
    protected $senderAccountType = null;
    /**
     * Generated from protobuf field <code>optional .proto.ADVEncryptionType receiverAccountType = 5;</code>
     */
    protected $receiverAccountType = null;
    /**
     * Generated from protobuf field <code>optional bytes recipientKeyHash = 8;</code>
     */
    protected $recipientKeyHash = null;
    /**
     * Generated from protobuf field <code>optional uint64 recipientTimestamp = 9;</code>
     */
    protected $recipientTimestamp = null;
    /**
     * Generated from protobuf field <code>repeated uint32 recipientKeyIndexes = 10 [packed = true];</code>
     */
    private $recipientKeyIndexes;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $senderKeyHash
     *     @type int|string $senderTimestamp
     *     @type int[] $senderKeyIndexes
     *     @type int $senderAccountType
     *     @type int $receiverAccountType
     *     @type string $recipientKeyHash
     *     @type int|string $recipientTimestamp
     *     @type int[] $recipientKeyIndexes
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional bytes senderKeyHash = 1;</code>
     * @return string
     */
    public function getSenderKeyHash()
    {
        return isset($this->senderKeyHash) ? $this->senderKeyHash : '';
    }

    public function hasSenderKeyHash()
    {
        return isset($this->senderKeyHash);
    }

    public function clearSenderKeyHash()
    {
        unset($this->senderKeyHash);
    }

    /**
     * Generated from protobuf field <code>optional bytes senderKeyHash = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setSenderKeyHash($var)
    {
        GPBUtil::checkString($var, False);
        $this->senderKeyHash = $var;

        return $this;
    }

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

    public function hasSenderTimestamp()
    {
        return isset($this->senderTimestamp);
    }

    public function clearSenderTimestamp()
    {
        unset($this->senderTimestamp);
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

    public function hasSenderAccountType()
    {
        return isset($this->senderAccountType);
    }

    public function clearSenderAccountType()
    {
        unset($this->senderAccountType);
    }

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

        return $this;
    }

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

    public function hasReceiverAccountType()
    {
        return isset($this->receiverAccountType);
    }

    public function clearReceiverAccountType()
    {
        unset($this->receiverAccountType);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional bytes recipientKeyHash = 8;</code>
     * @return string
     */
    public function getRecipientKeyHash()
    {
        return isset($this->recipientKeyHash) ? $this->recipientKeyHash : '';
    }

    public function hasRecipientKeyHash()
    {
        return isset($this->recipientKeyHash);
    }

    public function clearRecipientKeyHash()
    {
        unset($this->recipientKeyHash);
    }

    /**
     * Generated from protobuf field <code>optional bytes recipientKeyHash = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setRecipientKeyHash($var)
    {
        GPBUtil::checkString($var, False);
        $this->recipientKeyHash = $var;

        return $this;
    }

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

    public function hasRecipientTimestamp()
    {
        return isset($this->recipientTimestamp);
    }

    public function clearRecipientTimestamp()
    {
        unset($this->recipientTimestamp);
    }

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

        return $this;
    }

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

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

        return $this;
    }

}

