Debian Codegraph @

src/php/tests/qps/generated_code/Grpc/Testing/SimpleRequest.php

raw
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 * Unary request.
13 *
14 * Generated from protobuf message <code>grpc.testing.SimpleRequest</code>
15 */
16 class SimpleRequest extends \Google\Protobuf\Internal\Message
17 {
18 /**
19 * Desired payload type in the response from the server.
20 * If response_type is RANDOM, server randomly chooses one from other formats.
21 *
22 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
23 */
24 protected $response_type = 0;
25 /**
26 * Desired payload size in the response from the server.
27 *
28 * Generated from protobuf field <code>int32 response_size = 2;</code>
29 */
30 protected $response_size = 0;
31 /**
32 * Optional input payload sent along with the request.
33 *
34 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
35 */
36 protected $payload = null;
37 /**
38 * Whether SimpleResponse should include username.
39 *
40 * Generated from protobuf field <code>bool fill_username = 4;</code>
41 */
42 protected $fill_username = false;
43 /**
44 * Whether SimpleResponse should include OAuth scope.
45 *
46 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
47 */
48 protected $fill_oauth_scope = false;
49 /**
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.
54 *
55 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
56 */
57 protected $response_compressed = null;
58 /**
59 * Whether server should return a given status
60 *
61 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
62 */
63 protected $response_status = null;
64 /**
65 * Whether the server should expect this request to be compressed.
66 *
67 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
68 */
69 protected $expect_compressed = null;
70 /**
71 * Whether SimpleResponse should include server_id.
72 *
73 * Generated from protobuf field <code>bool fill_server_id = 9;</code>
74 */
75 protected $fill_server_id = false;
76 /**
77 * Whether SimpleResponse should include grpclb_route_type.
78 *
79 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
80 */
81 protected $fill_grpclb_route_type = false;
82
83 /**
84 * Constructor.
85 *
86 * @param array $data {
87 * Optional. Data for populating the Message object.
88 *
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.
113 * }
114 */
115 public function __construct($data = NULL) {
116 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce();
117 parent::__construct($data);
118 }
119
120 /**
121 * Desired payload type in the response from the server.
122 * If response_type is RANDOM, server randomly chooses one from other formats.
123 *
124 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
125 * @return int
126 */
127 public function getResponseType()
128 {
129 return $this->response_type;
130 }
131
132 /**
133 * Desired payload type in the response from the server.
134 * If response_type is RANDOM, server randomly chooses one from other formats.
135 *
136 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code>
137 * @param int $var
138 * @return $this
139 */
140 public function setResponseType($var)
141 {
142 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class);
143 $this->response_type = $var;
144
145 return $this;
146 }
147
148 /**
149 * Desired payload size in the response from the server.
150 *
151 * Generated from protobuf field <code>int32 response_size = 2;</code>
152 * @return int
153 */
154 public function getResponseSize()
155 {
156 return $this->response_size;
157 }
158
159 /**
160 * Desired payload size in the response from the server.
161 *
162 * Generated from protobuf field <code>int32 response_size = 2;</code>
163 * @param int $var
164 * @return $this
165 */
166 public function setResponseSize($var)
167 {
168 GPBUtil::checkInt32($var);
169 $this->response_size = $var;
170
171 return $this;
172 }
173
174 /**
175 * Optional input payload sent along with the request.
176 *
177 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
178 * @return \Grpc\Testing\Payload
179 */
180 public function getPayload()
181 {
182 return $this->payload;
183 }
184
185 /**
186 * Optional input payload sent along with the request.
187 *
188 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code>
189 * @param \Grpc\Testing\Payload $var
190 * @return $this
191 */
192 public function setPayload($var)
193 {
194 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class);
195 $this->payload = $var;
196
197 return $this;
198 }
199
200 /**
201 * Whether SimpleResponse should include username.
202 *
203 * Generated from protobuf field <code>bool fill_username = 4;</code>
204 * @return bool
205 */
206 public function getFillUsername()
207 {
208 return $this->fill_username;
209 }
210
211 /**
212 * Whether SimpleResponse should include username.
213 *
214 * Generated from protobuf field <code>bool fill_username = 4;</code>
215 * @param bool $var
216 * @return $this
217 */
218 public function setFillUsername($var)
219 {
220 GPBUtil::checkBool($var);
221 $this->fill_username = $var;
222
223 return $this;
224 }
225
226 /**
227 * Whether SimpleResponse should include OAuth scope.
228 *
229 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
230 * @return bool
231 */
232 public function getFillOauthScope()
233 {
234 return $this->fill_oauth_scope;
235 }
236
237 /**
238 * Whether SimpleResponse should include OAuth scope.
239 *
240 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code>
241 * @param bool $var
242 * @return $this
243 */
244 public function setFillOauthScope($var)
245 {
246 GPBUtil::checkBool($var);
247 $this->fill_oauth_scope = $var;
248
249 return $this;
250 }
251
252 /**
253 * Whether to request the server to compress the response. This field is
254 * "nullable" in order to interoperate seamlessly with clients not able to
255 * implement the full compression tests by introspecting the call to verify
256 * the response's compression status.
257 *
258 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
259 * @return \Grpc\Testing\BoolValue
260 */
261 public function getResponseCompressed()
262 {
263 return $this->response_compressed;
264 }
265
266 /**
267 * Whether to request the server to compress the response. This field is
268 * "nullable" in order to interoperate seamlessly with clients not able to
269 * implement the full compression tests by introspecting the call to verify
270 * the response's compression status.
271 *
272 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code>
273 * @param \Grpc\Testing\BoolValue $var
274 * @return $this
275 */
276 public function setResponseCompressed($var)
277 {
278 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
279 $this->response_compressed = $var;
280
281 return $this;
282 }
283
284 /**
285 * Whether server should return a given status
286 *
287 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
288 * @return \Grpc\Testing\EchoStatus
289 */
290 public function getResponseStatus()
291 {
292 return $this->response_status;
293 }
294
295 /**
296 * Whether server should return a given status
297 *
298 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code>
299 * @param \Grpc\Testing\EchoStatus $var
300 * @return $this
301 */
302 public function setResponseStatus($var)
303 {
304 GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class);
305 $this->response_status = $var;
306
307 return $this;
308 }
309
310 /**
311 * Whether the server should expect this request to be compressed.
312 *
313 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
314 * @return \Grpc\Testing\BoolValue
315 */
316 public function getExpectCompressed()
317 {
318 return $this->expect_compressed;
319 }
320
321 /**
322 * Whether the server should expect this request to be compressed.
323 *
324 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code>
325 * @param \Grpc\Testing\BoolValue $var
326 * @return $this
327 */
328 public function setExpectCompressed($var)
329 {
330 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class);
331 $this->expect_compressed = $var;
332
333 return $this;
334 }
335
336 /**
337 * Whether SimpleResponse should include server_id.
338 *
339 * Generated from protobuf field <code>bool fill_server_id = 9;</code>
340 * @return bool
341 */
342 public function getFillServerId()
343 {
344 return $this->fill_server_id;
345 }
346
347 /**
348 * Whether SimpleResponse should include server_id.
349 *
350 * Generated from protobuf field <code>bool fill_server_id = 9;</code>
351 * @param bool $var
352 * @return $this
353 */
354 public function setFillServerId($var)
355 {
356 GPBUtil::checkBool($var);
357 $this->fill_server_id = $var;
358
359 return $this;
360 }
361
362 /**
363 * Whether SimpleResponse should include grpclb_route_type.
364 *
365 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
366 * @return bool
367 */
368 public function getFillGrpclbRouteType()
369 {
370 return $this->fill_grpclb_route_type;
371 }
372
373 /**
374 * Whether SimpleResponse should include grpclb_route_type.
375 *
376 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code>
377 * @param bool $var
378 * @return $this
379 */
380 public function setFillGrpclbRouteType($var)
381 {
382 GPBUtil::checkBool($var);
383 $this->fill_grpclb_route_type = $var;
384
385 return $this;
386 }
387
388 }
389