Debian Codegraph @

src/php/tests/qps/generated_code/Grpc/Testing/ServerConfig.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.ServerConfig</code>
13 */
14 class ServerConfig extends \Google\Protobuf\Internal\Message
15 {
16 /**
17 * Generated from protobuf field <code>.grpc.testing.ServerType server_type = 1;</code>
18 */
19 protected $server_type = 0;
20 /**
21 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 2;</code>
22 */
23 protected $security_params = null;
24 /**
25 * Port on which to listen. Zero means pick unused port.
26 *
27 * Generated from protobuf field <code>int32 port = 4;</code>
28 */
29 protected $port = 0;
30 /**
31 * Only for async server. Number of threads used to serve the requests.
32 *
33 * Generated from protobuf field <code>int32 async_server_threads = 7;</code>
34 */
35 protected $async_server_threads = 0;
36 /**
37 * Specify the number of cores to limit server to, if desired
38 *
39 * Generated from protobuf field <code>int32 core_limit = 8;</code>
40 */
41 protected $core_limit = 0;
42 /**
43 * payload config, used in generic server.
44 * Note this must NOT be used in proto (non-generic) servers. For proto servers,
45 * 'response sizes' must be configured from the 'response_size' field of the
46 * 'SimpleRequest' objects in RPC requests.
47 *
48 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
49 */
50 protected $payload_config = null;
51 /**
52 * Specify the cores we should run the server on, if desired
53 *
54 * Generated from protobuf field <code>repeated int32 core_list = 10;</code>
55 */
56 private $core_list;
57 /**
58 * If we use an OTHER_SERVER client_type, this string gives more detail
59 *
60 * Generated from protobuf field <code>string other_server_api = 11;</code>
61 */
62 protected $other_server_api = '';
63 /**
64 * Number of threads that share each completion queue
65 *
66 * Generated from protobuf field <code>int32 threads_per_cq = 12;</code>
67 */
68 protected $threads_per_cq = 0;
69 /**
70 * Buffer pool size (no buffer pool specified if unset)
71 *
72 * Generated from protobuf field <code>int32 resource_quota_size = 1001;</code>
73 */
74 protected $resource_quota_size = 0;
75 /**
76 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 1002;</code>
77 */
78 private $channel_args;
79 /**
80 * Number of server processes. 0 indicates no restriction.
81 *
82 * Generated from protobuf field <code>int32 server_processes = 21;</code>
83 */
84 protected $server_processes = 0;
85
86 /**
87 * Constructor.
88 *
89 * @param array $data {
90 * Optional. Data for populating the Message object.
91 *
92 * @type int $server_type
93 * @type \Grpc\Testing\SecurityParams $security_params
94 * @type int $port
95 * Port on which to listen. Zero means pick unused port.
96 * @type int $async_server_threads
97 * Only for async server. Number of threads used to serve the requests.
98 * @type int $core_limit
99 * Specify the number of cores to limit server to, if desired
100 * @type \Grpc\Testing\PayloadConfig $payload_config
101 * payload config, used in generic server.
102 * Note this must NOT be used in proto (non-generic) servers. For proto servers,
103 * 'response sizes' must be configured from the 'response_size' field of the
104 * 'SimpleRequest' objects in RPC requests.
105 * @type int[]|\Google\Protobuf\Internal\RepeatedField $core_list
106 * Specify the cores we should run the server on, if desired
107 * @type string $other_server_api
108 * If we use an OTHER_SERVER client_type, this string gives more detail
109 * @type int $threads_per_cq
110 * Number of threads that share each completion queue
111 * @type int $resource_quota_size
112 * Buffer pool size (no buffer pool specified if unset)
113 * @type \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $channel_args
114 * @type int $server_processes
115 * Number of server processes. 0 indicates no restriction.
116 * }
117 */
118 public function __construct($data = NULL) {
119 \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce();
120 parent::__construct($data);
121 }
122
123 /**
124 * Generated from protobuf field <code>.grpc.testing.ServerType server_type = 1;</code>
125 * @return int
126 */
127 public function getServerType()
128 {
129 return $this->server_type;
130 }
131
132 /**
133 * Generated from protobuf field <code>.grpc.testing.ServerType server_type = 1;</code>
134 * @param int $var
135 * @return $this
136 */
137 public function setServerType($var)
138 {
139 GPBUtil::checkEnum($var, \Grpc\Testing\ServerType::class);
140 $this->server_type = $var;
141
142 return $this;
143 }
144
145 /**
146 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 2;</code>
147 * @return \Grpc\Testing\SecurityParams
148 */
149 public function getSecurityParams()
150 {
151 return $this->security_params;
152 }
153
154 /**
155 * Generated from protobuf field <code>.grpc.testing.SecurityParams security_params = 2;</code>
156 * @param \Grpc\Testing\SecurityParams $var
157 * @return $this
158 */
159 public function setSecurityParams($var)
160 {
161 GPBUtil::checkMessage($var, \Grpc\Testing\SecurityParams::class);
162 $this->security_params = $var;
163
164 return $this;
165 }
166
167 /**
168 * Port on which to listen. Zero means pick unused port.
169 *
170 * Generated from protobuf field <code>int32 port = 4;</code>
171 * @return int
172 */
173 public function getPort()
174 {
175 return $this->port;
176 }
177
178 /**
179 * Port on which to listen. Zero means pick unused port.
180 *
181 * Generated from protobuf field <code>int32 port = 4;</code>
182 * @param int $var
183 * @return $this
184 */
185 public function setPort($var)
186 {
187 GPBUtil::checkInt32($var);
188 $this->port = $var;
189
190 return $this;
191 }
192
193 /**
194 * Only for async server. Number of threads used to serve the requests.
195 *
196 * Generated from protobuf field <code>int32 async_server_threads = 7;</code>
197 * @return int
198 */
199 public function getAsyncServerThreads()
200 {
201 return $this->async_server_threads;
202 }
203
204 /**
205 * Only for async server. Number of threads used to serve the requests.
206 *
207 * Generated from protobuf field <code>int32 async_server_threads = 7;</code>
208 * @param int $var
209 * @return $this
210 */
211 public function setAsyncServerThreads($var)
212 {
213 GPBUtil::checkInt32($var);
214 $this->async_server_threads = $var;
215
216 return $this;
217 }
218
219 /**
220 * Specify the number of cores to limit server to, if desired
221 *
222 * Generated from protobuf field <code>int32 core_limit = 8;</code>
223 * @return int
224 */
225 public function getCoreLimit()
226 {
227 return $this->core_limit;
228 }
229
230 /**
231 * Specify the number of cores to limit server to, if desired
232 *
233 * Generated from protobuf field <code>int32 core_limit = 8;</code>
234 * @param int $var
235 * @return $this
236 */
237 public function setCoreLimit($var)
238 {
239 GPBUtil::checkInt32($var);
240 $this->core_limit = $var;
241
242 return $this;
243 }
244
245 /**
246 * payload config, used in generic server.
247 * Note this must NOT be used in proto (non-generic) servers. For proto servers,
248 * 'response sizes' must be configured from the 'response_size' field of the
249 * 'SimpleRequest' objects in RPC requests.
250 *
251 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
252 * @return \Grpc\Testing\PayloadConfig
253 */
254 public function getPayloadConfig()
255 {
256 return $this->payload_config;
257 }
258
259 /**
260 * payload config, used in generic server.
261 * Note this must NOT be used in proto (non-generic) servers. For proto servers,
262 * 'response sizes' must be configured from the 'response_size' field of the
263 * 'SimpleRequest' objects in RPC requests.
264 *
265 * Generated from protobuf field <code>.grpc.testing.PayloadConfig payload_config = 9;</code>
266 * @param \Grpc\Testing\PayloadConfig $var
267 * @return $this
268 */
269 public function setPayloadConfig($var)
270 {
271 GPBUtil::checkMessage($var, \Grpc\Testing\PayloadConfig::class);
272 $this->payload_config = $var;
273
274 return $this;
275 }
276
277 /**
278 * Specify the cores we should run the server on, if desired
279 *
280 * Generated from protobuf field <code>repeated int32 core_list = 10;</code>
281 * @return \Google\Protobuf\Internal\RepeatedField
282 */
283 public function getCoreList()
284 {
285 return $this->core_list;
286 }
287
288 /**
289 * Specify the cores we should run the server on, if desired
290 *
291 * Generated from protobuf field <code>repeated int32 core_list = 10;</code>
292 * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
293 * @return $this
294 */
295 public function setCoreList($var)
296 {
297 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32);
298 $this->core_list = $arr;
299
300 return $this;
301 }
302
303 /**
304 * If we use an OTHER_SERVER client_type, this string gives more detail
305 *
306 * Generated from protobuf field <code>string other_server_api = 11;</code>
307 * @return string
308 */
309 public function getOtherServerApi()
310 {
311 return $this->other_server_api;
312 }
313
314 /**
315 * If we use an OTHER_SERVER client_type, this string gives more detail
316 *
317 * Generated from protobuf field <code>string other_server_api = 11;</code>
318 * @param string $var
319 * @return $this
320 */
321 public function setOtherServerApi($var)
322 {
323 GPBUtil::checkString($var, True);
324 $this->other_server_api = $var;
325
326 return $this;
327 }
328
329 /**
330 * Number of threads that share each completion queue
331 *
332 * Generated from protobuf field <code>int32 threads_per_cq = 12;</code>
333 * @return int
334 */
335 public function getThreadsPerCq()
336 {
337 return $this->threads_per_cq;
338 }
339
340 /**
341 * Number of threads that share each completion queue
342 *
343 * Generated from protobuf field <code>int32 threads_per_cq = 12;</code>
344 * @param int $var
345 * @return $this
346 */
347 public function setThreadsPerCq($var)
348 {
349 GPBUtil::checkInt32($var);
350 $this->threads_per_cq = $var;
351
352 return $this;
353 }
354
355 /**
356 * Buffer pool size (no buffer pool specified if unset)
357 *
358 * Generated from protobuf field <code>int32 resource_quota_size = 1001;</code>
359 * @return int
360 */
361 public function getResourceQuotaSize()
362 {
363 return $this->resource_quota_size;
364 }
365
366 /**
367 * Buffer pool size (no buffer pool specified if unset)
368 *
369 * Generated from protobuf field <code>int32 resource_quota_size = 1001;</code>
370 * @param int $var
371 * @return $this
372 */
373 public function setResourceQuotaSize($var)
374 {
375 GPBUtil::checkInt32($var);
376 $this->resource_quota_size = $var;
377
378 return $this;
379 }
380
381 /**
382 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 1002;</code>
383 * @return \Google\Protobuf\Internal\RepeatedField
384 */
385 public function getChannelArgs()
386 {
387 return $this->channel_args;
388 }
389
390 /**
391 * Generated from protobuf field <code>repeated .grpc.testing.ChannelArg channel_args = 1002;</code>
392 * @param \Grpc\Testing\ChannelArg[]|\Google\Protobuf\Internal\RepeatedField $var
393 * @return $this
394 */
395 public function setChannelArgs($var)
396 {
397 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ChannelArg::class);
398 $this->channel_args = $arr;
399
400 return $this;
401 }
402
403 /**
404 * Number of server processes. 0 indicates no restriction.
405 *
406 * Generated from protobuf field <code>int32 server_processes = 21;</code>
407 * @return int
408 */
409 public function getServerProcesses()
410 {
411 return $this->server_processes;
412 }
413
414 /**
415 * Number of server processes. 0 indicates no restriction.
416 *
417 * Generated from protobuf field <code>int32 server_processes = 21;</code>
418 * @param int $var
419 * @return $this
420 */
421 public function setServerProcesses($var)
422 {
423 GPBUtil::checkInt32($var);
424 $this->server_processes = $var;
425
426 return $this;
427 }
428
429 }
430