<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: src/proto/grpc/testing/messages.proto

namespace Grpc\Testing\LoadBalancerStatsResponse;

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

/**
 * Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse.MetadataByPeer</code>
 */
class MetadataByPeer extends \Google\Protobuf\Internal\Message
{
    /**
     * List of RpcMetadata in for each RPC with a given peer
     *
     * Generated from protobuf field <code>repeated .grpc.testing.LoadBalancerStatsResponse.RpcMetadata rpc_metadata = 1;</code>
     */
    private $rpc_metadata;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Grpc\Testing\LoadBalancerStatsResponse\RpcMetadata>|\Google\Protobuf\Internal\RepeatedField $rpc_metadata
     *           List of RpcMetadata in for each RPC with a given peer
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
        parent::__construct($data);
    }

    /**
     * List of RpcMetadata in for each RPC with a given peer
     *
     * Generated from protobuf field <code>repeated .grpc.testing.LoadBalancerStatsResponse.RpcMetadata rpc_metadata = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRpcMetadata()
    {
        return $this->rpc_metadata;
    }

    /**
     * List of RpcMetadata in for each RPC with a given peer
     *
     * Generated from protobuf field <code>repeated .grpc.testing.LoadBalancerStatsResponse.RpcMetadata rpc_metadata = 1;</code>
     * @param array<\Grpc\Testing\LoadBalancerStatsResponse\RpcMetadata>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRpcMetadata($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\LoadBalancerStatsResponse\RpcMetadata::class);
        $this->rpc_metadata = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MetadataByPeer::class, \Grpc\Testing\LoadBalancerStatsResponse_MetadataByPeer::class);

