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 * DEPRECATED, don't use. To be removed shortly. 20 * Desired payload type in the response from the server. 21 * If response_type is RANDOM, server randomly chooses one from other formats. 22 * 23 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 24 */ 25 private $response_type = 0; 26 /** 27 * Desired payload size in the response from the server. 28 * 29 * Generated from protobuf field <code>int32 response_size = 2;</code> 30 */ 31 private $response_size = 0; 32 /** 33 * Optional input payload sent along with the request. 34 * 35 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 36 */ 37 private $payload = null; 38 /** 39 * Whether SimpleResponse should include username. 40 * 41 * Generated from protobuf field <code>bool fill_username = 4;</code> 42 */ 43 private $fill_username = false; 44 /** 45 * Whether SimpleResponse should include OAuth scope. 46 * 47 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> 48 */ 49 private $fill_oauth_scope = false; 50 /** 51 * Whether to request the server to compress the response. This field is 52 * "nullable" in order to interoperate seamlessly with clients not able to 53 * implement the full compression tests by introspecting the call to verify 54 * the response's compression status. 55 * 56 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> 57 */ 58 private $response_compressed = null; 59 /** 60 * Whether server should return a given status 61 * 62 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 63 */ 64 private $response_status = null; 65 /** 66 * Whether the server should expect this request to be compressed. 67 * 68 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> 69 */ 70 private $expect_compressed = null; 71 72 public function __construct() { 73 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); 74 parent::__construct(); 75 } 76 77 /** 78 * DEPRECATED, don't use. To be removed shortly. 79 * Desired payload type in the response from the server. 80 * If response_type is RANDOM, server randomly chooses one from other formats. 81 * 82 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 83 * @return int 84 */ 85 public function getResponseType() 86 { 87 return $this->response_type; 88 } 89 90 /** 91 * DEPRECATED, don't use. To be removed shortly. 92 * Desired payload type in the response from the server. 93 * If response_type is RANDOM, server randomly chooses one from other formats. 94 * 95 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 96 * @param int $var 97 * @return $this 98 */ 99 public function setResponseType($var) 100 { 101 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); 102 $this->response_type = $var; 103 104 return $this; 105 } 106 107 /** 108 * Desired payload size in the response from the server. 109 * 110 * Generated from protobuf field <code>int32 response_size = 2;</code> 111 * @return int 112 */ 113 public function getResponseSize() 114 { 115 return $this->response_size; 116 } 117 118 /** 119 * Desired payload size in the response from the server. 120 * 121 * Generated from protobuf field <code>int32 response_size = 2;</code> 122 * @param int $var 123 * @return $this 124 */ 125 public function setResponseSize($var) 126 { 127 GPBUtil::checkInt32($var); 128 $this->response_size = $var; 129 130 return $this; 131 } 132 133 /** 134 * Optional input payload sent along with the request. 135 * 136 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 137 * @return \Grpc\Testing\Payload 138 */ 139 public function getPayload() 140 { 141 return $this->payload; 142 } 143 144 /** 145 * Optional input payload sent along with the request. 146 * 147 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 148 * @param \Grpc\Testing\Payload $var 149 * @return $this 150 */ 151 public function setPayload($var) 152 { 153 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); 154 $this->payload = $var; 155 156 return $this; 157 } 158 159 /** 160 * Whether SimpleResponse should include username. 161 * 162 * Generated from protobuf field <code>bool fill_username = 4;</code> 163 * @return bool 164 */ 165 public function getFillUsername() 166 { 167 return $this->fill_username; 168 } 169 170 /** 171 * Whether SimpleResponse should include username. 172 * 173 * Generated from protobuf field <code>bool fill_username = 4;</code> 174 * @param bool $var 175 * @return $this 176 */ 177 public function setFillUsername($var) 178 { 179 GPBUtil::checkBool($var); 180 $this->fill_username = $var; 181 182 return $this; 183 } 184 185 /** 186 * Whether SimpleResponse should include OAuth scope. 187 * 188 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> 189 * @return bool 190 */ 191 public function getFillOauthScope() 192 { 193 return $this->fill_oauth_scope; 194 } 195 196 /** 197 * Whether SimpleResponse should include OAuth scope. 198 * 199 * Generated from protobuf field <code>bool fill_oauth_scope = 5;</code> 200 * @param bool $var 201 * @return $this 202 */ 203 public function setFillOauthScope($var) 204 { 205 GPBUtil::checkBool($var); 206 $this->fill_oauth_scope = $var; 207 208 return $this; 209 } 210 211 /** 212 * Whether to request the server to compress the response. This field is 213 * "nullable" in order to interoperate seamlessly with clients not able to 214 * implement the full compression tests by introspecting the call to verify 215 * the response's compression status. 216 * 217 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> 218 * @return \Grpc\Testing\BoolValue 219 */ 220 public function getResponseCompressed() 221 { 222 return $this->response_compressed; 223 } 224 225 /** 226 * Whether to request the server to compress the response. This field is 227 * "nullable" in order to interoperate seamlessly with clients not able to 228 * implement the full compression tests by introspecting the call to verify 229 * the response's compression status. 230 * 231 * Generated from protobuf field <code>.grpc.testing.BoolValue response_compressed = 6;</code> 232 * @param \Grpc\Testing\BoolValue $var 233 * @return $this 234 */ 235 public function setResponseCompressed($var) 236 { 237 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); 238 $this->response_compressed = $var; 239 240 return $this; 241 } 242 243 /** 244 * Whether server should return a given status 245 * 246 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 247 * @return \Grpc\Testing\EchoStatus 248 */ 249 public function getResponseStatus() 250 { 251 return $this->response_status; 252 } 253 254 /** 255 * Whether server should return a given status 256 * 257 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 258 * @param \Grpc\Testing\EchoStatus $var 259 * @return $this 260 */ 261 public function setResponseStatus($var) 262 { 263 GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); 264 $this->response_status = $var; 265 266 return $this; 267 } 268 269 /** 270 * Whether the server should expect this request to be compressed. 271 * 272 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> 273 * @return \Grpc\Testing\BoolValue 274 */ 275 public function getExpectCompressed() 276 { 277 return $this->expect_compressed; 278 } 279 280 /** 281 * Whether the server should expect this request to be compressed. 282 * 283 * Generated from protobuf field <code>.grpc.testing.BoolValue expect_compressed = 8;</code> 284 * @param \Grpc\Testing\BoolValue $var 285 * @return $this 286 */ 287 public function setExpectCompressed($var) 288 { 289 GPBUtil::checkMessage($var, \Grpc\Testing\BoolValue::class); 290 $this->expect_compressed = $var; 291 292 return $this; 293 } 294 295} 296 297