2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: src/proto/grpc/testing/messages.proto
5 namespace Grpc\Testing;
7 use Google\Protobuf\Internal\GPBType;
8 use Google\Protobuf\Internal\RepeatedField;
9 use Google\Protobuf\Internal\GPBUtil;
12 * Server-streaming request.
14 * Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code>
16 class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message
19 * Desired payload type in the response from the server.
20 * If response_type is RANDOM, the payload from each response in the stream
21 * might be of different types. This is to simulate a mixed type of payload
24 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
26 protected $response_type = 0;
28 * Configuration for each expected response message.
30 * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
32 private $response_parameters;
34 * Optional input payload sent along with the request.
36 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
38 protected $payload = null;
40 * Whether server should return a given status
42 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
44 protected $response_status = null;
49 * @param array $data {
50 * Optional. Data for populating the Message object.
52 * @type int $response_type
53 * Desired payload type in the response from the server.
54 * If response_type is RANDOM, the payload from each response in the stream
55 * might be of different types. This is to simulate a mixed type of payload
57 * @type \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $response_parameters
58 * Configuration for each expected response message.
59 * @type \Grpc\Testing\Payload $payload
60 * Optional input payload sent along with the request.
61 * @type \Grpc\Testing\EchoStatus $response_status
62 * Whether server should return a given status
65 public function __construct($data = NULL) {
66 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
67 parent::__construct($data);
71 * Desired payload type in the response from the server.
72 * If response_type is RANDOM, the payload from each response in the stream
73 * might be of different types. This is to simulate a mixed type of payload
76 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
79 public function getResponseType()
81 return $this->response_type;
85 * Desired payload type in the response from the server.
86 * If response_type is RANDOM, the payload from each response in the stream
87 * might be of different types. This is to simulate a mixed type of payload
90 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
94 public function setResponseType($var)
96 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
97 $this->response_type = $var;
103 * Configuration for each expected response message.
105 * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
106 * @return \Google\Protobuf\Internal\RepeatedField
108 public function getResponseParameters()
110 return $this->response_parameters;
114 * Configuration for each expected response message.
116 * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
117 * @param \Grpc\Testing\ResponseParameters[]|\Google\Protobuf\Internal\RepeatedField $var
120 public function setResponseParameters($var)
122 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class);
123 $this->response_parameters = $arr;
129 * Optional input payload sent along with the request.
131 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
132 * @return \Grpc\Testing\Payload|null
134 public function getPayload()
136 return $this->payload;
139 public function hasPayload()
141 return isset($this->payload);
144 public function clearPayload()
146 unset($this->payload);
150 * Optional input payload sent along with the request.
152 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
153 * @param \Grpc\Testing\Payload $var
156 public function setPayload($var)
158 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
159 $this->payload = $var;
165 * Whether server should return a given status
167 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
168 * @return \Grpc\Testing\EchoStatus|null
170 public function getResponseStatus()
172 return $this->response_status;
175 public function hasResponseStatus()
177 return isset($this->response_status);
180 public function clearResponseStatus()
182 unset($this->response_status);
186 * Whether server should return a given status
188 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
189 * @param \Grpc\Testing\EchoStatus $var
192 public function setResponseStatus($var)
194 GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
195 $this->response_status = $var;