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

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

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

    public function hasCompanionEphemeralIdentity()
    {
        return isset($this->companionEphemeralIdentity);
    }

    public function clearCompanionEphemeralIdentity()
    {
        unset($this->companionEphemeralIdentity);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>optional .proto.CompanionCommitment commitment = 2;</code>
     * @return \PhpWA\Protocol\Proto\CompanionCommitment|null
     */
    public function getCommitment()
    {
        return $this->commitment;
    }

    public function hasCommitment()
    {
        return isset($this->commitment);
    }

    public function clearCommitment()
    {
        unset($this->commitment);
    }

    /**
     * Generated from protobuf field <code>optional .proto.CompanionCommitment commitment = 2;</code>
     * @param \PhpWA\Protocol\Proto\CompanionCommitment $var
     * @return $this
     */
    public function setCommitment($var)
    {
        GPBUtil::checkMessage($var, \PhpWA\Protocol\Proto\CompanionCommitment::class);
        $this->commitment = $var;

        return $this;
    }

}

