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 * A single performance scenario: input to qps_json_driver 13 * 14 * Generated from protobuf message <code>grpc.testing.Scenario</code> 15 */ 16class Scenario extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * Human readable name for this scenario 20 * 21 * Generated from protobuf field <code>string name = 1;</code> 22 */ 23 protected $name = ''; 24 /** 25 * Client configuration 26 * 27 * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code> 28 */ 29 protected $client_config = null; 30 /** 31 * Number of clients to start for the test 32 * 33 * Generated from protobuf field <code>int32 num_clients = 3;</code> 34 */ 35 protected $num_clients = 0; 36 /** 37 * Server configuration 38 * 39 * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code> 40 */ 41 protected $server_config = null; 42 /** 43 * Number of servers to start for the test 44 * 45 * Generated from protobuf field <code>int32 num_servers = 5;</code> 46 */ 47 protected $num_servers = 0; 48 /** 49 * Warmup period, in seconds 50 * 51 * Generated from protobuf field <code>int32 warmup_seconds = 6;</code> 52 */ 53 protected $warmup_seconds = 0; 54 /** 55 * Benchmark time, in seconds 56 * 57 * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code> 58 */ 59 protected $benchmark_seconds = 0; 60 /** 61 * Number of workers to spawn locally (usually zero) 62 * 63 * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code> 64 */ 65 protected $spawn_local_worker_count = 0; 66 67 /** 68 * Constructor. 69 * 70 * @param array $data { 71 * Optional. Data for populating the Message object. 72 * 73 * @type string $name 74 * Human readable name for this scenario 75 * @type \Grpc\Testing\ClientConfig $client_config 76 * Client configuration 77 * @type int $num_clients 78 * Number of clients to start for the test 79 * @type \Grpc\Testing\ServerConfig $server_config 80 * Server configuration 81 * @type int $num_servers 82 * Number of servers to start for the test 83 * @type int $warmup_seconds 84 * Warmup period, in seconds 85 * @type int $benchmark_seconds 86 * Benchmark time, in seconds 87 * @type int $spawn_local_worker_count 88 * Number of workers to spawn locally (usually zero) 89 * } 90 */ 91 public function __construct($data = NULL) { 92 \GPBMetadata\Src\Proto\Grpc\Testing\Control::initOnce(); 93 parent::__construct($data); 94 } 95 96 /** 97 * Human readable name for this scenario 98 * 99 * Generated from protobuf field <code>string name = 1;</code> 100 * @return string 101 */ 102 public function getName() 103 { 104 return $this->name; 105 } 106 107 /** 108 * Human readable name for this scenario 109 * 110 * Generated from protobuf field <code>string name = 1;</code> 111 * @param string $var 112 * @return $this 113 */ 114 public function setName($var) 115 { 116 GPBUtil::checkString($var, True); 117 $this->name = $var; 118 119 return $this; 120 } 121 122 /** 123 * Client configuration 124 * 125 * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code> 126 * @return \Grpc\Testing\ClientConfig 127 */ 128 public function getClientConfig() 129 { 130 return $this->client_config; 131 } 132 133 /** 134 * Client configuration 135 * 136 * Generated from protobuf field <code>.grpc.testing.ClientConfig client_config = 2;</code> 137 * @param \Grpc\Testing\ClientConfig $var 138 * @return $this 139 */ 140 public function setClientConfig($var) 141 { 142 GPBUtil::checkMessage($var, \Grpc\Testing\ClientConfig::class); 143 $this->client_config = $var; 144 145 return $this; 146 } 147 148 /** 149 * Number of clients to start for the test 150 * 151 * Generated from protobuf field <code>int32 num_clients = 3;</code> 152 * @return int 153 */ 154 public function getNumClients() 155 { 156 return $this->num_clients; 157 } 158 159 /** 160 * Number of clients to start for the test 161 * 162 * Generated from protobuf field <code>int32 num_clients = 3;</code> 163 * @param int $var 164 * @return $this 165 */ 166 public function setNumClients($var) 167 { 168 GPBUtil::checkInt32($var); 169 $this->num_clients = $var; 170 171 return $this; 172 } 173 174 /** 175 * Server configuration 176 * 177 * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code> 178 * @return \Grpc\Testing\ServerConfig 179 */ 180 public function getServerConfig() 181 { 182 return $this->server_config; 183 } 184 185 /** 186 * Server configuration 187 * 188 * Generated from protobuf field <code>.grpc.testing.ServerConfig server_config = 4;</code> 189 * @param \Grpc\Testing\ServerConfig $var 190 * @return $this 191 */ 192 public function setServerConfig($var) 193 { 194 GPBUtil::checkMessage($var, \Grpc\Testing\ServerConfig::class); 195 $this->server_config = $var; 196 197 return $this; 198 } 199 200 /** 201 * Number of servers to start for the test 202 * 203 * Generated from protobuf field <code>int32 num_servers = 5;</code> 204 * @return int 205 */ 206 public function getNumServers() 207 { 208 return $this->num_servers; 209 } 210 211 /** 212 * Number of servers to start for the test 213 * 214 * Generated from protobuf field <code>int32 num_servers = 5;</code> 215 * @param int $var 216 * @return $this 217 */ 218 public function setNumServers($var) 219 { 220 GPBUtil::checkInt32($var); 221 $this->num_servers = $var; 222 223 return $this; 224 } 225 226 /** 227 * Warmup period, in seconds 228 * 229 * Generated from protobuf field <code>int32 warmup_seconds = 6;</code> 230 * @return int 231 */ 232 public function getWarmupSeconds() 233 { 234 return $this->warmup_seconds; 235 } 236 237 /** 238 * Warmup period, in seconds 239 * 240 * Generated from protobuf field <code>int32 warmup_seconds = 6;</code> 241 * @param int $var 242 * @return $this 243 */ 244 public function setWarmupSeconds($var) 245 { 246 GPBUtil::checkInt32($var); 247 $this->warmup_seconds = $var; 248 249 return $this; 250 } 251 252 /** 253 * Benchmark time, in seconds 254 * 255 * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code> 256 * @return int 257 */ 258 public function getBenchmarkSeconds() 259 { 260 return $this->benchmark_seconds; 261 } 262 263 /** 264 * Benchmark time, in seconds 265 * 266 * Generated from protobuf field <code>int32 benchmark_seconds = 7;</code> 267 * @param int $var 268 * @return $this 269 */ 270 public function setBenchmarkSeconds($var) 271 { 272 GPBUtil::checkInt32($var); 273 $this->benchmark_seconds = $var; 274 275 return $this; 276 } 277 278 /** 279 * Number of workers to spawn locally (usually zero) 280 * 281 * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code> 282 * @return int 283 */ 284 public function getSpawnLocalWorkerCount() 285 { 286 return $this->spawn_local_worker_count; 287 } 288 289 /** 290 * Number of workers to spawn locally (usually zero) 291 * 292 * Generated from protobuf field <code>int32 spawn_local_worker_count = 8;</code> 293 * @param int $var 294 * @return $this 295 */ 296 public function setSpawnLocalWorkerCount($var) 297 { 298 GPBUtil::checkInt32($var); 299 $this->spawn_local_worker_count = $var; 300 301 return $this; 302 } 303 304} 305 306