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;
14 * Generated from protobuf message <code>grpc.testing.SimpleRequest</code>
16 class SimpleRequest extends \Google\Protobuf\Internal\Message
19 * Desired payload type in the response from the server.
20 * If response_type is RANDOM, server randomly chooses one from other formats.
22 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
24 protected $response_type = 0;
26 * Desired payload size in the response from the server.
28 * Generated from protobuf field <code>int32 response_size = 2;</code>
30 protected $response_size = 0;
32 * Optional input payload sent along with the request.
34 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
36 protected $payload = null;
38 * Whether SimpleResponse should include username.
40 * Generated from protobuf field <code>bool fill_username = 4;</code>
42 protected $fill_username = false;
44 * Whether SimpleResponse should include OAuth scope.
46 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
48 protected $fill_oauth_scope = false;
50 * Whether to request the server to compress the response. This field is
51 * "nullable" in order to interoperate seamlessly with clients not able to
52 * implement the full compression tests by introspecting the call to verify
53 * the response's compression status.
55 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
57 protected $response_compressed = null;
59 * Whether server should return a given status
61 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
63 protected $response_status = null;
65 * Whether the server should expect this request to be compressed.
67 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
69 protected $expect_compressed = null;
71 * Whether SimpleResponse should include server_id.
73 * Generated from protobuf field <code>bool fill_server_id = 9;</code>
75 protected $fill_server_id = false;
77 * Whether SimpleResponse should include grpclb_route_type.
79 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
81 protected $fill_grpclb_route_type = false;
86 * @param array $data {
87 * Optional. Data for populating the Message object.
89 * @type int $response_type
90 * Desired payload type in the response from the server.
91 * If response_type is RANDOM, server randomly chooses one from other formats.
92 * @type int $response_size
93 * Desired payload size in the response from the server.
94 * @type \Grpc\Testing\Payload $payload
95 * Optional input payload sent along with the request.
96 * @type bool $fill_username
97 * Whether SimpleResponse should include username.
98 * @type bool $fill_oauth_scope
99 * Whether SimpleResponse should include OAuth scope.
100 * @type \Grpc\Testing\BoolValue $response_compressed
101 * Whether to request the server to compress the response. This field is
102 * "nullable" in order to interoperate seamlessly with clients not able to
103 * implement the full compression tests by introspecting the call to verify
104 * the response's compression status.
105 * @type \Grpc\Testing\EchoStatus $response_status
106 * Whether server should return a given status
107 * @type \Grpc\Testing\BoolValue $expect_compressed
108 * Whether the server should expect this request to be compressed.
109 * @type bool $fill_server_id
110 * Whether SimpleResponse should include server_id.
111 * @type bool $fill_grpclb_route_type
112 * Whether SimpleResponse should include grpclb_route_type.
115 public function __construct($data = NULL) {
116 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
117 parent::__construct($data);
121 * Desired payload type in the response from the server.
122 * If response_type is RANDOM, server randomly chooses one from other formats.
124 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
127 public function getResponseType()
129 return $this->response_type;
133 * Desired payload type in the response from the server.
134 * If response_type is RANDOM, server randomly chooses one from other formats.
136 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
140 public function setResponseType($var)
142 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
143 $this->response_type = $var;
149 * Desired payload size in the response from the server.
151 * Generated from protobuf field <code>int32 response_size = 2;</code>
154 public function getResponseSize()
156 return $this->response_size;
160 * Desired payload size in the response from the server.
162 * Generated from protobuf field <code>int32 response_size = 2;</code>
166 public function setResponseSize($var)
168 GPBUtil::checkInt32($var);
169 $this->response_size = $var;
175 * Optional input payload sent along with the request.
177 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
178 * @return \Grpc\Testing\Payload|null
180 public function getPayload()
182 return isset($this->payload) ? $this->payload : null;
185 public function hasPayload()
187 return isset($this->payload);
190 public function clearPayload()
192 unset($this->payload);
196 * Optional input payload sent along with the request.
198 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
199 * @param \Grpc\Testing\Payload $var
202 public function setPayload($var)
204 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
205 $this->payload = $var;
211 * Whether SimpleResponse should include username.
213 * Generated from protobuf field <code>bool fill_username = 4;</code>
216 public function getFillUsername()
218 return $this->fill_username;
222 * Whether SimpleResponse should include username.
224 * Generated from protobuf field <code>bool fill_username = 4;</code>
228 public function setFillUsername($var)
230 GPBUtil::checkBool($var);
231 $this->fill_username = $var;
237 * Whether SimpleResponse should include OAuth scope.
239 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
242 public function getFillOauthScope()
244 return $this->fill_oauth_scope;
248 * Whether SimpleResponse should include OAuth scope.
250 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
254 public function setFillOauthScope($var)
256 GPBUtil::checkBool($var);
257 $this->fill_oauth_scope = $var;
263 * Whether to request the server to compress the response. This field is
264 * "nullable" in order to interoperate seamlessly with clients not able to
265 * implement the full compression tests by introspecting the call to verify
266 * the response's compression status.
268 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
269 * @return \Grpc\Testing\BoolValue|null
271 public function getResponseCompressed()
273 return isset($this->response_compressed) ? $this->response_compressed : null;
276 public function hasResponseCompressed()
278 return isset($this->response_compressed);
281 public function clearResponseCompressed()
283 unset($this->response_compressed);
287 * Whether to request the server to compress the response. This field is
288 * "nullable" in order to interoperate seamlessly with clients not able to
289 * implement the full compression tests by introspecting the call to verify
290 * the response's compression status.
292 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
293 * @param \Grpc\Testing\BoolValue $var
296 public function setResponseCompressed($var)
298 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
299 $this->response_compressed = $var;
305 * Whether server should return a given status
307 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
308 * @return \Grpc\Testing\EchoStatus|null
310 public function getResponseStatus()
312 return isset($this->response_status) ? $this->response_status : null;
315 public function hasResponseStatus()
317 return isset($this->response_status);
320 public function clearResponseStatus()
322 unset($this->response_status);
326 * Whether server should return a given status
328 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
329 * @param \Grpc\Testing\EchoStatus $var
332 public function setResponseStatus($var)
334 GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
335 $this->response_status = $var;
341 * Whether the server should expect this request to be compressed.
343 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
344 * @return \Grpc\Testing\BoolValue|null
346 public function getExpectCompressed()
348 return isset($this->expect_compressed) ? $this->expect_compressed : null;
351 public function hasExpectCompressed()
353 return isset($this->expect_compressed);
356 public function clearExpectCompressed()
358 unset($this->expect_compressed);
362 * Whether the server should expect this request to be compressed.
364 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
365 * @param \Grpc\Testing\BoolValue $var
368 public function setExpectCompressed($var)
370 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
371 $this->expect_compressed = $var;
377 * Whether SimpleResponse should include server_id.
379 * Generated from protobuf field <code>bool fill_server_id = 9;</code>
382 public function getFillServerId()
384 return $this->fill_server_id;
388 * Whether SimpleResponse should include server_id.
390 * Generated from protobuf field <code>bool fill_server_id = 9;</code>
394 public function setFillServerId($var)
396 GPBUtil::checkBool($var);
397 $this->fill_server_id = $var;
403 * Whether SimpleResponse should include grpclb_route_type.
405 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
408 public function getFillGrpclbRouteType()
410 return $this->fill_grpclb_route_type;
414 * Whether SimpleResponse should include grpclb_route_type.
416 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
420 public function setFillGrpclbRouteType($var)
422 GPBUtil::checkBool($var);
423 $this->fill_grpclb_route_type = $var;