• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2# Generated by the protocol buffer compiler.  DO NOT EDIT!
3# source: src/proto/grpc/testing/echo_messages.proto
4
5namespace Grpc\Testing;
6
7use Google\Protobuf\Internal\GPBType;
8use Google\Protobuf\Internal\RepeatedField;
9use Google\Protobuf\Internal\GPBUtil;
10
11/**
12 * Generated from protobuf message <code>grpc.testing.RequestParams</code>
13 */
14class RequestParams extends \Google\Protobuf\Internal\Message
15{
16    /**
17     * Generated from protobuf field <code>bool echo_deadline = 1;</code>
18     */
19    protected $echo_deadline = false;
20    /**
21     * Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
22     */
23    protected $client_cancel_after_us = 0;
24    /**
25     * Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
26     */
27    protected $server_cancel_after_us = 0;
28    /**
29     * Generated from protobuf field <code>bool echo_metadata = 4;</code>
30     */
31    protected $echo_metadata = false;
32    /**
33     * Generated from protobuf field <code>bool check_auth_context = 5;</code>
34     */
35    protected $check_auth_context = false;
36    /**
37     * Generated from protobuf field <code>int32 response_message_length = 6;</code>
38     */
39    protected $response_message_length = 0;
40    /**
41     * Generated from protobuf field <code>bool echo_peer = 7;</code>
42     */
43    protected $echo_peer = false;
44    /**
45     * will force check_auth_context.
46     *
47     * Generated from protobuf field <code>string expected_client_identity = 8;</code>
48     */
49    protected $expected_client_identity = '';
50    /**
51     * Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
52     */
53    protected $skip_cancelled_check = false;
54    /**
55     * Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
56     */
57    protected $expected_transport_security_type = '';
58    /**
59     * Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
60     */
61    protected $debug_info = null;
62    /**
63     * Server should not see a request with this set.
64     *
65     * Generated from protobuf field <code>bool server_die = 12;</code>
66     */
67    protected $server_die = false;
68    /**
69     * Generated from protobuf field <code>string binary_error_details = 13;</code>
70     */
71    protected $binary_error_details = '';
72    /**
73     * Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
74     */
75    protected $expected_error = null;
76    /**
77     * sleep when invoking server for deadline tests
78     *
79     * Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
80     */
81    protected $server_sleep_us = 0;
82    /**
83     * which backend to send request to
84     *
85     * Generated from protobuf field <code>int32 backend_channel_idx = 16;</code>
86     */
87    protected $backend_channel_idx = 0;
88    /**
89     * Generated from protobuf field <code>bool echo_metadata_initially = 17;</code>
90     */
91    protected $echo_metadata_initially = false;
92    /**
93     * Generated from protobuf field <code>bool server_notify_client_when_started = 18;</code>
94     */
95    protected $server_notify_client_when_started = false;
96
97    /**
98     * Constructor.
99     *
100     * @param array $data {
101     *     Optional. Data for populating the Message object.
102     *
103     *     @type bool $echo_deadline
104     *     @type int $client_cancel_after_us
105     *     @type int $server_cancel_after_us
106     *     @type bool $echo_metadata
107     *     @type bool $check_auth_context
108     *     @type int $response_message_length
109     *     @type bool $echo_peer
110     *     @type string $expected_client_identity
111     *           will force check_auth_context.
112     *     @type bool $skip_cancelled_check
113     *     @type string $expected_transport_security_type
114     *     @type \Grpc\Testing\DebugInfo $debug_info
115     *     @type bool $server_die
116     *           Server should not see a request with this set.
117     *     @type string $binary_error_details
118     *     @type \Grpc\Testing\ErrorStatus $expected_error
119     *     @type int $server_sleep_us
120     *           sleep when invoking server for deadline tests
121     *     @type int $backend_channel_idx
122     *           which backend to send request to
123     *     @type bool $echo_metadata_initially
124     *     @type bool $server_notify_client_when_started
125     * }
126     */
127    public function __construct($data = NULL) {
128        \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
129        parent::__construct($data);
130    }
131
132    /**
133     * Generated from protobuf field <code>bool echo_deadline = 1;</code>
134     * @return bool
135     */
136    public function getEchoDeadline()
137    {
138        return $this->echo_deadline;
139    }
140
141    /**
142     * Generated from protobuf field <code>bool echo_deadline = 1;</code>
143     * @param bool $var
144     * @return $this
145     */
146    public function setEchoDeadline($var)
147    {
148        GPBUtil::checkBool($var);
149        $this->echo_deadline = $var;
150
151        return $this;
152    }
153
154    /**
155     * Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
156     * @return int
157     */
158    public function getClientCancelAfterUs()
159    {
160        return $this->client_cancel_after_us;
161    }
162
163    /**
164     * Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
165     * @param int $var
166     * @return $this
167     */
168    public function setClientCancelAfterUs($var)
169    {
170        GPBUtil::checkInt32($var);
171        $this->client_cancel_after_us = $var;
172
173        return $this;
174    }
175
176    /**
177     * Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
178     * @return int
179     */
180    public function getServerCancelAfterUs()
181    {
182        return $this->server_cancel_after_us;
183    }
184
185    /**
186     * Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
187     * @param int $var
188     * @return $this
189     */
190    public function setServerCancelAfterUs($var)
191    {
192        GPBUtil::checkInt32($var);
193        $this->server_cancel_after_us = $var;
194
195        return $this;
196    }
197
198    /**
199     * Generated from protobuf field <code>bool echo_metadata = 4;</code>
200     * @return bool
201     */
202    public function getEchoMetadata()
203    {
204        return $this->echo_metadata;
205    }
206
207    /**
208     * Generated from protobuf field <code>bool echo_metadata = 4;</code>
209     * @param bool $var
210     * @return $this
211     */
212    public function setEchoMetadata($var)
213    {
214        GPBUtil::checkBool($var);
215        $this->echo_metadata = $var;
216
217        return $this;
218    }
219
220    /**
221     * Generated from protobuf field <code>bool check_auth_context = 5;</code>
222     * @return bool
223     */
224    public function getCheckAuthContext()
225    {
226        return $this->check_auth_context;
227    }
228
229    /**
230     * Generated from protobuf field <code>bool check_auth_context = 5;</code>
231     * @param bool $var
232     * @return $this
233     */
234    public function setCheckAuthContext($var)
235    {
236        GPBUtil::checkBool($var);
237        $this->check_auth_context = $var;
238
239        return $this;
240    }
241
242    /**
243     * Generated from protobuf field <code>int32 response_message_length = 6;</code>
244     * @return int
245     */
246    public function getResponseMessageLength()
247    {
248        return $this->response_message_length;
249    }
250
251    /**
252     * Generated from protobuf field <code>int32 response_message_length = 6;</code>
253     * @param int $var
254     * @return $this
255     */
256    public function setResponseMessageLength($var)
257    {
258        GPBUtil::checkInt32($var);
259        $this->response_message_length = $var;
260
261        return $this;
262    }
263
264    /**
265     * Generated from protobuf field <code>bool echo_peer = 7;</code>
266     * @return bool
267     */
268    public function getEchoPeer()
269    {
270        return $this->echo_peer;
271    }
272
273    /**
274     * Generated from protobuf field <code>bool echo_peer = 7;</code>
275     * @param bool $var
276     * @return $this
277     */
278    public function setEchoPeer($var)
279    {
280        GPBUtil::checkBool($var);
281        $this->echo_peer = $var;
282
283        return $this;
284    }
285
286    /**
287     * will force check_auth_context.
288     *
289     * Generated from protobuf field <code>string expected_client_identity = 8;</code>
290     * @return string
291     */
292    public function getExpectedClientIdentity()
293    {
294        return $this->expected_client_identity;
295    }
296
297    /**
298     * will force check_auth_context.
299     *
300     * Generated from protobuf field <code>string expected_client_identity = 8;</code>
301     * @param string $var
302     * @return $this
303     */
304    public function setExpectedClientIdentity($var)
305    {
306        GPBUtil::checkString($var, True);
307        $this->expected_client_identity = $var;
308
309        return $this;
310    }
311
312    /**
313     * Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
314     * @return bool
315     */
316    public function getSkipCancelledCheck()
317    {
318        return $this->skip_cancelled_check;
319    }
320
321    /**
322     * Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
323     * @param bool $var
324     * @return $this
325     */
326    public function setSkipCancelledCheck($var)
327    {
328        GPBUtil::checkBool($var);
329        $this->skip_cancelled_check = $var;
330
331        return $this;
332    }
333
334    /**
335     * Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
336     * @return string
337     */
338    public function getExpectedTransportSecurityType()
339    {
340        return $this->expected_transport_security_type;
341    }
342
343    /**
344     * Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
345     * @param string $var
346     * @return $this
347     */
348    public function setExpectedTransportSecurityType($var)
349    {
350        GPBUtil::checkString($var, True);
351        $this->expected_transport_security_type = $var;
352
353        return $this;
354    }
355
356    /**
357     * Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
358     * @return \Grpc\Testing\DebugInfo
359     */
360    public function getDebugInfo()
361    {
362        return $this->debug_info;
363    }
364
365    /**
366     * Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
367     * @param \Grpc\Testing\DebugInfo $var
368     * @return $this
369     */
370    public function setDebugInfo($var)
371    {
372        GPBUtil::checkMessage($var, \Grpc\Testing\DebugInfo::class);
373        $this->debug_info = $var;
374
375        return $this;
376    }
377
378    /**
379     * Server should not see a request with this set.
380     *
381     * Generated from protobuf field <code>bool server_die = 12;</code>
382     * @return bool
383     */
384    public function getServerDie()
385    {
386        return $this->server_die;
387    }
388
389    /**
390     * Server should not see a request with this set.
391     *
392     * Generated from protobuf field <code>bool server_die = 12;</code>
393     * @param bool $var
394     * @return $this
395     */
396    public function setServerDie($var)
397    {
398        GPBUtil::checkBool($var);
399        $this->server_die = $var;
400
401        return $this;
402    }
403
404    /**
405     * Generated from protobuf field <code>string binary_error_details = 13;</code>
406     * @return string
407     */
408    public function getBinaryErrorDetails()
409    {
410        return $this->binary_error_details;
411    }
412
413    /**
414     * Generated from protobuf field <code>string binary_error_details = 13;</code>
415     * @param string $var
416     * @return $this
417     */
418    public function setBinaryErrorDetails($var)
419    {
420        GPBUtil::checkString($var, True);
421        $this->binary_error_details = $var;
422
423        return $this;
424    }
425
426    /**
427     * Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
428     * @return \Grpc\Testing\ErrorStatus
429     */
430    public function getExpectedError()
431    {
432        return $this->expected_error;
433    }
434
435    /**
436     * Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
437     * @param \Grpc\Testing\ErrorStatus $var
438     * @return $this
439     */
440    public function setExpectedError($var)
441    {
442        GPBUtil::checkMessage($var, \Grpc\Testing\ErrorStatus::class);
443        $this->expected_error = $var;
444
445        return $this;
446    }
447
448    /**
449     * sleep when invoking server for deadline tests
450     *
451     * Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
452     * @return int
453     */
454    public function getServerSleepUs()
455    {
456        return $this->server_sleep_us;
457    }
458
459    /**
460     * sleep when invoking server for deadline tests
461     *
462     * Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
463     * @param int $var
464     * @return $this
465     */
466    public function setServerSleepUs($var)
467    {
468        GPBUtil::checkInt32($var);
469        $this->server_sleep_us = $var;
470
471        return $this;
472    }
473
474    /**
475     * which backend to send request to
476     *
477     * Generated from protobuf field <code>int32 backend_channel_idx = 16;</code>
478     * @return int
479     */
480    public function getBackendChannelIdx()
481    {
482        return $this->backend_channel_idx;
483    }
484
485    /**
486     * which backend to send request to
487     *
488     * Generated from protobuf field <code>int32 backend_channel_idx = 16;</code>
489     * @param int $var
490     * @return $this
491     */
492    public function setBackendChannelIdx($var)
493    {
494        GPBUtil::checkInt32($var);
495        $this->backend_channel_idx = $var;
496
497        return $this;
498    }
499
500    /**
501     * Generated from protobuf field <code>bool echo_metadata_initially = 17;</code>
502     * @return bool
503     */
504    public function getEchoMetadataInitially()
505    {
506        return $this->echo_metadata_initially;
507    }
508
509    /**
510     * Generated from protobuf field <code>bool echo_metadata_initially = 17;</code>
511     * @param bool $var
512     * @return $this
513     */
514    public function setEchoMetadataInitially($var)
515    {
516        GPBUtil::checkBool($var);
517        $this->echo_metadata_initially = $var;
518
519        return $this;
520    }
521
522    /**
523     * Generated from protobuf field <code>bool server_notify_client_when_started = 18;</code>
524     * @return bool
525     */
526    public function getServerNotifyClientWhenStarted()
527    {
528        return $this->server_notify_client_when_started;
529    }
530
531    /**
532     * Generated from protobuf field <code>bool server_notify_client_when_started = 18;</code>
533     * @param bool $var
534     * @return $this
535     */
536    public function setServerNotifyClientWhenStarted($var)
537    {
538        GPBUtil::checkBool($var);
539        $this->server_notify_client_when_started = $var;
540
541        return $this;
542    }
543
544}
545
546