grpc.testing.StreamingOutputCallRequest */ class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message { /** * Desired payload type in the response from the server. * If response_type is RANDOM, the payload from each response in the stream * might be of different types. This is to simulate a mixed type of payload * stream. * * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; */ protected $response_type = 0; /** * Configuration for each expected response message. * * Generated from protobuf field repeated .grpc.testing.ResponseParameters response_parameters = 2; */ private $response_parameters; /** * Optional input payload sent along with the request. * * Generated from protobuf field .grpc.testing.Payload payload = 3; */ protected $payload = null; /** * Whether server should return a given status * * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; */ protected $response_status = null; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type int $response_type * Desired payload type in the response from the server. * If response_type is RANDOM, the payload from each response in the stream * might be of different types. This is to simulate a mixed type of payload * stream. * @type \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $response_parameters * Configuration for each expected response message. * @type \Grpc\Testing\Payload $payload * Optional input payload sent along with the request. * @type \Grpc\Testing\EchoStatus $response_status * Whether server should return a given status * } */ public function __construct($data = NULL) { \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); parent::__construct($data); } /** * Desired payload type in the response from the server. * If response_type is RANDOM, the payload from each response in the stream * might be of different types. This is to simulate a mixed type of payload * stream. * * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; * @return int */ public function getResponseType() { return $this->response_type; } /** * Desired payload type in the response from the server. * If response_type is RANDOM, the payload from each response in the stream * might be of different types. This is to simulate a mixed type of payload * stream. * * Generated from protobuf field .grpc.testing.PayloadType response_type = 1; * @param int $var * @return $this */ public function setResponseType($var) { GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); $this->response_type = $var; return $this; } /** * Configuration for each expected response message. * * Generated from protobuf field repeated .grpc.testing.ResponseParameters response_parameters = 2; * @return \Google\Protobuf\Internal\RepeatedField */ public function getResponseParameters() { return $this->response_parameters; } /** * Configuration for each expected response message. * * Generated from protobuf field repeated .grpc.testing.ResponseParameters response_parameters = 2; * @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setResponseParameters($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class); $this->response_parameters = $arr; return $this; } /** * Optional input payload sent along with the request. * * Generated from protobuf field .grpc.testing.Payload payload = 3; * @return \Grpc\Testing\Payload */ public function getPayload() { return isset($this->payload) ? $this->payload : null; } public function hasPayload() { return isset($this->payload); } public function clearPayload() { unset($this->payload); } /** * Optional input payload sent along with the request. * * Generated from protobuf field .grpc.testing.Payload payload = 3; * @param \Grpc\Testing\Payload $var * @return $this */ public function setPayload($var) { GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); $this->payload = $var; return $this; } /** * Whether server should return a given status * * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; * @return \Grpc\Testing\EchoStatus */ public function getResponseStatus() { return isset($this->response_status) ? $this->response_status : null; } public function hasResponseStatus() { return isset($this->response_status); } public function clearResponseStatus() { unset($this->response_status); } /** * Whether server should return a given status * * Generated from protobuf field .grpc.testing.EchoStatus response_status = 7; * @param \Grpc\Testing\EchoStatus $var * @return $this */ public function setResponseStatus($var) { GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); $this->response_status = $var; return $this; } }