<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




class SessionStructure extends \Google\Protobuf\Internal\Message
{
    


    protected $sessionVersion = null;
    


    protected $localIdentityPublic = null;
    


    protected $remoteIdentityPublic = null;
    


    protected $rootKey = null;
    


    protected $previousCounter = null;
    


    protected $senderChain = null;
    


    private $receiverChains;
    


    protected $pendingKeyExchange = null;
    


    protected $pendingPreKey = null;
    


    protected $remoteRegistrationId = null;
    


    protected $localRegistrationId = null;
    


    protected $needsRefresh = null;
    


    protected $aliceBaseKey = null;

    




















    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    



    public function getSessionVersion()
    {
        return isset($this->sessionVersion) ? $this->sessionVersion : 0;
    }

    public function hasSessionVersion()
    {
        return isset($this->sessionVersion);
    }

    public function clearSessionVersion()
    {
        unset($this->sessionVersion);
    }

    




    public function setSessionVersion($var)
    {
        GPBUtil::checkUint32($var);
        $this->sessionVersion = $var;

        return $this;
    }

    



    public function getLocalIdentityPublic()
    {
        return isset($this->localIdentityPublic) ? $this->localIdentityPublic : '';
    }

    public function hasLocalIdentityPublic()
    {
        return isset($this->localIdentityPublic);
    }

    public function clearLocalIdentityPublic()
    {
        unset($this->localIdentityPublic);
    }

    




    public function setLocalIdentityPublic($var)
    {
        GPBUtil::checkString($var, False);
        $this->localIdentityPublic = $var;

        return $this;
    }

    



    public function getRemoteIdentityPublic()
    {
        return isset($this->remoteIdentityPublic) ? $this->remoteIdentityPublic : '';
    }

    public function hasRemoteIdentityPublic()
    {
        return isset($this->remoteIdentityPublic);
    }

    public function clearRemoteIdentityPublic()
    {
        unset($this->remoteIdentityPublic);
    }

    




    public function setRemoteIdentityPublic($var)
    {
        GPBUtil::checkString($var, False);
        $this->remoteIdentityPublic = $var;

        return $this;
    }

    



    public function getRootKey()
    {
        return isset($this->rootKey) ? $this->rootKey : '';
    }

    public function hasRootKey()
    {
        return isset($this->rootKey);
    }

    public function clearRootKey()
    {
        unset($this->rootKey);
    }

    




    public function setRootKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->rootKey = $var;

        return $this;
    }

    



    public function getPreviousCounter()
    {
        return isset($this->previousCounter) ? $this->previousCounter : 0;
    }

    public function hasPreviousCounter()
    {
        return isset($this->previousCounter);
    }

    public function clearPreviousCounter()
    {
        unset($this->previousCounter);
    }

    




    public function setPreviousCounter($var)
    {
        GPBUtil::checkUint32($var);
        $this->previousCounter = $var;

        return $this;
    }

    



    public function getSenderChain()
    {
        return $this->senderChain;
    }

    public function hasSenderChain()
    {
        return isset($this->senderChain);
    }

    public function clearSenderChain()
    {
        unset($this->senderChain);
    }

    




    public function setSenderChain($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SessionStructure\Chain::class);
        $this->senderChain = $var;

        return $this;
    }

    



    public function getReceiverChains()
    {
        return $this->receiverChains;
    }

    




    public function setReceiverChains($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\SessionStructure\Chain::class);
        $this->receiverChains = $arr;

        return $this;
    }

    



    public function getPendingKeyExchange()
    {
        return $this->pendingKeyExchange;
    }

    public function hasPendingKeyExchange()
    {
        return isset($this->pendingKeyExchange);
    }

    public function clearPendingKeyExchange()
    {
        unset($this->pendingKeyExchange);
    }

    




    public function setPendingKeyExchange($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SessionStructure\PendingKeyExchange::class);
        $this->pendingKeyExchange = $var;

        return $this;
    }

    



    public function getPendingPreKey()
    {
        return $this->pendingPreKey;
    }

    public function hasPendingPreKey()
    {
        return isset($this->pendingPreKey);
    }

    public function clearPendingPreKey()
    {
        unset($this->pendingPreKey);
    }

    




    public function setPendingPreKey($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SessionStructure\PendingPreKey::class);
        $this->pendingPreKey = $var;

        return $this;
    }

    



    public function getRemoteRegistrationId()
    {
        return isset($this->remoteRegistrationId) ? $this->remoteRegistrationId : 0;
    }

    public function hasRemoteRegistrationId()
    {
        return isset($this->remoteRegistrationId);
    }

    public function clearRemoteRegistrationId()
    {
        unset($this->remoteRegistrationId);
    }

    




    public function setRemoteRegistrationId($var)
    {
        GPBUtil::checkUint32($var);
        $this->remoteRegistrationId = $var;

        return $this;
    }

    



    public function getLocalRegistrationId()
    {
        return isset($this->localRegistrationId) ? $this->localRegistrationId : 0;
    }

    public function hasLocalRegistrationId()
    {
        return isset($this->localRegistrationId);
    }

    public function clearLocalRegistrationId()
    {
        unset($this->localRegistrationId);
    }

    




    public function setLocalRegistrationId($var)
    {
        GPBUtil::checkUint32($var);
        $this->localRegistrationId = $var;

        return $this;
    }

    



    public function getNeedsRefresh()
    {
        return isset($this->needsRefresh) ? $this->needsRefresh : false;
    }

    public function hasNeedsRefresh()
    {
        return isset($this->needsRefresh);
    }

    public function clearNeedsRefresh()
    {
        unset($this->needsRefresh);
    }

    




    public function setNeedsRefresh($var)
    {
        GPBUtil::checkBool($var);
        $this->needsRefresh = $var;

        return $this;
    }

    



    public function getAliceBaseKey()
    {
        return isset($this->aliceBaseKey) ? $this->aliceBaseKey : '';
    }

    public function hasAliceBaseKey()
    {
        return isset($this->aliceBaseKey);
    }

    public function clearAliceBaseKey()
    {
        unset($this->aliceBaseKey);
    }

    




    public function setAliceBaseKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->aliceBaseKey = $var;

        return $this;
    }

}

