Home | History | Annotate | Download | only in Testing
      1 <?php
      2 # Generated by the protocol buffer compiler.  DO NOT EDIT!
      3 # source: src/proto/grpc/testing/metrics.proto
      4 
      5 namespace Grpc\Testing;
      6 
      7 use Google\Protobuf\Internal\GPBType;
      8 use Google\Protobuf\Internal\RepeatedField;
      9 use Google\Protobuf\Internal\GPBUtil;
     10 
     11 /**
     12  * Reponse message containing the gauge name and value
     13  *
     14  * Generated from protobuf message <code>grpc.testing.GaugeResponse</code>
     15  */
     16 class GaugeResponse extends \Google\Protobuf\Internal\Message
     17 {
     18     /**
     19      * Generated from protobuf field <code>string name = 1;</code>
     20      */
     21     private $name = '';
     22     protected $value;
     23 
     24     public function __construct() {
     25         \GPBMetadata\Src\Proto\Grpc\Testing\Metrics::initOnce();
     26         parent::__construct();
     27     }
     28 
     29     /**
     30      * Generated from protobuf field <code>string name = 1;</code>
     31      * @return string
     32      */
     33     public function getName()
     34     {
     35         return $this->name;
     36     }
     37 
     38     /**
     39      * Generated from protobuf field <code>string name = 1;</code>
     40      * @param string $var
     41      * @return $this
     42      */
     43     public function setName($var)
     44     {
     45         GPBUtil::checkString($var, True);
     46         $this->name = $var;
     47 
     48         return $this;
     49     }
     50 
     51     /**
     52      * Generated from protobuf field <code>int64 long_value = 2;</code>
     53      * @return int|string
     54      */
     55     public function getLongValue()
     56     {
     57         return $this->readOneof(2);
     58     }
     59 
     60     /**
     61      * Generated from protobuf field <code>int64 long_value = 2;</code>
     62      * @param int|string $var
     63      * @return $this
     64      */
     65     public function setLongValue($var)
     66     {
     67         GPBUtil::checkInt64($var);
     68         $this->writeOneof(2, $var);
     69 
     70         return $this;
     71     }
     72 
     73     /**
     74      * Generated from protobuf field <code>double double_value = 3;</code>
     75      * @return float
     76      */
     77     public function getDoubleValue()
     78     {
     79         return $this->readOneof(3);
     80     }
     81 
     82     /**
     83      * Generated from protobuf field <code>double double_value = 3;</code>
     84      * @param float $var
     85      * @return $this
     86      */
     87     public function setDoubleValue($var)
     88     {
     89         GPBUtil::checkDouble($var);
     90         $this->writeOneof(3, $var);
     91 
     92         return $this;
     93     }
     94 
     95     /**
     96      * Generated from protobuf field <code>string string_value = 4;</code>
     97      * @return string
     98      */
     99     public function getStringValue()
    100     {
    101         return $this->readOneof(4);
    102     }
    103 
    104     /**
    105      * Generated from protobuf field <code>string string_value = 4;</code>
    106      * @param string $var
    107      * @return $this
    108      */
    109     public function setStringValue($var)
    110     {
    111         GPBUtil::checkString($var, True);
    112         $this->writeOneof(4, $var);
    113 
    114         return $this;
    115     }
    116 
    117     /**
    118      * @return string
    119      */
    120     public function getValue()
    121     {
    122         return $this->whichOneof("value");
    123     }
    124 
    125 }
    126 
    127