<?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.SenderKeyStateStructure</code>
 */
class SenderKeyStateStructure extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 senderKeyId = 1;</code>
     */
    protected $senderKeyId = null;
    /**
     * Generated from protobuf field <code>optional .proto.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;</code>
     */
    protected $senderChainKey = null;
    /**
     * Generated from protobuf field <code>optional .proto.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;</code>
     */
    protected $senderSigningKey = null;
    /**
     * Generated from protobuf field <code>repeated .proto.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;</code>
     */
    private $senderMessageKeys;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $senderKeyId
     *     @type \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderChainKey $senderChainKey
     *     @type \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderSigningKey $senderSigningKey
     *     @type \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderMessageKey[] $senderMessageKeys
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

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

    public function hasSenderKeyId()
    {
        return isset($this->senderKeyId);
    }

    public function clearSenderKeyId()
    {
        unset($this->senderKeyId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;</code>
     * @return \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderChainKey|null
     */
    public function getSenderChainKey()
    {
        return $this->senderChainKey;
    }

    public function hasSenderChainKey()
    {
        return isset($this->senderChainKey);
    }

    public function clearSenderChainKey()
    {
        unset($this->senderChainKey);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SenderKeyStateStructure.SenderChainKey senderChainKey = 2;</code>
     * @param \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderChainKey $var
     * @return $this
     */
    public function setSenderChainKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderChainKey::class);
        $this->senderChainKey = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;</code>
     * @return \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderSigningKey|null
     */
    public function getSenderSigningKey()
    {
        return $this->senderSigningKey;
    }

    public function hasSenderSigningKey()
    {
        return isset($this->senderSigningKey);
    }

    public function clearSenderSigningKey()
    {
        unset($this->senderSigningKey);
    }

    /**
     * Generated from protobuf field <code>optional .proto.SenderKeyStateStructure.SenderSigningKey senderSigningKey = 3;</code>
     * @param \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderSigningKey $var
     * @return $this
     */
    public function setSenderSigningKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderSigningKey::class);
        $this->senderSigningKey = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.SenderKeyStateStructure.SenderMessageKey senderMessageKeys = 4;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\SenderKeyStateStructure\SenderMessageKey>
     */
    public function getSenderMessageKeys()
    {
        return $this->senderMessageKeys;
    }

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

        return $this;
    }

}

