grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats
*/
class MethodStats extends \Google\Protobuf\Internal\Message
{
/**
* The number of RPCs that were started for this method.
*
* Generated from protobuf field int32 rpcs_started = 1;
*/
protected $rpcs_started = 0;
/**
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
*
* Generated from protobuf field map result = 2;
*/
private $result;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type int $rpcs_started
* The number of RPCs that were started for this method.
* @type array|\Google\Protobuf\Internal\MapField $result
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
parent::__construct($data);
}
/**
* The number of RPCs that were started for this method.
*
* Generated from protobuf field int32 rpcs_started = 1;
* @return int
*/
public function getRpcsStarted()
{
return $this->rpcs_started;
}
/**
* The number of RPCs that were started for this method.
*
* Generated from protobuf field int32 rpcs_started = 1;
* @param int $var
* @return $this
*/
public function setRpcsStarted($var)
{
GPBUtil::checkInt32($var);
$this->rpcs_started = $var;
return $this;
}
/**
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
*
* Generated from protobuf field map result = 2;
* @return \Google\Protobuf\Internal\MapField
*/
public function getResult()
{
return $this->result;
}
/**
* The number of RPCs that completed with each status for this method. The
* key is the integral value of a google.rpc.Code; the value is the count.
*
* Generated from protobuf field map result = 2;
* @param array|\Google\Protobuf\Internal\MapField $var
* @return $this
*/
public function setResult($var)
{
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT32);
$this->result = $arr;
return $this;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MethodStats::class, \Grpc\Testing\LoadBalancerAccumulatedStatsResponse_MethodStats::class);