<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: IPPN.proto

namespace Catalyst\Protocol\IPPN;

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

/**
 * Generated from protobuf message <code>Catalyst.Protocol.IPPN.PeerNeighborsResponse</code>
 */
class PeerNeighborsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Random subset of a nodes peer db.
     *
     * Generated from protobuf field <code>repeated .Catalyst.Protocol.Peer.PeerId peers = 1;</code>
     */
    private $peers;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Catalyst\Protocol\Peer\PeerId[]|\Google\Protobuf\Internal\RepeatedField $peers
     *           Random subset of a nodes peer db.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\IPPN::initOnce();
        parent::__construct($data);
    }

    /**
     * Random subset of a nodes peer db.
     *
     * Generated from protobuf field <code>repeated .Catalyst.Protocol.Peer.PeerId peers = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPeers()
    {
        return $this->peers;
    }

    /**
     * Random subset of a nodes peer db.
     *
     * Generated from protobuf field <code>repeated .Catalyst.Protocol.Peer.PeerId peers = 1;</code>
     * @param \Catalyst\Protocol\Peer\PeerId[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPeers($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Catalyst\Protocol\Peer\PeerId::class);
        $this->peers = $arr;

        return $this;
    }

}

