1<?php 2# Generated by the protocol buffer compiler. DO NOT EDIT! 3# source: src/proto/grpc/testing/messages.proto 4 5namespace Grpc\Testing; 6 7use Google\Protobuf\Internal\GPBType; 8use Google\Protobuf\Internal\RepeatedField; 9use Google\Protobuf\Internal\GPBUtil; 10 11/** 12 * Unary request. 13 * 14 * Generated from protobuf message <code>grpc.testing.SimpleRequest</code> 15 */ 16class SimpleRequest extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * Desired payload type in the response from the server. 20 * If response_type is RANDOM, server randomly chooses one from other formats. 21 * 22 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 23 */ 24 protected $response_type = 0; 25 /** 26 * Desired payload size in the response from the server. 27 * 28 * Generated from protobuf field <code>int32 response_size = 2;</code> 29 */ 30 protected $response_size = 0; 31 /** 32 * Optional input payload sent along with the request. 33 * 34 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 35 */ 36 protected $payload = null; 37 /** 38 * Whether SimpleResponse should include username. 39 * 40 * Generated from protobuf field <code>bool fill_username = 4;</code> 41 */ 42 protected $fill_username = false; 43 /** 44 * Whether SimpleResponse should include OAuth scope. 45 * 46 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> 47 */ 48 protected $fill_oauth_scope = false; 49 /** 50 * Whether to request the server to compress the response. This field is 51 * "nullable" in order to interoperate seamlessly with clients not able to 52 * implement the full compression tests by introspecting the call to verify 53 * the response's compression status. 54 * 55 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> 56 */ 57 protected $response_compressed = null; 58 /** 59 * Whether server should return a given status 60 * 61 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 62 */ 63 protected $response_status = null; 64 /** 65 * Whether the server should expect this request to be compressed. 66 * 67 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> 68 */ 69 protected $expect_compressed = null; 70 /** 71 * Whether SimpleResponse should include server_id. 72 * 73 * Generated from protobuf field <code>bool fill_server_id = 9;</code> 74 */ 75 protected $fill_server_id = false; 76 /** 77 * Whether SimpleResponse should include grpclb_route_type. 78 * 79 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code> 80 */ 81 protected $fill_grpclb_route_type = false; 82 /** 83 * If set the server should record this metrics report data for the current RPC. 84 * 85 * Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_per_query_report = 11;</code> 86 */ 87 protected $orca_per_query_report = null; 88 89 /** 90 * Constructor. 91 * 92 * @param array $data { 93 * Optional. Data for populating the Message object. 94 * 95 * @type int $response_type 96 * Desired payload type in the response from the server. 97 * If response_type is RANDOM, server randomly chooses one from other formats. 98 * @type int $response_size 99 * Desired payload size in the response from the server. 100 * @type \Grpc\Testing\Payload $payload 101 * Optional input payload sent along with the request. 102 * @type bool $fill_username 103 * Whether SimpleResponse should include username. 104 * @type bool $fill_oauth_scope 105 * Whether SimpleResponse should include OAuth scope. 106 * @type \Grpc\Testing\BoolValue $response_compressed 107 * Whether to request the server to compress the response. This field is 108 * "nullable" in order to interoperate seamlessly with clients not able to 109 * implement the full compression tests by introspecting the call to verify 110 * the response's compression status. 111 * @type \Grpc\Testing\EchoStatus $response_status 112 * Whether server should return a given status 113 * @type \Grpc\Testing\BoolValue $expect_compressed 114 * Whether the server should expect this request to be compressed. 115 * @type bool $fill_server_id 116 * Whether SimpleResponse should include server_id. 117 * @type bool $fill_grpclb_route_type 118 * Whether SimpleResponse should include grpclb_route_type. 119 * @type \Grpc\Testing\TestOrcaReport $orca_per_query_report 120 * If set the server should record this metrics report data for the current RPC. 121 * } 122 */ 123 public function __construct($data = NULL) { 124 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); 125 parent::__construct($data); 126 } 127 128 /** 129 * Desired payload type in the response from the server. 130 * If response_type is RANDOM, server randomly chooses one from other formats. 131 * 132 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 133 * @return int 134 */ 135 public function getResponseType() 136 { 137 return $this->response_type; 138 } 139 140 /** 141 * Desired payload type in the response from the server. 142 * If response_type is RANDOM, server randomly chooses one from other formats. 143 * 144 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 145 * @param int $var 146 * @return $this 147 */ 148 public function setResponseType($var) 149 { 150 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); 151 $this->response_type = $var; 152 153 return $this; 154 } 155 156 /** 157 * Desired payload size in the response from the server. 158 * 159 * Generated from protobuf field <code>int32 response_size = 2;</code> 160 * @return int 161 */ 162 public function getResponseSize() 163 { 164 return $this->response_size; 165 } 166 167 /** 168 * Desired payload size in the response from the server. 169 * 170 * Generated from protobuf field <code>int32 response_size = 2;</code> 171 * @param int $var 172 * @return $this 173 */ 174 public function setResponseSize($var) 175 { 176 GPBUtil::checkInt32($var); 177 $this->response_size = $var; 178 179 return $this; 180 } 181 182 /** 183 * Optional input payload sent along with the request. 184 * 185 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 186 * @return \Grpc\Testing\Payload|null 187 */ 188 public function getPayload() 189 { 190 return $this->payload; 191 } 192 193 public function hasPayload() 194 { 195 return isset($this->payload); 196 } 197 198 public function clearPayload() 199 { 200 unset($this->payload); 201 } 202 203 /** 204 * Optional input payload sent along with the request. 205 * 206 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 207 * @param \Grpc\Testing\Payload $var 208 * @return $this 209 */ 210 public function setPayload($var) 211 { 212 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); 213 $this->payload = $var; 214 215 return $this; 216 } 217 218 /** 219 * Whether SimpleResponse should include username. 220 * 221 * Generated from protobuf field <code>bool fill_username = 4;</code> 222 * @return bool 223 */ 224 public function getFillUsername() 225 { 226 return $this->fill_username; 227 } 228 229 /** 230 * Whether SimpleResponse should include username. 231 * 232 * Generated from protobuf field <code>bool fill_username = 4;</code> 233 * @param bool $var 234 * @return $this 235 */ 236 public function setFillUsername($var) 237 { 238 GPBUtil::checkBool($var); 239 $this->fill_username = $var; 240 241 return $this; 242 } 243 244 /** 245 * Whether SimpleResponse should include OAuth scope. 246 * 247 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> 248 * @return bool 249 */ 250 public function getFillOauthScope() 251 { 252 return $this->fill_oauth_scope; 253 } 254 255 /** 256 * Whether SimpleResponse should include OAuth scope. 257 * 258 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> 259 * @param bool $var 260 * @return $this 261 */ 262 public function setFillOauthScope($var) 263 { 264 GPBUtil::checkBool($var); 265 $this->fill_oauth_scope = $var; 266 267 return $this; 268 } 269 270 /** 271 * Whether to request the server to compress the response. This field is 272 * "nullable" in order to interoperate seamlessly with clients not able to 273 * implement the full compression tests by introspecting the call to verify 274 * the response's compression status. 275 * 276 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> 277 * @return \Grpc\Testing\BoolValue|null 278 */ 279 public function getResponseCompressed() 280 { 281 return $this->response_compressed; 282 } 283 284 public function hasResponseCompressed() 285 { 286 return isset($this->response_compressed); 287 } 288 289 public function clearResponseCompressed() 290 { 291 unset($this->response_compressed); 292 } 293 294 /** 295 * Whether to request the server to compress the response. This field is 296 * "nullable" in order to interoperate seamlessly with clients not able to 297 * implement the full compression tests by introspecting the call to verify 298 * the response's compression status. 299 * 300 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> 301 * @param \Grpc\Testing\BoolValue $var 302 * @return $this 303 */ 304 public function setResponseCompressed($var) 305 { 306 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); 307 $this->response_compressed = $var; 308 309 return $this; 310 } 311 312 /** 313 * Whether server should return a given status 314 * 315 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 316 * @return \Grpc\Testing\EchoStatus|null 317 */ 318 public function getResponseStatus() 319 { 320 return $this->response_status; 321 } 322 323 public function hasResponseStatus() 324 { 325 return isset($this->response_status); 326 } 327 328 public function clearResponseStatus() 329 { 330 unset($this->response_status); 331 } 332 333 /** 334 * Whether server should return a given status 335 * 336 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 337 * @param \Grpc\Testing\EchoStatus $var 338 * @return $this 339 */ 340 public function setResponseStatus($var) 341 { 342 GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); 343 $this->response_status = $var; 344 345 return $this; 346 } 347 348 /** 349 * Whether the server should expect this request to be compressed. 350 * 351 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> 352 * @return \Grpc\Testing\BoolValue|null 353 */ 354 public function getExpectCompressed() 355 { 356 return $this->expect_compressed; 357 } 358 359 public function hasExpectCompressed() 360 { 361 return isset($this->expect_compressed); 362 } 363 364 public function clearExpectCompressed() 365 { 366 unset($this->expect_compressed); 367 } 368 369 /** 370 * Whether the server should expect this request to be compressed. 371 * 372 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> 373 * @param \Grpc\Testing\BoolValue $var 374 * @return $this 375 */ 376 public function setExpectCompressed($var) 377 { 378 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); 379 $this->expect_compressed = $var; 380 381 return $this; 382 } 383 384 /** 385 * Whether SimpleResponse should include server_id. 386 * 387 * Generated from protobuf field <code>bool fill_server_id = 9;</code> 388 * @return bool 389 */ 390 public function getFillServerId() 391 { 392 return $this->fill_server_id; 393 } 394 395 /** 396 * Whether SimpleResponse should include server_id. 397 * 398 * Generated from protobuf field <code>bool fill_server_id = 9;</code> 399 * @param bool $var 400 * @return $this 401 */ 402 public function setFillServerId($var) 403 { 404 GPBUtil::checkBool($var); 405 $this->fill_server_id = $var; 406 407 return $this; 408 } 409 410 /** 411 * Whether SimpleResponse should include grpclb_route_type. 412 * 413 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code> 414 * @return bool 415 */ 416 public function getFillGrpclbRouteType() 417 { 418 return $this->fill_grpclb_route_type; 419 } 420 421 /** 422 * Whether SimpleResponse should include grpclb_route_type. 423 * 424 * Generated from protobuf field <code>bool fill_grpclb_route_type = 10;</code> 425 * @param bool $var 426 * @return $this 427 */ 428 public function setFillGrpclbRouteType($var) 429 { 430 GPBUtil::checkBool($var); 431 $this->fill_grpclb_route_type = $var; 432 433 return $this; 434 } 435 436 /** 437 * If set the server should record this metrics report data for the current RPC. 438 * 439 * Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_per_query_report = 11;</code> 440 * @return \Grpc\Testing\TestOrcaReport|null 441 */ 442 public function getOrcaPerQueryReport() 443 { 444 return $this->orca_per_query_report; 445 } 446 447 public function hasOrcaPerQueryReport() 448 { 449 return isset($this->orca_per_query_report); 450 } 451 452 public function clearOrcaPerQueryReport() 453 { 454 unset($this->orca_per_query_report); 455 } 456 457 /** 458 * If set the server should record this metrics report data for the current RPC. 459 * 460 * Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_per_query_report = 11;</code> 461 * @param \Grpc\Testing\TestOrcaReport $var 462 * @return $this 463 */ 464 public function setOrcaPerQueryReport($var) 465 { 466 GPBUtil::checkMessage($var, \Grpc\Testing\TestOrcaReport::class); 467 $this->orca_per_query_report = $var; 468 469 return $this; 470 } 471 472} 473 474