<?php
 
 
 

namespace PhpWA\Protocol\Proto;

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




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


    protected $publicKey = null;
    


    protected $deviceType = null;
    


    protected $ref = null;

    










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

    



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

    public function hasPublicKey()
    {
        return isset($this->publicKey);
    }

    public function clearPublicKey()
    {
        unset($this->publicKey);
    }

    




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

        return $this;
    }

    



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

    public function hasDeviceType()
    {
        return isset($this->deviceType);
    }

    public function clearDeviceType()
    {
        unset($this->deviceType);
    }

    




    public function setDeviceType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\DeviceProps\PlatformType::class);
        $this->deviceType = $var;

        return $this;
    }

    



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

    public function hasRef()
    {
        return isset($this->ref);
    }

    public function clearRef()
    {
        unset($this->ref);
    }

    




    public function setRef($var)
    {
        GPBUtil::checkString($var, True);
        $this->ref = $var;

        return $this;
    }

}

