<?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.PreKeyRecordStructure</code>
 */
class PreKeyRecordStructure 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 publicKey = 2;</code>
     */
    protected $publicKey = null;
    /**
     * Generated from protobuf field <code>optional bytes privateKey = 3;</code>
     */
    protected $privateKey = null;

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

    public function hasPrivateKey()
    {
        return isset($this->privateKey);
    }

    public function clearPrivateKey()
    {
        unset($this->privateKey);
    }

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

        return $this;
    }

}

