<?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.KeyExchangeMessage</code>
 */
class KeyExchangeMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional uint32 id = 1;</code>
     */
    protected $id = null;
    /**
     * Generated from protobuf field <code>optional bytes baseKey = 2;</code>
     */
    protected $baseKey = null;
    /**
     * Generated from protobuf field <code>optional bytes ratchetKey = 3;</code>
     */
    protected $ratchetKey = null;
    /**
     * Generated from protobuf field <code>optional bytes identityKey = 4;</code>
     */
    protected $identityKey = null;
    /**
     * Generated from protobuf field <code>optional bytes baseKeySignature = 5;</code>
     */
    protected $baseKeySignature = null;

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

    /**
     * Generated from protobuf field <code>optional uint32 id = 1;</code>
     * @return int
     */
    public function getId()
    {
        return isset($this->id) ? $this->id : 0;
    }

    public function hasId()
    {
        return isset($this->id);
    }

    public function clearId()
    {
        unset($this->id);
    }

    /**
     * Generated from protobuf field <code>optional uint32 id = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkUint32($var);
        $this->id = $var;

        return $this;
    }

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

    public function hasBaseKey()
    {
        return isset($this->baseKey);
    }

    public function clearBaseKey()
    {
        unset($this->baseKey);
    }

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

        return $this;
    }

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

    public function hasRatchetKey()
    {
        return isset($this->ratchetKey);
    }

    public function clearRatchetKey()
    {
        unset($this->ratchetKey);
    }

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

        return $this;
    }

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

    public function hasIdentityKey()
    {
        return isset($this->identityKey);
    }

    public function clearIdentityKey()
    {
        unset($this->identityKey);
    }

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

        return $this;
    }

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

    public function hasBaseKeySignature()
    {
        return isset($this->baseKeySignature);
    }

    public function clearBaseKeySignature()
    {
        unset($this->baseKeySignature);
    }

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

        return $this;
    }

}

