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    private $echo_deadline = false;
20    /**
21     * Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
22     */
23    private $client_cancel_after_us = 0;
24    /**
25     * Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
26     */
27    private $server_cancel_after_us = 0;
28    /**
29     * Generated from protobuf field <code>bool echo_metadata = 4;</code>
30     */
31    private $echo_metadata = false;
32    /**
33     * Generated from protobuf field <code>bool check_auth_context = 5;</code>
34     */
35    private $check_auth_context = false;
36    /**
37     * Generated from protobuf field <code>int32 response_message_length = 6;</code>
38     */
39    private $response_message_length = 0;
40    /**
41     * Generated from protobuf field <code>bool echo_peer = 7;</code>
42     */
43    private $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    private $expected_client_identity = '';
50    /**
51     * Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
52     */
53    private $skip_cancelled_check = false;
54    /**
55     * Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
56     */
57    private $expected_transport_security_type = '';
58    /**
59     * Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
60     */
61    private $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    private $server_die = false;
68    /**
69     * Generated from protobuf field <code>string binary_error_details = 13;</code>
70     */
71    private $binary_error_details = '';
72    /**
73     * Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
74     */
75    private $expected_error = null;
76    /**
77     * Amount to sleep when invoking server
78     *
79     * Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
80     */
81    private $server_sleep_us = 0;
82
83    public function __construct() {
84        \GPBMetadata\Src\Proto\Grpc\Testing\EchoMessages::initOnce();
85        parent::__construct();
86    }
87
88    /**
89     * Generated from protobuf field <code>bool echo_deadline = 1;</code>
90     * @return bool
91     */
92    public function getEchoDeadline()
93    {
94        return $this->echo_deadline;
95    }
96
97    /**
98     * Generated from protobuf field <code>bool echo_deadline = 1;</code>
99     * @param bool $var
100     * @return $this
101     */
102    public function setEchoDeadline($var)
103    {
104        GPBUtil::checkBool($var);
105        $this->echo_deadline = $var;
106
107        return $this;
108    }
109
110    /**
111     * Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
112     * @return int
113     */
114    public function getClientCancelAfterUs()
115    {
116        return $this->client_cancel_after_us;
117    }
118
119    /**
120     * Generated from protobuf field <code>int32 client_cancel_after_us = 2;</code>
121     * @param int $var
122     * @return $this
123     */
124    public function setClientCancelAfterUs($var)
125    {
126        GPBUtil::checkInt32($var);
127        $this->client_cancel_after_us = $var;
128
129        return $this;
130    }
131
132    /**
133     * Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
134     * @return int
135     */
136    public function getServerCancelAfterUs()
137    {
138        return $this->server_cancel_after_us;
139    }
140
141    /**
142     * Generated from protobuf field <code>int32 server_cancel_after_us = 3;</code>
143     * @param int $var
144     * @return $this
145     */
146    public function setServerCancelAfterUs($var)
147    {
148        GPBUtil::checkInt32($var);
149        $this->server_cancel_after_us = $var;
150
151        return $this;
152    }
153
154    /**
155     * Generated from protobuf field <code>bool echo_metadata = 4;</code>
156     * @return bool
157     */
158    public function getEchoMetadata()
159    {
160        return $this->echo_metadata;
161    }
162
163    /**
164     * Generated from protobuf field <code>bool echo_metadata = 4;</code>
165     * @param bool $var
166     * @return $this
167     */
168    public function setEchoMetadata($var)
169    {
170        GPBUtil::checkBool($var);
171        $this->echo_metadata = $var;
172
173        return $this;
174    }
175
176    /**
177     * Generated from protobuf field <code>bool check_auth_context = 5;</code>
178     * @return bool
179     */
180    public function getCheckAuthContext()
181    {
182        return $this->check_auth_context;
183    }
184
185    /**
186     * Generated from protobuf field <code>bool check_auth_context = 5;</code>
187     * @param bool $var
188     * @return $this
189     */
190    public function setCheckAuthContext($var)
191    {
192        GPBUtil::checkBool($var);
193        $this->check_auth_context = $var;
194
195        return $this;
196    }
197
198    /**
199     * Generated from protobuf field <code>int32 response_message_length = 6;</code>
200     * @return int
201     */
202    public function getResponseMessageLength()
203    {
204        return $this->response_message_length;
205    }
206
207    /**
208     * Generated from protobuf field <code>int32 response_message_length = 6;</code>
209     * @param int $var
210     * @return $this
211     */
212    public function setResponseMessageLength($var)
213    {
214        GPBUtil::checkInt32($var);
215        $this->response_message_length = $var;
216
217        return $this;
218    }
219
220    /**
221     * Generated from protobuf field <code>bool echo_peer = 7;</code>
222     * @return bool
223     */
224    public function getEchoPeer()
225    {
226        return $this->echo_peer;
227    }
228
229    /**
230     * Generated from protobuf field <code>bool echo_peer = 7;</code>
231     * @param bool $var
232     * @return $this
233     */
234    public function setEchoPeer($var)
235    {
236        GPBUtil::checkBool($var);
237        $this->echo_peer = $var;
238
239        return $this;
240    }
241
242    /**
243     * will force check_auth_context.
244     *
245     * Generated from protobuf field <code>string expected_client_identity = 8;</code>
246     * @return string
247     */
248    public function getExpectedClientIdentity()
249    {
250        return $this->expected_client_identity;
251    }
252
253    /**
254     * will force check_auth_context.
255     *
256     * Generated from protobuf field <code>string expected_client_identity = 8;</code>
257     * @param string $var
258     * @return $this
259     */
260    public function setExpectedClientIdentity($var)
261    {
262        GPBUtil::checkString($var, True);
263        $this->expected_client_identity = $var;
264
265        return $this;
266    }
267
268    /**
269     * Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
270     * @return bool
271     */
272    public function getSkipCancelledCheck()
273    {
274        return $this->skip_cancelled_check;
275    }
276
277    /**
278     * Generated from protobuf field <code>bool skip_cancelled_check = 9;</code>
279     * @param bool $var
280     * @return $this
281     */
282    public function setSkipCancelledCheck($var)
283    {
284        GPBUtil::checkBool($var);
285        $this->skip_cancelled_check = $var;
286
287        return $this;
288    }
289
290    /**
291     * Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
292     * @return string
293     */
294    public function getExpectedTransportSecurityType()
295    {
296        return $this->expected_transport_security_type;
297    }
298
299    /**
300     * Generated from protobuf field <code>string expected_transport_security_type = 10;</code>
301     * @param string $var
302     * @return $this
303     */
304    public function setExpectedTransportSecurityType($var)
305    {
306        GPBUtil::checkString($var, True);
307        $this->expected_transport_security_type = $var;
308
309        return $this;
310    }
311
312    /**
313     * Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
314     * @return \Grpc\Testing\DebugInfo
315     */
316    public function getDebugInfo()
317    {
318        return $this->debug_info;
319    }
320
321    /**
322     * Generated from protobuf field <code>.grpc.testing.DebugInfo debug_info = 11;</code>
323     * @param \Grpc\Testing\DebugInfo $var
324     * @return $this
325     */
326    public function setDebugInfo($var)
327    {
328        GPBUtil::checkMessage($var, \Grpc\Testing\DebugInfo::class);
329        $this->debug_info = $var;
330
331        return $this;
332    }
333
334    /**
335     * Server should not see a request with this set.
336     *
337     * Generated from protobuf field <code>bool server_die = 12;</code>
338     * @return bool
339     */
340    public function getServerDie()
341    {
342        return $this->server_die;
343    }
344
345    /**
346     * Server should not see a request with this set.
347     *
348     * Generated from protobuf field <code>bool server_die = 12;</code>
349     * @param bool $var
350     * @return $this
351     */
352    public function setServerDie($var)
353    {
354        GPBUtil::checkBool($var);
355        $this->server_die = $var;
356
357        return $this;
358    }
359
360    /**
361     * Generated from protobuf field <code>string binary_error_details = 13;</code>
362     * @return string
363     */
364    public function getBinaryErrorDetails()
365    {
366        return $this->binary_error_details;
367    }
368
369    /**
370     * Generated from protobuf field <code>string binary_error_details = 13;</code>
371     * @param string $var
372     * @return $this
373     */
374    public function setBinaryErrorDetails($var)
375    {
376        GPBUtil::checkString($var, True);
377        $this->binary_error_details = $var;
378
379        return $this;
380    }
381
382    /**
383     * Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
384     * @return \Grpc\Testing\ErrorStatus
385     */
386    public function getExpectedError()
387    {
388        return $this->expected_error;
389    }
390
391    /**
392     * Generated from protobuf field <code>.grpc.testing.ErrorStatus expected_error = 14;</code>
393     * @param \Grpc\Testing\ErrorStatus $var
394     * @return $this
395     */
396    public function setExpectedError($var)
397    {
398        GPBUtil::checkMessage($var, \Grpc\Testing\ErrorStatus::class);
399        $this->expected_error = $var;
400
401        return $this;
402    }
403
404    /**
405     * Amount to sleep when invoking server
406     *
407     * Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
408     * @return int
409     */
410    public function getServerSleepUs()
411    {
412        return $this->server_sleep_us;
413    }
414
415    /**
416     * Amount to sleep when invoking server
417     *
418     * Generated from protobuf field <code>int32 server_sleep_us = 15;</code>
419     * @param int $var
420     * @return $this
421     */
422    public function setServerSleepUs($var)
423    {
424        GPBUtil::checkInt32($var);
425        $this->server_sleep_us = $var;
426
427        return $this;
428    }
429
430}
431
432