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

namespace Grpc\Testing\LoadBalancerStatsResponse;

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

/**
 * Generated from protobuf message <code>grpc.testing.LoadBalancerStatsResponse.RpcMetadata</code>
 */
class RpcMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * metadata values for each rpc for the keys specified in
     * LoadBalancerStatsRequest.metadata_keys.
     *
     * Generated from protobuf field <code>repeated .grpc.testing.LoadBalancerStatsResponse.MetadataEntry metadata = 1;</code>
     */
    private $metadata;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Grpc\Testing\LoadBalancerStatsResponse\MetadataEntry[] $metadata
     *           metadata values for each rpc for the keys specified in
     *           LoadBalancerStatsRequest.metadata_keys.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
        parent::__construct($data);
    }

    /**
     * metadata values for each rpc for the keys specified in
     * LoadBalancerStatsRequest.metadata_keys.
     *
     * Generated from protobuf field <code>repeated .grpc.testing.LoadBalancerStatsResponse.MetadataEntry metadata = 1;</code>
     * @return RepeatedField<\Grpc\Testing\LoadBalancerStatsResponse\MetadataEntry>
     */
    public function getMetadata()
    {
        return $this->metadata;
    }

    /**
     * metadata values for each rpc for the keys specified in
     * LoadBalancerStatsRequest.metadata_keys.
     *
     * Generated from protobuf field <code>repeated .grpc.testing.LoadBalancerStatsResponse.MetadataEntry metadata = 1;</code>
     * @param \Grpc\Testing\LoadBalancerStatsResponse\MetadataEntry[] $var
     * @return $this
     */
    public function setMetadata(array|RepeatedField $var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\LoadBalancerStatsResponse\MetadataEntry::class);
        $this->metadata = $arr;

        return $this;
    }

}

