grpc.testing.LoadBalancerStatsResponse */ class LoadBalancerStatsResponse extends \Google\Protobuf\Internal\Message { /** * The number of completed RPCs for each peer. * * Generated from protobuf field map rpcs_by_peer = 1; */ private $rpcs_by_peer; /** * The number of RPCs that failed to record a remote peer. * * Generated from protobuf field int32 num_failures = 2; */ protected $num_failures = 0; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type array|\Google\Protobuf\Internal\MapField $rpcs_by_peer * The number of completed RPCs for each peer. * @type int $num_failures * The number of RPCs that failed to record a remote peer. * } */ public function __construct($data = NULL) { \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); parent::__construct($data); } /** * The number of completed RPCs for each peer. * * Generated from protobuf field map rpcs_by_peer = 1; * @return \Google\Protobuf\Internal\MapField */ public function getRpcsByPeer() { return $this->rpcs_by_peer; } /** * The number of completed RPCs for each peer. * * Generated from protobuf field map rpcs_by_peer = 1; * @param array|\Google\Protobuf\Internal\MapField $var * @return $this */ public function setRpcsByPeer($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::INT32); $this->rpcs_by_peer = $arr; return $this; } /** * The number of RPCs that failed to record a remote peer. * * Generated from protobuf field int32 num_failures = 2; * @return int */ public function getNumFailures() { return $this->num_failures; } /** * The number of RPCs that failed to record a remote peer. * * Generated from protobuf field int32 num_failures = 2; * @param int $var * @return $this */ public function setNumFailures($var) { GPBUtil::checkInt32($var); $this->num_failures = $var; return $this; } }