/ev/external/grpc_old/src/php/tests/qps/generated_code/Grpc/Testing/ClientConfig.php

https://github.com/saaras-io/yastack · PHP · 499 lines · 188 code · 54 blank · 257 comment · 0 complexity · 84fff3acdcd03fa4d3d7915809d9d7e4 MD5 · raw file

  1. <?php
  2. # Generated by the protocol buffer compiler. DO NOT EDIT!
  3. # source: src/proto/grpc/testing/control.proto
  4. namespace Grpc\Testing;
  5. use Google\Protobuf\Internal\GPBType;
  6. use Google\Protobuf\Internal\RepeatedField;
  7. use Google\Protobuf\Internal\GPBUtil;
  8. /**
  9. * Generated from protobuf message <code>grpc.testing.ClientConfig</code>
  10. */
  11. class ClientConfig extends \Google\Protobuf\Internal\Message
  12. {
  13. /**
  14. * List of targets to connect to. At least one target needs to be specified.
  15. *
  16. * Generated from protobuf field <code>repeated string server_targets = 1;</code>
  17. */
  18. private $server_targets;
  19. /**
  20. * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
  21. */
  22. private $client_type = 0;
  23. /**
  24. * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
  25. */
  26. private $security_params = null;
  27. /**
  28. * How many concurrent RPCs to start for each channel.
  29. * For synchronous client, use a separate thread for each outstanding RPC.
  30. *
  31. * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
  32. */
  33. private $outstanding_rpcs_per_channel = 0;
  34. /**
  35. * Number of independent client channels to create.
  36. * i-th channel will connect to server_target[i % server_targets.size()]
  37. *
  38. * Generated from protobuf field <code>int32 client_channels = 5;</code>
  39. */
  40. private $client_channels = 0;
  41. /**
  42. * Only for async client. Number of threads to use to start/manage RPCs.
  43. *
  44. * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
  45. */
  46. private $async_client_threads = 0;
  47. /**
  48. * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
  49. */
  50. private $rpc_type = 0;
  51. /**
  52. * The requested load for the entire client (aggregated over all the threads).
  53. *
  54. * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
  55. */
  56. private $load_params = null;
  57. /**
  58. * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
  59. */
  60. private $payload_config = null;
  61. /**
  62. * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
  63. */
  64. private $histogram_params = null;
  65. /**
  66. * Specify the cores we should run the client on, if desired
  67. *
  68. * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
  69. */
  70. private $core_list;
  71. /**
  72. * Generated from protobuf field <code>int32 core_limit = 14;</code>
  73. */
  74. private $core_limit = 0;
  75. /**
  76. * If we use an OTHER_CLIENT client_type, this string gives more detail
  77. *
  78. * Generated from protobuf field <code>string other_client_api = 15;</code>
  79. */
  80. private $other_client_api = '';
  81. /**
  82. * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
  83. */
  84. private $channel_args;
  85. /**
  86. * Number of threads that share each completion queue
  87. *
  88. * Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
  89. */
  90. private $threads_per_cq = 0;
  91. /**
  92. * Number of messages on a stream before it gets finished/restarted
  93. *
  94. * Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
  95. */
  96. private $messages_per_stream = 0;
  97. public function __construct() {
  98. \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
  99. parent::__construct();
  100. }
  101. /**
  102. * List of targets to connect to. At least one target needs to be specified.
  103. *
  104. * Generated from protobuf field <code>repeated string server_targets = 1;</code>
  105. * @return \Google\Protobuf\Internal\RepeatedField
  106. */
  107. public function getServerTargets()
  108. {
  109. return $this->server_targets;
  110. }
  111. /**
  112. * List of targets to connect to. At least one target needs to be specified.
  113. *
  114. * Generated from protobuf field <code>repeated string server_targets = 1;</code>
  115. * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
  116. * @return $this
  117. */
  118. public function setServerTargets($var)
  119. {
  120. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
  121. $this->server_targets = $arr;
  122. return $this;
  123. }
  124. /**
  125. * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
  126. * @return int
  127. */
  128. public function getClientType()
  129. {
  130. return $this->client_type;
  131. }
  132. /**
  133. * Generated from protobuf field <code>.grpc.testing.ClientType client_type = 2;</code>
  134. * @param int $var
  135. * @return $this
  136. */
  137. public function setClientType($var)
  138. {
  139. GPBUtil::checkEnum($var, \Grpc\Testing\ClientType::class);
  140. $this->client_type = $var;
  141. return $this;
  142. }
  143. /**
  144. * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
  145. * @return \Grpc\Testing\SecurityParams
  146. */
  147. public function getSecurityParams()
  148. {
  149. return $this->security_params;
  150. }
  151. /**
  152. * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 3;</code>
  153. * @param \Grpc\Testing\SecurityParams $var
  154. * @return $this
  155. */
  156. public function setSecurityParams($var)
  157. {
  158. GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
  159. $this->security_params = $var;
  160. return $this;
  161. }
  162. /**
  163. * How many concurrent RPCs to start for each channel.
  164. * For synchronous client, use a separate thread for each outstanding RPC.
  165. *
  166. * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
  167. * @return int
  168. */
  169. public function getOutstandingRpcsPerChannel()
  170. {
  171. return $this->outstanding_rpcs_per_channel;
  172. }
  173. /**
  174. * How many concurrent RPCs to start for each channel.
  175. * For synchronous client, use a separate thread for each outstanding RPC.
  176. *
  177. * Generated from protobuf field <code>int32 outstanding_rpcs_per_channel = 4;</code>
  178. * @param int $var
  179. * @return $this
  180. */
  181. public function setOutstandingRpcsPerChannel($var)
  182. {
  183. GPBUtil::checkInt32($var);
  184. $this->outstanding_rpcs_per_channel = $var;
  185. return $this;
  186. }
  187. /**
  188. * Number of independent client channels to create.
  189. * i-th channel will connect to server_target[i % server_targets.size()]
  190. *
  191. * Generated from protobuf field <code>int32 client_channels = 5;</code>
  192. * @return int
  193. */
  194. public function getClientChannels()
  195. {
  196. return $this->client_channels;
  197. }
  198. /**
  199. * Number of independent client channels to create.
  200. * i-th channel will connect to server_target[i % server_targets.size()]
  201. *
  202. * Generated from protobuf field <code>int32 client_channels = 5;</code>
  203. * @param int $var
  204. * @return $this
  205. */
  206. public function setClientChannels($var)
  207. {
  208. GPBUtil::checkInt32($var);
  209. $this->client_channels = $var;
  210. return $this;
  211. }
  212. /**
  213. * Only for async client. Number of threads to use to start/manage RPCs.
  214. *
  215. * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
  216. * @return int
  217. */
  218. public function getAsyncClientThreads()
  219. {
  220. return $this->async_client_threads;
  221. }
  222. /**
  223. * Only for async client. Number of threads to use to start/manage RPCs.
  224. *
  225. * Generated from protobuf field <code>int32 async_client_threads = 7;</code>
  226. * @param int $var
  227. * @return $this
  228. */
  229. public function setAsyncClientThreads($var)
  230. {
  231. GPBUtil::checkInt32($var);
  232. $this->async_client_threads = $var;
  233. return $this;
  234. }
  235. /**
  236. * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
  237. * @return int
  238. */
  239. public function getRpcType()
  240. {
  241. return $this->rpc_type;
  242. }
  243. /**
  244. * Generated from protobuf field <code>.grpc.testing.RpcType rpc_type = 8;</code>
  245. * @param int $var
  246. * @return $this
  247. */
  248. public function setRpcType($var)
  249. {
  250. GPBUtil::checkEnum($var, \Grpc\Testing\RpcType::class);
  251. $this->rpc_type = $var;
  252. return $this;
  253. }
  254. /**
  255. * The requested load for the entire client (aggregated over all the threads).
  256. *
  257. * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
  258. * @return \Grpc\Testing\LoadParams
  259. */
  260. public function getLoadParams()
  261. {
  262. return $this->load_params;
  263. }
  264. /**
  265. * The requested load for the entire client (aggregated over all the threads).
  266. *
  267. * Generated from protobuf field <code>.grpc.testing.LoadParams load_params = 10;</code>
  268. * @param \Grpc\Testing\LoadParams $var
  269. * @return $this
  270. */
  271. public function setLoadParams($var)
  272. {
  273. GPBUtil::checkMessage($var, \Grpc\Testing\LoadParams::class);
  274. $this->load_params = $var;
  275. return $this;
  276. }
  277. /**
  278. * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
  279. * @return \Grpc\Testing\PayloadConfig
  280. */
  281. public function getPayloadConfig()
  282. {
  283. return $this->payload_config;
  284. }
  285. /**
  286. * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 11;</code>
  287. * @param \Grpc\Testing\PayloadConfig $var
  288. * @return $this
  289. */
  290. public function setPayloadConfig($var)
  291. {
  292. GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
  293. $this->payload_config = $var;
  294. return $this;
  295. }
  296. /**
  297. * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
  298. * @return \Grpc\Testing\HistogramParams
  299. */
  300. public function getHistogramParams()
  301. {
  302. return $this->histogram_params;
  303. }
  304. /**
  305. * Generated from protobuf field <code>.grpc.testing.HistogramParams histogram_params = 12;</code>
  306. * @param \Grpc\Testing\HistogramParams $var
  307. * @return $this
  308. */
  309. public function setHistogramParams($var)
  310. {
  311. GPBUtil::checkMessage($var, \Grpc\Testing\HistogramParams::class);
  312. $this->histogram_params = $var;
  313. return $this;
  314. }
  315. /**
  316. * Specify the cores we should run the client on, if desired
  317. *
  318. * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
  319. * @return \Google\Protobuf\Internal\RepeatedField
  320. */
  321. public function getCoreList()
  322. {
  323. return $this->core_list;
  324. }
  325. /**
  326. * Specify the cores we should run the client on, if desired
  327. *
  328. * Generated from protobuf field <code>repeated int32 core_list = 13;</code>
  329. * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
  330. * @return $this
  331. */
  332. public function setCoreList($var)
  333. {
  334. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
  335. $this->core_list = $arr;
  336. return $this;
  337. }
  338. /**
  339. * Generated from protobuf field <code>int32 core_limit = 14;</code>
  340. * @return int
  341. */
  342. public function getCoreLimit()
  343. {
  344. return $this->core_limit;
  345. }
  346. /**
  347. * Generated from protobuf field <code>int32 core_limit = 14;</code>
  348. * @param int $var
  349. * @return $this
  350. */
  351. public function setCoreLimit($var)
  352. {
  353. GPBUtil::checkInt32($var);
  354. $this->core_limit = $var;
  355. return $this;
  356. }
  357. /**
  358. * If we use an OTHER_CLIENT client_type, this string gives more detail
  359. *
  360. * Generated from protobuf field <code>string other_client_api = 15;</code>
  361. * @return string
  362. */
  363. public function getOtherClientApi()
  364. {
  365. return $this->other_client_api;
  366. }
  367. /**
  368. * If we use an OTHER_CLIENT client_type, this string gives more detail
  369. *
  370. * Generated from protobuf field <code>string other_client_api = 15;</code>
  371. * @param string $var
  372. * @return $this
  373. */
  374. public function setOtherClientApi($var)
  375. {
  376. GPBUtil::checkString($var, True);
  377. $this->other_client_api = $var;
  378. return $this;
  379. }
  380. /**
  381. * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
  382. * @return \Google\Protobuf\Internal\RepeatedField
  383. */
  384. public function getChannelArgs()
  385. {
  386. return $this->channel_args;
  387. }
  388. /**
  389. * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 16;</code>
  390. * @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var
  391. * @return $this
  392. */
  393. public function setChannelArgs($var)
  394. {
  395. $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
  396. $this->channel_args = $arr;
  397. return $this;
  398. }
  399. /**
  400. * Number of threads that share each completion queue
  401. *
  402. * Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
  403. * @return int
  404. */
  405. public function getThreadsPerCq()
  406. {
  407. return $this->threads_per_cq;
  408. }
  409. /**
  410. * Number of threads that share each completion queue
  411. *
  412. * Generated from protobuf field <code>int32 threads_per_cq = 17;</code>
  413. * @param int $var
  414. * @return $this
  415. */
  416. public function setThreadsPerCq($var)
  417. {
  418. GPBUtil::checkInt32($var);
  419. $this->threads_per_cq = $var;
  420. return $this;
  421. }
  422. /**
  423. * Number of messages on a stream before it gets finished/restarted
  424. *
  425. * Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
  426. * @return int
  427. */
  428. public function getMessagesPerStream()
  429. {
  430. return $this->messages_per_stream;
  431. }
  432. /**
  433. * Number of messages on a stream before it gets finished/restarted
  434. *
  435. * Generated from protobuf field <code>int32 messages_per_stream = 18;</code>
  436. * @param int $var
  437. * @return $this
  438. */
  439. public function setMessagesPerStream($var)
  440. {
  441. GPBUtil::checkInt32($var);
  442. $this->messages_per_stream = $var;
  443. return $this;
  444. }
  445. }