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

namespace PhpWA\Protocol\Proto\Message;

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

/**
 * Generated from protobuf message <code>proto.Message.PeerDataOperationRequestResponseMessage</code>
 */
class PeerDataOperationRequestResponseMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>optional .proto.Message.PeerDataOperationRequestType peerDataOperationRequestType = 1;</code>
     */
    protected $peerDataOperationRequestType = null;
    /**
     * Generated from protobuf field <code>optional string stanzaId = 2;</code>
     */
    protected $stanzaId = null;
    /**
     * Generated from protobuf field <code>repeated .proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult peerDataOperationResult = 3;</code>
     */
    private $peerDataOperationResult;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $peerDataOperationRequestType
     *     @type string $stanzaId
     *     @type \PhpWA\Protocol\Proto\Message\PeerDataOperationRequestResponseMessage\PeerDataOperationResult[] $peerDataOperationResult
     * }
     */
    public function __construct($data = NULL) {
        \PhpWA\Protocol\Proto\Metadata\WAProto::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.PeerDataOperationRequestType peerDataOperationRequestType = 1;</code>
     * @return int
     */
    public function getPeerDataOperationRequestType()
    {
        return isset($this->peerDataOperationRequestType) ? $this->peerDataOperationRequestType : 0;
    }

    public function hasPeerDataOperationRequestType()
    {
        return isset($this->peerDataOperationRequestType);
    }

    public function clearPeerDataOperationRequestType()
    {
        unset($this->peerDataOperationRequestType);
    }

    /**
     * Generated from protobuf field <code>optional .proto.Message.PeerDataOperationRequestType peerDataOperationRequestType = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setPeerDataOperationRequestType($var)
    {
        GPBUtil::checkEnum($var, \PhpWA\Protocol\Proto\Message\PeerDataOperationRequestType::class);
        $this->peerDataOperationRequestType = $var;

        return $this;
    }

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

    public function hasStanzaId()
    {
        return isset($this->stanzaId);
    }

    public function clearStanzaId()
    {
        unset($this->stanzaId);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult peerDataOperationResult = 3;</code>
     * @return RepeatedField<\PhpWA\Protocol\Proto\Message\PeerDataOperationRequestResponseMessage\PeerDataOperationResult>
     */
    public function getPeerDataOperationResult()
    {
        return $this->peerDataOperationResult;
    }

    /**
     * Generated from protobuf field <code>repeated .proto.Message.PeerDataOperationRequestResponseMessage.PeerDataOperationResult peerDataOperationResult = 3;</code>
     * @param \PhpWA\Protocol\Proto\Message\PeerDataOperationRequestResponseMessage\PeerDataOperationResult[] $var
     * @return $this
     */
    public function setPeerDataOperationResult($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \PhpWA\Protocol\Proto\Message\PeerDataOperationRequestResponseMessage\PeerDataOperationResult::class);
        $this->peerDataOperationResult = $arr;

        return $this;
    }

}

