| 1 |
<?php |
| 2 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 |
# source: src/proto/grpc/testing/messages.proto |
| 4 |
|
| 5 |
namespace Grpc\Testing\LoadBalancerAccumulatedStatsResponse; |
| 6 |
|
| 7 |
use Google\Protobuf\Internal\GPBType; |
| 8 |
use Google\Protobuf\Internal\RepeatedField; |
| 9 |
use Google\Protobuf\Internal\GPBUtil; |
| 10 |
|
| 11 |
/** |
| 12 |
* Generated from protobuf message <code>grpc.testing.LoadBalancerAccumulatedStatsResponse.MethodStats</code> |
| 13 |
*/ |
| 14 |
class MethodStats extends \Google\Protobuf\Internal\Message |
| 15 |
{ |
| 16 |
/** |
| 17 |
* The number of RPCs that were started for this method. |
| 18 |
* |
| 19 |
* Generated from protobuf field <code>int32 rpcs_started = 1;</code> |
| 20 |
*/ |
| 21 |
protected $rpcs_started = 0; |
| 22 |
/** |
| 23 |
* The number of RPCs that completed with each status for this method. The |
| 24 |
* key is the integral value of a google.rpc.Code; the value is the count. |
| 25 |
* |
| 26 |
* Generated from protobuf field <code>map<int32, int32> result = 2;</code> |
| 27 |
*/ |
| 28 |
private $result; |
| 29 |
|
| 30 |
/** |
| 31 |
* Constructor. |
| 32 |
* |
| 33 |
* @param array $data { |
| 34 |
* Optional. Data for populating the Message object. |
| 35 |
* |
| 36 |
* @type int $rpcs_started |
| 37 |
* The number of RPCs that were started for this method. |
| 38 |
* @type array|\Google\Protobuf\Internal\MapField $result |
| 39 |
* The number of RPCs that completed with each status for this method. The |
| 40 |
* key is the integral value of a google.rpc.Code; the value is the count. |
| 41 |
* } |
| 42 |
*/ |
| 43 |
public function __construct($data = NULL) { |
| 44 |
\GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); |
| 45 |
parent::__construct($data); |
| 46 |
} |
| 47 |
|
| 48 |
/** |
| 49 |
* The number of RPCs that were started for this method. |
| 50 |
* |
| 51 |
* Generated from protobuf field <code>int32 rpcs_started = 1;</code> |
| 52 |
* @return int |
| 53 |
*/ |
| 54 |
public function getRpcsStarted() |
| 55 |
{ |
| 56 |
return $this->rpcs_started; |
| 57 |
} |
| 58 |
|
| 59 |
/** |
| 60 |
* The number of RPCs that were started for this method. |
| 61 |
* |
| 62 |
* Generated from protobuf field <code>int32 rpcs_started = 1;</code> |
| 63 |
* @param int $var |
| 64 |
* @return $this |
| 65 |
*/ |
| 66 |
public function setRpcsStarted($var) |
| 67 |
{ |
| 68 |
GPBUtil::checkInt32($var); |
| 69 |
$this->rpcs_started = $var; |
| 70 |
|
| 71 |
return $this; |
| 72 |
} |
| 73 |
|
| 74 |
/** |
| 75 |
* The number of RPCs that completed with each status for this method. The |
| 76 |
* key is the integral value of a google.rpc.Code; the value is the count. |
| 77 |
* |
| 78 |
* Generated from protobuf field <code>map<int32, int32> result = 2;</code> |
| 79 |
* @return \Google\Protobuf\Internal\MapField |
| 80 |
*/ |
| 81 |
public function getResult() |
| 82 |
{ |
| 83 |
return $this->result; |
| 84 |
} |
| 85 |
|
| 86 |
/** |
| 87 |
* The number of RPCs that completed with each status for this method. The |
| 88 |
* key is the integral value of a google.rpc.Code; the value is the count. |
| 89 |
* |
| 90 |
* Generated from protobuf field <code>map<int32, int32> result = 2;</code> |
| 91 |
* @param array|\Google\Protobuf\Internal\MapField $var |
| 92 |
* @return $this |
| 93 |
*/ |
| 94 |
public function setResult($var) |
| 95 |
{ |
| 96 |
$arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::INT32); |
| 97 |
$this->result = $arr; |
| 98 |
|
| 99 |
return $this; |
| 100 |
} |
| 101 |
|
| 102 |
} |
| 103 |
|
| 104 |
// Adding a class alias for backwards compatibility with the previous class name. |
| 105 |
class_alias(MethodStats::class, \Grpc\Testing\LoadBalancerAccumulatedStatsResponse_MethodStats::class); |
| 106 |
|