<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $version = null;
    


    private $records;
    


    protected $mac = null;
    


    protected $keyId = 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 getRecords()
    {
        return $this->records;
    }

    




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

        return $this;
    }

    



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

    public function hasMac()
    {
        return isset($this->mac);
    }

    public function clearMac()
    {
        unset($this->mac);
    }

    




    public function setMac($var)
    {
        GPBUtil::checkString($var, False);
        $this->mac = $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;
    }

}

