1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: src/proto/grpc/testing/control.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.ClientConfig</code> 13 */ 14class 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 private $client_type = 0; 26 /** 27 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code> 28 */ 29 private $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 private $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 private $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 private $async_client_threads = 0; 50 /** 51 * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code> 52 */ 53 private $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 private $load_params = null; 60 /** 61 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code> 62 */ 63 private $payload_config = null; 64 /** 65 * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code> 66 */ 67 private $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 private $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 private $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 private $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 private $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 private $use_coalesce_api = false; 106 107 public function __construct() { 108 \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); 109 parent::__construct(); 110 } 111 112 /** 113 * List of targets to connect to. At least one target needs to be specified. 114 * 115 * Generated from protobuf field <code>repeated string server_targets = 1;</code> 116 * @return \Google\Protobuf\Internal\RepeatedField 117 */ 118 public function getServerTargets() 119 { 120 return $this->server_targets; 121 } 122 123 /** 124 * List of targets to connect to. At least one target needs to be specified. 125 * 126 * Generated from protobuf field <code>repeated string server_targets = 1;</code> 127 * @param string[]|\Google\Protobuf\Internal\RepeatedField $var 128 * @return $this 129 */ 130 public function setServerTargets($var) 131 { 132 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); 133 $this->server_targets = $arr; 134 135 return $this; 136 } 137 138 /** 139 * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code> 140 * @return int 141 */ 142 public function getClientType() 143 { 144 return $this->client_type; 145 } 146 147 /** 148 * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code> 149 * @param int $var 150 * @return $this 151 */ 152 public function setClientType($var) 153 { 154 GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class); 155 $this->client_type = $var; 156 157 return $this; 158 } 159 160 /** 161 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code> 162 * @return \Grpc\Testing\SecurityParams 163 */ 164 public function getSecurityParams() 165 { 166 return $this->security_params; 167 } 168 169 /** 170 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code> 171 * @param \Grpc\Testing\SecurityParams $var 172 * @return $this 173 */ 174 public function setSecurityParams($var) 175 { 176 GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class); 177 $this->security_params = $var; 178 179 return $this; 180 } 181 182 /** 183 * How many concurrent RPCs to start for each channel. 184 * For synchronous client, use a separate thread for each outstanding RPC. 185 * 186 * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code> 187 * @return int 188 */ 189 public function getOutstandingRpcsPerChannel() 190 { 191 return $this->outstanding_rpcs_per_channel; 192 } 193 194 /** 195 * How many concurrent RPCs to start for each channel. 196 * For synchronous client, use a separate thread for each outstanding RPC. 197 * 198 * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code> 199 * @param int $var 200 * @return $this 201 */ 202 public function setOutstandingRpcsPerChannel($var) 203 { 204 GPBUtil::checkInt32($var); 205 $this->outstanding_rpcs_per_channel = $var; 206 207 return $this; 208 } 209 210 /** 211 * Number of independent client channels to create. 212 * i-th channel will connect to server_target[i % server_targets.size()] 213 * 214 * Generated from protobuf field <code>int32 client_channels = 5;</code> 215 * @return int 216 */ 217 public function getClientChannels() 218 { 219 return $this->client_channels; 220 } 221 222 /** 223 * Number of independent client channels to create. 224 * i-th channel will connect to server_target[i % server_targets.size()] 225 * 226 * Generated from protobuf field <code>int32 client_channels = 5;</code> 227 * @param int $var 228 * @return $this 229 */ 230 public function setClientChannels($var) 231 { 232 GPBUtil::checkInt32($var); 233 $this->client_channels = $var; 234 235 return $this; 236 } 237 238 /** 239 * Only for async client. Number of threads to use to start/manage RPCs. 240 * 241 * Generated from protobuf field <code>int32 async_client_threads = 7;</code> 242 * @return int 243 */ 244 public function getAsyncClientThreads() 245 { 246 return $this->async_client_threads; 247 } 248 249 /** 250 * Only for async client. Number of threads to use to start/manage RPCs. 251 * 252 * Generated from protobuf field <code>int32 async_client_threads = 7;</code> 253 * @param int $var 254 * @return $this 255 */ 256 public function setAsyncClientThreads($var) 257 { 258 GPBUtil::checkInt32($var); 259 $this->async_client_threads = $var; 260 261 return $this; 262 } 263 264 /** 265 * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code> 266 * @return int 267 */ 268 public function getRpcType() 269 { 270 return $this->rpc_type; 271 } 272 273 /** 274 * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code> 275 * @param int $var 276 * @return $this 277 */ 278 public function setRpcType($var) 279 { 280 GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class); 281 $this->rpc_type = $var; 282 283 return $this; 284 } 285 286 /** 287 * The requested load for the entire client (aggregated over all the threads). 288 * 289 * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code> 290 * @return \Grpc\Testing\LoadParams 291 */ 292 public function getLoadParams() 293 { 294 return $this->load_params; 295 } 296 297 /** 298 * The requested load for the entire client (aggregated over all the threads). 299 * 300 * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code> 301 * @param \Grpc\Testing\LoadParams $var 302 * @return $this 303 */ 304 public function setLoadParams($var) 305 { 306 GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class); 307 $this->load_params = $var; 308 309 return $this; 310 } 311 312 /** 313 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code> 314 * @return \Grpc\Testing\PayloadConfig 315 */ 316 public function getPayloadConfig() 317 { 318 return $this->payload_config; 319 } 320 321 /** 322 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code> 323 * @param \Grpc\Testing\PayloadConfig $var 324 * @return $this 325 */ 326 public function setPayloadConfig($var) 327 { 328 GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class); 329 $this->payload_config = $var; 330 331 return $this; 332 } 333 334 /** 335 * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code> 336 * @return \Grpc\Testing\HistogramParams 337 */ 338 public function getHistogramParams() 339 { 340 return $this->histogram_params; 341 } 342 343 /** 344 * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code> 345 * @param \Grpc\Testing\HistogramParams $var 346 * @return $this 347 */ 348 public function setHistogramParams($var) 349 { 350 GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class); 351 $this->histogram_params = $var; 352 353 return $this; 354 } 355 356 /** 357 * Specify the cores we should run the client on, if desired 358 * 359 * Generated from protobuf field <code>repeated int32 core_list = 13;</code> 360 * @return \Google\Protobuf\Internal\RepeatedField 361 */ 362 public function getCoreList() 363 { 364 return $this->core_list; 365 } 366 367 /** 368 * Specify the cores we should run the client on, if desired 369 * 370 * Generated from protobuf field <code>repeated int32 core_list = 13;</code> 371 * @param int[]|\Google\Protobuf\Internal\RepeatedField $var 372 * @return $this 373 */ 374 public function setCoreList($var) 375 { 376 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); 377 $this->core_list = $arr; 378 379 return $this; 380 } 381 382 /** 383 * Generated from protobuf field <code>int32 core_limit = 14;</code> 384 * @return int 385 */ 386 public function getCoreLimit() 387 { 388 return $this->core_limit; 389 } 390 391 /** 392 * Generated from protobuf field <code>int32 core_limit = 14;</code> 393 * @param int $var 394 * @return $this 395 */ 396 public function setCoreLimit($var) 397 { 398 GPBUtil::checkInt32($var); 399 $this->core_limit = $var; 400 401 return $this; 402 } 403 404 /** 405 * If we use an OTHER_CLIENT client_type, this string gives more detail 406 * 407 * Generated from protobuf field <code>string other_client_api = 15;</code> 408 * @return string 409 */ 410 public function getOtherClientApi() 411 { 412 return $this->other_client_api; 413 } 414 415 /** 416 * If we use an OTHER_CLIENT client_type, this string gives more detail 417 * 418 * Generated from protobuf field <code>string other_client_api = 15;</code> 419 * @param string $var 420 * @return $this 421 */ 422 public function setOtherClientApi($var) 423 { 424 GPBUtil::checkString($var, True); 425 $this->other_client_api = $var; 426 427 return $this; 428 } 429 430 /** 431 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code> 432 * @return \Google\Protobuf\Internal\RepeatedField 433 */ 434 public function getChannelArgs() 435 { 436 return $this->channel_args; 437 } 438 439 /** 440 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code> 441 * @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var 442 * @return $this 443 */ 444 public function setChannelArgs($var) 445 { 446 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class); 447 $this->channel_args = $arr; 448 449 return $this; 450 } 451 452 /** 453 * Number of threads that share each completion queue 454 * 455 * Generated from protobuf field <code>int32 threads_per_cq = 17;</code> 456 * @return int 457 */ 458 public function getThreadsPerCq() 459 { 460 return $this->threads_per_cq; 461 } 462 463 /** 464 * Number of threads that share each completion queue 465 * 466 * Generated from protobuf field <code>int32 threads_per_cq = 17;</code> 467 * @param int $var 468 * @return $this 469 */ 470 public function setThreadsPerCq($var) 471 { 472 GPBUtil::checkInt32($var); 473 $this->threads_per_cq = $var; 474 475 return $this; 476 } 477 478 /** 479 * Number of messages on a stream before it gets finished/restarted 480 * 481 * Generated from protobuf field <code>int32 messages_per_stream = 18;</code> 482 * @return int 483 */ 484 public function getMessagesPerStream() 485 { 486 return $this->messages_per_stream; 487 } 488 489 /** 490 * Number of messages on a stream before it gets finished/restarted 491 * 492 * Generated from protobuf field <code>int32 messages_per_stream = 18;</code> 493 * @param int $var 494 * @return $this 495 */ 496 public function setMessagesPerStream($var) 497 { 498 GPBUtil::checkInt32($var); 499 $this->messages_per_stream = $var; 500 501 return $this; 502 } 503 504 /** 505 * Use coalescing API when possible. 506 * 507 * Generated from protobuf field <code>bool use_coalesce_api = 19;</code> 508 * @return bool 509 */ 510 public function getUseCoalesceApi() 511 { 512 return $this->use_coalesce_api; 513 } 514 515 /** 516 * Use coalescing API when possible. 517 * 518 * Generated from protobuf field <code>bool use_coalesce_api = 19;</code> 519 * @param bool $var 520 * @return $this 521 */ 522 public function setUseCoalesceApi($var) 523 { 524 GPBUtil::checkBool($var); 525 $this->use_coalesce_api = $var; 526 527 return $this; 528 } 529 530} 531 532