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/payloads.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  * Generated from protobuf message <code>grpc.testing.PayloadConfig</code>
     13  */
     14 class PayloadConfig extends \Google\Protobuf\Internal\Message
     15 {
     16     protected $payload;
     17 
     18     public function __construct() {
     19         \GPBMetadata\Src\Proto\Grpc\Testing\Payloads::initOnce();
     20         parent::__construct();
     21     }
     22 
     23     /**
     24      * Generated from protobuf field <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
     25      * @return \Grpc\Testing\ByteBufferParams
     26      */
     27     public function getBytebufParams()
     28     {
     29         return $this->readOneof(1);
     30     }
     31 
     32     /**
     33      * Generated from protobuf field <code>.grpc.testing.ByteBufferParams bytebuf_params = 1;</code>
     34      * @param \Grpc\Testing\ByteBufferParams $var
     35      * @return $this
     36      */
     37     public function setBytebufParams($var)
     38     {
     39         GPBUtil::checkMessage($var, \Grpc\Testing\ByteBufferParams::class);
     40         $this->writeOneof(1, $var);
     41 
     42         return $this;
     43     }
     44 
     45     /**
     46      * Generated from protobuf field <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
     47      * @return \Grpc\Testing\SimpleProtoParams
     48      */
     49     public function getSimpleParams()
     50     {
     51         return $this->readOneof(2);
     52     }
     53 
     54     /**
     55      * Generated from protobuf field <code>.grpc.testing.SimpleProtoParams simple_params = 2;</code>
     56      * @param \Grpc\Testing\SimpleProtoParams $var
     57      * @return $this
     58      */
     59     public function setSimpleParams($var)
     60     {
     61         GPBUtil::checkMessage($var, \Grpc\Testing\SimpleProtoParams::class);
     62         $this->writeOneof(2, $var);
     63 
     64         return $this;
     65     }
     66 
     67     /**
     68      * Generated from protobuf field <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
     69      * @return \Grpc\Testing\ComplexProtoParams
     70      */
     71     public function getComplexParams()
     72     {
     73         return $this->readOneof(3);
     74     }
     75 
     76     /**
     77      * Generated from protobuf field <code>.grpc.testing.ComplexProtoParams complex_params = 3;</code>
     78      * @param \Grpc\Testing\ComplexProtoParams $var
     79      * @return $this
     80      */
     81     public function setComplexParams($var)
     82     {
     83         GPBUtil::checkMessage($var, \Grpc\Testing\ComplexProtoParams::class);
     84         $this->writeOneof(3, $var);
     85 
     86         return $this;
     87     }
     88 
     89     /**
     90      * @return string
     91      */
     92     public function getPayload()
     93     {
     94         return $this->whichOneof("payload");
     95     }
     96 
     97 }
     98 
     99