| 1 |
<?php |
| 2 |
# Generated by the protocol buffer compiler. DO NOT EDIT! |
| 3 |
# source: src/proto/grpc/core/stats.proto |
| 4 |
|
| 5 |
namespace Grpc\Core; |
| 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.core.Metric</code> |
| 13 |
*/ |
| 14 |
class Metric extends \Google\Protobuf\Internal\Message |
| 15 |
{ |
| 16 |
/** |
| 17 |
* Generated from protobuf field <code>string name = 1;</code> |
| 18 |
*/ |
| 19 |
protected $name = ''; |
| 20 |
protected $value; |
| 21 |
|
| 22 |
/** |
| 23 |
* Constructor. |
| 24 |
* |
| 25 |
* @param array $data { |
| 26 |
* Optional. Data for populating the Message object. |
| 27 |
* |
| 28 |
* @type string $name |
| 29 |
* @type int|string $count |
| 30 |
* @type \Grpc\Core\Histogram $histogram |
| 31 |
* } |
| 32 |
*/ |
| 33 |
public function __construct($data = NULL) { |
| 34 |
\GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); |
| 35 |
parent::__construct($data); |
| 36 |
} |
| 37 |
|
| 38 |
/** |
| 39 |
* Generated from protobuf field <code>string name = 1;</code> |
| 40 |
* @return string |
| 41 |
*/ |
| 42 |
public function getName() |
| 43 |
{ |
| 44 |
return $this->name; |
| 45 |
} |
| 46 |
|
| 47 |
/** |
| 48 |
* Generated from protobuf field <code>string name = 1;</code> |
| 49 |
* @param string $var |
| 50 |
* @return $this |
| 51 |
*/ |
| 52 |
public function setName($var) |
| 53 |
{ |
| 54 |
GPBUtil::checkString($var, True); |
| 55 |
$this->name = $var; |
| 56 |
|
| 57 |
return $this; |
| 58 |
} |
| 59 |
|
| 60 |
/** |
| 61 |
* Generated from protobuf field <code>uint64 count = 10;</code> |
| 62 |
* @return int|string |
| 63 |
*/ |
| 64 |
public function getCount() |
| 65 |
{ |
| 66 |
return $this->readOneof(10); |
| 67 |
} |
| 68 |
|
| 69 |
/** |
| 70 |
* Generated from protobuf field <code>uint64 count = 10;</code> |
| 71 |
* @param int|string $var |
| 72 |
* @return $this |
| 73 |
*/ |
| 74 |
public function setCount($var) |
| 75 |
{ |
| 76 |
GPBUtil::checkUint64($var); |
| 77 |
$this->writeOneof(10, $var); |
| 78 |
|
| 79 |
return $this; |
| 80 |
} |
| 81 |
|
| 82 |
/** |
| 83 |
* Generated from protobuf field <code>.grpc.core.Histogram histogram = 11;</code> |
| 84 |
* @return \Grpc\Core\Histogram |
| 85 |
*/ |
| 86 |
public function getHistogram() |
| 87 |
{ |
| 88 |
return $this->readOneof(11); |
| 89 |
} |
| 90 |
|
| 91 |
/** |
| 92 |
* Generated from protobuf field <code>.grpc.core.Histogram histogram = 11;</code> |
| 93 |
* @param \Grpc\Core\Histogram $var |
| 94 |
* @return $this |
| 95 |
*/ |
| 96 |
public function setHistogram($var) |
| 97 |
{ |
| 98 |
GPBUtil::checkMessage($var, \Grpc\Core\Histogram::class); |
| 99 |
$this->writeOneof(11, $var); |
| 100 |
|
| 101 |
return $this; |
| 102 |
} |
| 103 |
|
| 104 |
/** |
| 105 |
* @return string |
| 106 |
*/ |
| 107 |
public function getValue() |
| 108 |
{ |
| 109 |
return $this->whichOneof("value"); |
| 110 |
} |
| 111 |
|
| 112 |
} |
| 113 |
|