<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $version = null;
    


    private $mutations;
    


    protected $externalMutations = null;
    


    protected $snapshotMac = null;
    


    protected $patchMac = null;
    


    protected $keyId = null;
    


    protected $exitCode = null;
    


    protected $deviceIndex = null;
    


    protected $clientDebugData = null;

    
















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

    



    public function getVersion()
    {
        return $this->version;
    }

    public function hasVersion()
    {
        return isset($this->version);
    }

    public function clearVersion()
    {
        unset($this->version);
    }

    




    public function setVersion($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\SyncdVersion::class);
        $this->version = $var;

        return $this;
    }

    



    public function getMutations()
    {
        return $this->mutations;
    }

    




    public function setMutations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\SyncdMutation::class);
        $this->mutations = $arr;

        return $this;
    }

    



    public function getExternalMutations()
    {
        return $this->externalMutations;
    }

    public function hasExternalMutations()
    {
        return isset($this->externalMutations);
    }

    public function clearExternalMutations()
    {
        unset($this->externalMutations);
    }

    




    public function setExternalMutations($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ExternalBlobReference::class);
        $this->externalMutations = $var;

        return $this;
    }

    



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

    public function hasSnapshotMac()
    {
        return isset($this->snapshotMac);
    }

    public function clearSnapshotMac()
    {
        unset($this->snapshotMac);
    }

    




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

        return $this;
    }

    



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

    public function hasPatchMac()
    {
        return isset($this->patchMac);
    }

    public function clearPatchMac()
    {
        unset($this->patchMac);
    }

    




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

        return $this;
    }

    



    public function getKeyId()
    {
        return $this->keyId;
    }

    public function hasKeyId()
    {
        return isset($this->keyId);
    }

    public function clearKeyId()
    {
        unset($this->keyId);
    }

    




    public function setKeyId($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\KeyId::class);
        $this->keyId = $var;

        return $this;
    }

    



    public function getExitCode()
    {
        return $this->exitCode;
    }

    public function hasExitCode()
    {
        return isset($this->exitCode);
    }

    public function clearExitCode()
    {
        unset($this->exitCode);
    }

    




    public function setExitCode($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\ExitCode::class);
        $this->exitCode = $var;

        return $this;
    }

    



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

    public function hasDeviceIndex()
    {
        return isset($this->deviceIndex);
    }

    public function clearDeviceIndex()
    {
        unset($this->deviceIndex);
    }

    




    public function setDeviceIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->deviceIndex = $var;

        return $this;
    }

    



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

    public function hasClientDebugData()
    {
        return isset($this->clientDebugData);
    }

    public function clearClientDebugData()
    {
        unset($this->clientDebugData);
    }

    




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

        return $this;
    }

}

