Debian Codegraph @

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

raw
1 <?php
2 # Generated by the protocol buffer compiler. DO NOT EDIT!
3 # source: src/proto/grpc/testing/control.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 * Generated from protobuf message <code>grpc.testing.ClientConfig</code>
13 */
14 class ClientConfig extends \Google\Protobuf\Internal\Message
15 {
16 /**
17 * List of targets to connect to. At least one target needs to be specified.
18 *
19 * Generated from protobuf field <code>repeated string server_targets = 1;</code>
20 */
21 private $server_targets;
22 /**
23 * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
24 */
25 protected $client_type = 0;
26 /**
27 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
28 */
29 protected $security_params = null;
30 /**
31 * How many concurrent RPCs to start for each channel.
32 * For synchronous client, use a separate thread for each outstanding RPC.
33 *
34 * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
35 */
36 protected $outstanding_rpcs_per_channel = 0;
37 /**
38 * Number of independent client channels to create.
39 * i-th channel will connect to server_target[i % server_targets.size()]
40 *
41 * Generated from protobuf field <code>int32 client_channels = 5;</code>
42 */
43 protected $client_channels = 0;
44 /**
45 * Only for async client. Number of threads to use to start/manage RPCs.
46 *
47 * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
48 */
49 protected $async_client_threads = 0;
50 /**
51 * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
52 */
53 protected $rpc_type = 0;
54 /**
55 * The requested load for the entire client (aggregated over all the threads).
56 *
57 * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
58 */
59 protected $load_params = null;
60 /**
61 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
62 */
63 protected $payload_config = null;
64 /**
65 * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
66 */
67 protected $histogram_params = null;
68 /**
69 * Specify the cores we should run the client on, if desired
70 *
71 * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
72 */
73 private $core_list;
74 /**
75 * Generated from protobuf field <code>int32 core_limit = 14;</code>
76 */
77 protected $core_limit = 0;
78 /**
79 * If we use an OTHER_CLIENT client_type, this string gives more detail
80 *
81 * Generated from protobuf field <code>string other_client_api = 15;</code>
82 */
83 protected $other_client_api = '';
84 /**
85 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
86 */
87 private $channel_args;
88 /**
89 * Number of threads that share each completion queue
90 *
91 * Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
92 */
93 protected $threads_per_cq = 0;
94 /**
95 * Number of messages on a stream before it gets finished/restarted
96 *
97 * Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
98 */
99 protected $messages_per_stream = 0;
100 /**
101 * Use coalescing API when possible.
102 *
103 * Generated from protobuf field <code>bool use_coalesce_api = 19;</code>
104 */
105 protected $use_coalesce_api = false;
106 /**
107 * If 0, disabled. Else, specifies the period between gathering latency
108 * medians in milliseconds.
109 *
110 * Generated from protobuf field <code>int32 median_latency_collection_interval_millis = 20;</code>
111 */
112 protected $median_latency_collection_interval_millis = 0;
113 /**
114 * Number of client processes. 0 indicates no restriction.
115 *
116 * Generated from protobuf field <code>int32 client_processes = 21;</code>
117 */
118 protected $client_processes = 0;
119
120 /**
121 * Constructor.
122 *
123 * @param array $data {
124 * Optional. Data for populating the Message object.
125 *
126 * @type string[]|\Google\Protobuf\Internal\RepeatedField $server_targets
127 * List of targets to connect to. At least one target needs to be specified.
128 * @type int $client_type
129 * @type \Grpc\Testing\SecurityParams $security_params
130 * @type int $outstanding_rpcs_per_channel
131 * How many concurrent RPCs to start for each channel.
132 * For synchronous client, use a separate thread for each outstanding RPC.
133 * @type int $client_channels
134 * Number of independent client channels to create.
135 * i-th channel will connect to server_target[i % server_targets.size()]
136 * @type int $async_client_threads
137 * Only for async client. Number of threads to use to start/manage RPCs.
138 * @type int $rpc_type
139 * @type \Grpc\Testing\LoadParams $load_params
140 * The requested load for the entire client (aggregated over all the threads).
141 * @type \Grpc\Testing\PayloadConfig $payload_config
142 * @type \Grpc\Testing\HistogramParams $histogram_params
143 * @type int[]|\Google\Protobuf\Internal\RepeatedField $core_list
144 * Specify the cores we should run the client on, if desired
145 * @type int $core_limit
146 * @type string $other_client_api
147 * If we use an OTHER_CLIENT client_type, this string gives more detail
148 * @type \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $channel_args
149 * @type int $threads_per_cq
150 * Number of threads that share each completion queue
151 * @type int $messages_per_stream
152 * Number of messages on a stream before it gets finished/restarted
153 * @type bool $use_coalesce_api
154 * Use coalescing API when possible.
155 * @type int $median_latency_collection_interval_millis
156 * If 0, disabled. Else, specifies the period between gathering latency
157 * medians in milliseconds.
158 * @type int $client_processes
159 * Number of client processes. 0 indicates no restriction.
160 * }
161 */
162 public function __construct($data = NULL) {
163 \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
164 parent::__construct($data);
165 }
166
167 /**
168 * List of targets to connect to. At least one target needs to be specified.
169 *
170 * Generated from protobuf field <code>repeated string server_targets = 1;</code>
171 * @return \Google\Protobuf\Internal\RepeatedField
172 */
173 public function getServerTargets()
174 {
175 return $this->server_targets;
176 }
177
178 /**
179 * List of targets to connect to. At least one target needs to be specified.
180 *
181 * Generated from protobuf field <code>repeated string server_targets = 1;</code>
182 * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
183 * @return $this
184 */
185 public function setServerTargets($var)
186 {
187 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
188 $this->server_targets = $arr;
189
190 return $this;
191 }
192
193 /**
194 * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
195 * @return int
196 */
197 public function getClientType()
198 {
199 return $this->client_type;
200 }
201
202 /**
203 * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
204 * @param int $var
205 * @return $this
206 */
207 public function setClientType($var)
208 {
209 GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class);
210 $this->client_type = $var;
211
212 return $this;
213 }
214
215 /**
216 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
217 * @return \Grpc\Testing\SecurityParams
218 */
219 public function getSecurityParams()
220 {
221 return $this->security_params;
222 }
223
224 /**
225 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
226 * @param \Grpc\Testing\SecurityParams $var
227 * @return $this
228 */
229 public function setSecurityParams($var)
230 {
231 GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
232 $this->security_params = $var;
233
234 return $this;
235 }
236
237 /**
238 * How many concurrent RPCs to start for each channel.
239 * For synchronous client, use a separate thread for each outstanding RPC.
240 *
241 * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
242 * @return int
243 */
244 public function getOutstandingRpcsPerChannel()
245 {
246 return $this->outstanding_rpcs_per_channel;
247 }
248
249 /**
250 * How many concurrent RPCs to start for each channel.
251 * For synchronous client, use a separate thread for each outstanding RPC.
252 *
253 * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
254 * @param int $var
255 * @return $this
256 */
257 public function setOutstandingRpcsPerChannel($var)
258 {
259 GPBUtil::checkInt32($var);
260 $this->outstanding_rpcs_per_channel = $var;
261
262 return $this;
263 }
264
265 /**
266 * Number of independent client channels to create.
267 * i-th channel will connect to server_target[i % server_targets.size()]
268 *
269 * Generated from protobuf field <code>int32 client_channels = 5;</code>
270 * @return int
271 */
272 public function getClientChannels()
273 {
274 return $this->client_channels;
275 }
276
277 /**
278 * Number of independent client channels to create.
279 * i-th channel will connect to server_target[i % server_targets.size()]
280 *
281 * Generated from protobuf field <code>int32 client_channels = 5;</code>
282 * @param int $var
283 * @return $this
284 */
285 public function setClientChannels($var)
286 {
287 GPBUtil::checkInt32($var);
288 $this->client_channels = $var;
289
290 return $this;
291 }
292
293 /**
294 * Only for async client. Number of threads to use to start/manage RPCs.
295 *
296 * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
297 * @return int
298 */
299 public function getAsyncClientThreads()
300 {
301 return $this->async_client_threads;
302 }
303
304 /**
305 * Only for async client. Number of threads to use to start/manage RPCs.
306 *
307 * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
308 * @param int $var
309 * @return $this
310 */
311 public function setAsyncClientThreads($var)
312 {
313 GPBUtil::checkInt32($var);
314 $this->async_client_threads = $var;
315
316 return $this;
317 }
318
319 /**
320 * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
321 * @return int
322 */
323 public function getRpcType()
324 {
325 return $this->rpc_type;
326 }
327
328 /**
329 * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
330 * @param int $var
331 * @return $this
332 */
333 public function setRpcType($var)
334 {
335 GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class);
336 $this->rpc_type = $var;
337
338 return $this;
339 }
340
341 /**
342 * The requested load for the entire client (aggregated over all the threads).
343 *
344 * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
345 * @return \Grpc\Testing\LoadParams
346 */
347 public function getLoadParams()
348 {
349 return $this->load_params;
350 }
351
352 /**
353 * The requested load for the entire client (aggregated over all the threads).
354 *
355 * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
356 * @param \Grpc\Testing\LoadParams $var
357 * @return $this
358 */
359 public function setLoadParams($var)
360 {
361 GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class);
362 $this->load_params = $var;
363
364 return $this;
365 }
366
367 /**
368 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
369 * @return \Grpc\Testing\PayloadConfig
370 */
371 public function getPayloadConfig()
372 {
373 return $this->payload_config;
374 }
375
376 /**
377 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
378 * @param \Grpc\Testing\PayloadConfig $var
379 * @return $this
380 */
381 public function setPayloadConfig($var)
382 {
383 GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
384 $this->payload_config = $var;
385
386 return $this;
387 }
388
389 /**
390 * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
391 * @return \Grpc\Testing\HistogramParams
392 */
393 public function getHistogramParams()
394 {
395 return $this->histogram_params;
396 }
397
398 /**
399 * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
400 * @param \Grpc\Testing\HistogramParams $var
401 * @return $this
402 */
403 public function setHistogramParams($var)
404 {
405 GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class);
406 $this->histogram_params = $var;
407
408 return $this;
409 }
410
411 /**
412 * Specify the cores we should run the client on, if desired
413 *
414 * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
415 * @return \Google\Protobuf\Internal\RepeatedField
416 */
417 public function getCoreList()
418 {
419 return $this->core_list;
420 }
421
422 /**
423 * Specify the cores we should run the client on, if desired
424 *
425 * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
426 * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
427 * @return $this
428 */
429 public function setCoreList($var)
430 {
431 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
432 $this->core_list = $arr;
433
434 return $this;
435 }
436
437 /**
438 * Generated from protobuf field <code>int32 core_limit = 14;</code>
439 * @return int
440 */
441 public function getCoreLimit()
442 {
443 return $this->core_limit;
444 }
445
446 /**
447 * Generated from protobuf field <code>int32 core_limit = 14;</code>
448 * @param int $var
449 * @return $this
450 */
451 public function setCoreLimit($var)
452 {
453 GPBUtil::checkInt32($var);
454 $this->core_limit = $var;
455
456 return $this;
457 }
458
459 /**
460 * If we use an OTHER_CLIENT client_type, this string gives more detail
461 *
462 * Generated from protobuf field <code>string other_client_api = 15;</code>
463 * @return string
464 */
465 public function getOtherClientApi()
466 {
467 return $this->other_client_api;
468 }
469
470 /**
471 * If we use an OTHER_CLIENT client_type, this string gives more detail
472 *
473 * Generated from protobuf field <code>string other_client_api = 15;</code>
474 * @param string $var
475 * @return $this
476 */
477 public function setOtherClientApi($var)
478 {
479 GPBUtil::checkString($var, True);
480 $this->other_client_api = $var;
481
482 return $this;
483 }
484
485 /**
486 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
487 * @return \Google\Protobuf\Internal\RepeatedField
488 */
489 public function getChannelArgs()
490 {
491 return $this->channel_args;
492 }
493
494 /**
495 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
496 * @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var
497 * @return $this
498 */
499 public function setChannelArgs($var)
500 {
501 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
502 $this->channel_args = $arr;
503
504 return $this;
505 }
506
507 /**
508 * Number of threads that share each completion queue
509 *
510 * Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
511 * @return int
512 */
513 public function getThreadsPerCq()
514 {
515 return $this->threads_per_cq;
516 }
517
518 /**
519 * Number of threads that share each completion queue
520 *
521 * Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
522 * @param int $var
523 * @return $this
524 */
525 public function setThreadsPerCq($var)
526 {
527 GPBUtil::checkInt32($var);
528 $this->threads_per_cq = $var;
529
530 return $this;
531 }
532
533 /**
534 * Number of messages on a stream before it gets finished/restarted
535 *
536 * Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
537 * @return int
538 */
539 public function getMessagesPerStream()
540 {
541 return $this->messages_per_stream;
542 }
543
544 /**
545 * Number of messages on a stream before it gets finished/restarted
546 *
547 * Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
548 * @param int $var
549 * @return $this
550 */
551 public function setMessagesPerStream($var)
552 {
553 GPBUtil::checkInt32($var);
554 $this->messages_per_stream = $var;
555
556 return $this;
557 }
558
559 /**
560 * Use coalescing API when possible.
561 *
562 * Generated from protobuf field <code>bool use_coalesce_api = 19;</code>
563 * @return bool
564 */
565 public function getUseCoalesceApi()
566 {
567 return $this->use_coalesce_api;
568 }
569
570 /**
571 * Use coalescing API when possible.
572 *
573 * Generated from protobuf field <code>bool use_coalesce_api = 19;</code>
574 * @param bool $var
575 * @return $this
576 */
577 public function setUseCoalesceApi($var)
578 {
579 GPBUtil::checkBool($var);
580 $this->use_coalesce_api = $var;
581
582 return $this;
583 }
584
585 /**
586 * If 0, disabled. Else, specifies the period between gathering latency
587 * medians in milliseconds.
588 *
589 * Generated from protobuf field <code>int32 median_latency_collection_interval_millis = 20;</code>
590 * @return int
591 */
592 public function getMedianLatencyCollectionIntervalMillis()
593 {
594 return $this->median_latency_collection_interval_millis;
595 }
596
597 /**
598 * If 0, disabled. Else, specifies the period between gathering latency
599 * medians in milliseconds.
600 *
601 * Generated from protobuf field <code>int32 median_latency_collection_interval_millis = 20;</code>
602 * @param int $var
603 * @return $this
604 */
605 public function setMedianLatencyCollectionIntervalMillis($var)
606 {
607 GPBUtil::checkInt32($var);
608 $this->median_latency_collection_interval_millis = $var;
609
610 return $this;
611 }
612
613 /**
614 * Number of client processes. 0 indicates no restriction.
615 *
616 * Generated from protobuf field <code>int32 client_processes = 21;</code>
617 * @return int
618 */
619 public function getClientProcesses()
620 {
621 return $this->client_processes;
622 }
623
624 /**
625 * Number of client processes. 0 indicates no restriction.
626 *
627 * Generated from protobuf field <code>int32 client_processes = 21;</code>
628 * @param int $var
629 * @return $this
630 */
631 public function setClientProcesses($var)
632 {
633 GPBUtil::checkInt32($var);
634 $this->client_processes = $var;
635
636 return $this;
637 }
638
639 }
640