<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $ratchetKey = null;
    


    protected $counter = null;
    


    protected $previousCounter = null;
    


    protected $ciphertext = null;

    











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

    



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

    public function hasRatchetKey()
    {
        return isset($this->ratchetKey);
    }

    public function clearRatchetKey()
    {
        unset($this->ratchetKey);
    }

    




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

        return $this;
    }

    



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

    public function hasCounter()
    {
        return isset($this->counter);
    }

    public function clearCounter()
    {
        unset($this->counter);
    }

    




    public function setCounter($var)
    {
        GPBUtil::checkUint32($var);
        $this->counter = $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 getCiphertext()
    {
        return isset($this->ciphertext) ? $this->ciphertext : '';
    }

    public function hasCiphertext()
    {
        return isset($this->ciphertext);
    }

    public function clearCiphertext()
    {
        unset($this->ciphertext);
    }

    




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

        return $this;
    }

}

