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/messages.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  * Server-streaming request.
     13  *
     14  * Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code>
     15  */
     16 class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
     17 {
     18     /**
     19      * DEPRECATED, don't use. To be removed shortly.
     20      * Desired payload type in the response from the server.
     21      * If response_type is RANDOM, the payload from each response in the stream
     22      * might be of different types. This is to simulate a mixed type of payload
     23      * stream.
     24      *
     25      * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
     26      */
     27     private $response_type = 0;
     28     /**
     29      * Configuration for each expected response message.
     30      *
     31      * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
     32      */
     33     private $response_parameters;
     34     /**
     35      * Optional input payload sent along with the request.
     36      *
     37      * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
     38      */
     39     private $payload = null;
     40     /**
     41      * Whether server should return a given status
     42      *
     43      * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
     44      */
     45     private $response_status = null;
     46 
     47     public function __construct() {
     48         \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
     49         parent::__construct();
     50     }
     51 
     52     /**
     53      * DEPRECATED, don't use. To be removed shortly.
     54      * Desired payload type in the response from the server.
     55      * If response_type is RANDOM, the payload from each response in the stream
     56      * might be of different types. This is to simulate a mixed type of payload
     57      * stream.
     58      *
     59      * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
     60      * @return int
     61      */
     62     public function getResponseType()
     63     {
     64         return $this->response_type;
     65     }
     66 
     67     /**
     68      * DEPRECATED, don't use. To be removed shortly.
     69      * Desired payload type in the response from the server.
     70      * If response_type is RANDOM, the payload from each response in the stream
     71      * might be of different types. This is to simulate a mixed type of payload
     72      * stream.
     73      *
     74      * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
     75      * @param int $var
     76      * @return $this
     77      */
     78     public function setResponseType($var)
     79     {
     80         GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
     81         $this->response_type = $var;
     82 
     83         return $this;
     84     }
     85 
     86     /**
     87      * Configuration for each expected response message.
     88      *
     89      * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
     90      * @return \Google\Protobuf\Internal\RepeatedField
     91      */
     92     public function getResponseParameters()
     93     {
     94         return $this->response_parameters;
     95     }
     96 
     97     /**
     98      * Configuration for each expected response message.
     99      *
    100      * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
    101      * @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var
    102      * @return $this
    103      */
    104     public function setResponseParameters($var)
    105     {
    106         $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class);
    107         $this->response_parameters = $arr;
    108 
    109         return $this;
    110     }
    111 
    112     /**
    113      * Optional input payload sent along with the request.
    114      *
    115      * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
    116      * @return \Grpc\Testing\Payload
    117      */
    118     public function getPayload()
    119     {
    120         return $this->payload;
    121     }
    122 
    123     /**
    124      * Optional input payload sent along with the request.
    125      *
    126      * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
    127      * @param \Grpc\Testing\Payload $var
    128      * @return $this
    129      */
    130     public function setPayload($var)
    131     {
    132         GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
    133         $this->payload = $var;
    134 
    135         return $this;
    136     }
    137 
    138     /**
    139      * Whether server should return a given status
    140      *
    141      * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
    142      * @return \Grpc\Testing\EchoStatus
    143      */
    144     public function getResponseStatus()
    145     {
    146         return $this->response_status;
    147     }
    148 
    149     /**
    150      * Whether server should return a given status
    151      *
    152      * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
    153      * @param \Grpc\Testing\EchoStatus $var
    154      * @return $this
    155      */
    156     public function setResponseStatus($var)
    157     {
    158         GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
    159         $this->response_status = $var;
    160 
    161         return $this;
    162     }
    163 
    164 }
    165 
    166