<?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.PrimaryEphemeralIdentity</code>
 */
class PrimaryEphemeralIdentity extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional bytes publicKey = 1;</code>
     */
    protected $publicKey = null;
    /**
     * Generated from protobuf field <code>optional bytes nonce = 2;</code>
     */
    protected $nonce = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $publicKey
     *     @type string $nonce
     * }
     */
    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 bytes nonce = 2;</code>
     * @return string
     */
    public function getNonce()
    {
        return isset($this->nonce) ? $this->nonce : '';
    }

    public function hasNonce()
    {
        return isset($this->nonce);
    }

    public function clearNonce()
    {
        unset($this->nonce);
    }

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

        return $this;
    }

}

