<?php
 
 
 

namespace PhpWA\Protocol\Proto\SessionStructure\Chain;

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




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


    protected $index = null;
    


    protected $cipherKey = null;
    


    protected $macKey = null;
    


    protected $iv = null;

    











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

    



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

    public function hasIndex()
    {
        return isset($this->index);
    }

    public function clearIndex()
    {
        unset($this->index);
    }

    




    public function setIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->index = $var;

        return $this;
    }

    



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

    public function hasCipherKey()
    {
        return isset($this->cipherKey);
    }

    public function clearCipherKey()
    {
        unset($this->cipherKey);
    }

    




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

        return $this;
    }

    



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

    public function hasMacKey()
    {
        return isset($this->macKey);
    }

    public function clearMacKey()
    {
        unset($this->macKey);
    }

    




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

        return $this;
    }

    



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

    public function hasIv()
    {
        return isset($this->iv);
    }

    public function clearIv()
    {
        unset($this->iv);
    }

    




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

        return $this;
    }

}

