<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: WAProto.proto

namespace PhpWA\Protocol\Proto;

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

/**
 * Generated from protobuf message <code>proto.CompanionEphemeralIdentity</code>
 */
class CompanionEphemeralIdentity extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes publicKey = 1;</code>
     */
    protected $publicKey = null;
    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.PlatformType deviceType = 2;</code>
     */
    protected $deviceType = null;
    /**
     * Generated from protobuf field <code>optional string ref = 3;</code>
     */
    protected $ref = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $publicKey
     *     @type int $deviceType
     *     @type string $ref
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional bytes publicKey = 1;</code>
     * @return string
     */
    public function getPublicKey()
    {
        return isset($this->publicKey) ? $this->publicKey : '';
    }

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

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

    /**
     * Generated from protobuf field <code>optional bytes publicKey = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setPublicKey($var)
    {
        GPBUtil::checkString($var, False);
        $this->publicKey = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.PlatformType deviceType = 2;</code>
     * @return int
     */
    public function getDeviceType()
    {
        return isset($this->deviceType) ? $this->deviceType : 0;
    }

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

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

    /**
     * Generated from protobuf field <code>optional .proto.DeviceProps.PlatformType deviceType = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setDeviceType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\DeviceProps\PlatformType::class);
        $this->deviceType = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional string ref = 3;</code>
     * @return string
     */
    public function getRef()
    {
        return isset($this->ref) ? $this->ref : '';
    }

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

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

    /**
     * Generated from protobuf field <code>optional string ref = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setRef($var)
    {
        GPBUtil::checkString($var, True);
        $this->ref = $var;

        return $this;
    }

}

