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 private $name = ''; 20 protected $value; 21 22 public function __construct() { 23 \GPBMetadata\Src\Proto\Grpc\Core\Stats::initOnce(); 24 parent::__construct(); 25 } 26 27 /** 28 * Generated from protobuf field <code>string name = 1;</code> 29 * @return string 30 */ 31 public function getName() 32 { 33 return $this->name; 34 } 35 36 /** 37 * Generated from protobuf field <code>string name = 1;</code> 38 * @param string $var 39 * @return $this 40 */ 41 public function setName($var) 42 { 43 GPBUtil::checkString($var, True); 44 $this->name = $var; 45 46 return $this; 47 } 48 49 /** 50 * Generated from protobuf field <code>uint64 count = 10;</code> 51 * @return int|string 52 */ 53 public function getCount() 54 { 55 return $this->readOneof(10); 56 } 57 58 /** 59 * Generated from protobuf field <code>uint64 count = 10;</code> 60 * @param int|string $var 61 * @return $this 62 */ 63 public function setCount($var) 64 { 65 GPBUtil::checkUint64($var); 66 $this->writeOneof(10, $var); 67 68 return $this; 69 } 70 71 /** 72 * Generated from protobuf field <code>.grpc.core.Histogram histogram = 11;</code> 73 * @return \Grpc\Core\Histogram 74 */ 75 public function getHistogram() 76 { 77 return $this->readOneof(11); 78 } 79 80 /** 81 * Generated from protobuf field <code>.grpc.core.Histogram histogram = 11;</code> 82 * @param \Grpc\Core\Histogram $var 83 * @return $this 84 */ 85 public function setHistogram($var) 86 { 87 GPBUtil::checkMessage($var, \Grpc\Core\Histogram::class); 88 $this->writeOneof(11, $var); 89 90 return $this; 91 } 92 93 /** 94 * @return string 95 */ 96 public function getValue() 97 { 98 return $this->whichOneof("value"); 99 } 100 101 } 102 103