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 * Server-streaming request. 13 * 14 * Generated from protobuf message <code>grpc.testing.StreamingOutputCallRequest</code> 15 */ 16class StreamingOutputCallRequest extends \Google\Protobuf\Internal\Message 17{ 18 /** 19 * Desired payload type in the response from the server. 20 * If response_type is RANDOM, the payload from each response in the stream 21 * might be of different types. This is to simulate a mixed type of payload 22 * stream. 23 * 24 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 25 */ 26 protected $response_type = 0; 27 /** 28 * Configuration for each expected response message. 29 * 30 * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> 31 */ 32 private $response_parameters; 33 /** 34 * Optional input payload sent along with the request. 35 * 36 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 37 */ 38 protected $payload = null; 39 /** 40 * Whether server should return a given status 41 * 42 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 43 */ 44 protected $response_status = null; 45 /** 46 * If set the server should update this metrics report data at the OOB server. 47 * 48 * Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 8;</code> 49 */ 50 protected $orca_oob_report = null; 51 52 /** 53 * Constructor. 54 * 55 * @param array $data { 56 * Optional. Data for populating the Message object. 57 * 58 * @type int $response_type 59 * Desired payload type in the response from the server. 60 * If response_type is RANDOM, the payload from each response in the stream 61 * might be of different types. This is to simulate a mixed type of payload 62 * stream. 63 * @type array<\Grpc\Testing\ResponseParameters>|\Google\Protobuf\Internal\RepeatedField $response_parameters 64 * Configuration for each expected response message. 65 * @type \Grpc\Testing\Payload $payload 66 * Optional input payload sent along with the request. 67 * @type \Grpc\Testing\EchoStatus $response_status 68 * Whether server should return a given status 69 * @type \Grpc\Testing\TestOrcaReport $orca_oob_report 70 * If set the server should update this metrics report data at the OOB server. 71 * } 72 */ 73 public function __construct($data = NULL) { 74 \GPBMetadata\Src\Proto\Grpc\Testing\Messages::initOnce(); 75 parent::__construct($data); 76 } 77 78 /** 79 * Desired payload type in the response from the server. 80 * If response_type is RANDOM, the payload from each response in the stream 81 * might be of different types. This is to simulate a mixed type of payload 82 * stream. 83 * 84 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 85 * @return int 86 */ 87 public function getResponseType() 88 { 89 return $this->response_type; 90 } 91 92 /** 93 * Desired payload type in the response from the server. 94 * If response_type is RANDOM, the payload from each response in the stream 95 * might be of different types. This is to simulate a mixed type of payload 96 * stream. 97 * 98 * Generated from protobuf field <code>.grpc.testing.PayloadType response_type = 1;</code> 99 * @param int $var 100 * @return $this 101 */ 102 public function setResponseType($var) 103 { 104 GPBUtil::checkEnum($var, \Grpc\Testing\PayloadType::class); 105 $this->response_type = $var; 106 107 return $this; 108 } 109 110 /** 111 * Configuration for each expected response message. 112 * 113 * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> 114 * @return \Google\Protobuf\Internal\RepeatedField 115 */ 116 public function getResponseParameters() 117 { 118 return $this->response_parameters; 119 } 120 121 /** 122 * Configuration for each expected response message. 123 * 124 * Generated from protobuf field <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code> 125 * @param array<\Grpc\Testing\ResponseParameters>|\Google\Protobuf\Internal\RepeatedField $var 126 * @return $this 127 */ 128 public function setResponseParameters($var) 129 { 130 $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Grpc\Testing\ResponseParameters::class); 131 $this->response_parameters = $arr; 132 133 return $this; 134 } 135 136 /** 137 * Optional input payload sent along with the request. 138 * 139 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 140 * @return \Grpc\Testing\Payload|null 141 */ 142 public function getPayload() 143 { 144 return $this->payload; 145 } 146 147 public function hasPayload() 148 { 149 return isset($this->payload); 150 } 151 152 public function clearPayload() 153 { 154 unset($this->payload); 155 } 156 157 /** 158 * Optional input payload sent along with the request. 159 * 160 * Generated from protobuf field <code>.grpc.testing.Payload payload = 3;</code> 161 * @param \Grpc\Testing\Payload $var 162 * @return $this 163 */ 164 public function setPayload($var) 165 { 166 GPBUtil::checkMessage($var, \Grpc\Testing\Payload::class); 167 $this->payload = $var; 168 169 return $this; 170 } 171 172 /** 173 * Whether server should return a given status 174 * 175 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 176 * @return \Grpc\Testing\EchoStatus|null 177 */ 178 public function getResponseStatus() 179 { 180 return $this->response_status; 181 } 182 183 public function hasResponseStatus() 184 { 185 return isset($this->response_status); 186 } 187 188 public function clearResponseStatus() 189 { 190 unset($this->response_status); 191 } 192 193 /** 194 * Whether server should return a given status 195 * 196 * Generated from protobuf field <code>.grpc.testing.EchoStatus response_status = 7;</code> 197 * @param \Grpc\Testing\EchoStatus $var 198 * @return $this 199 */ 200 public function setResponseStatus($var) 201 { 202 GPBUtil::checkMessage($var, \Grpc\Testing\EchoStatus::class); 203 $this->response_status = $var; 204 205 return $this; 206 } 207 208 /** 209 * If set the server should update this metrics report data at the OOB server. 210 * 211 * Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 8;</code> 212 * @return \Grpc\Testing\TestOrcaReport|null 213 */ 214 public function getOrcaOobReport() 215 { 216 return $this->orca_oob_report; 217 } 218 219 public function hasOrcaOobReport() 220 { 221 return isset($this->orca_oob_report); 222 } 223 224 public function clearOrcaOobReport() 225 { 226 unset($this->orca_oob_report); 227 } 228 229 /** 230 * If set the server should update this metrics report data at the OOB server. 231 * 232 * Generated from protobuf field <code>.grpc.testing.TestOrcaReport orca_oob_report = 8;</code> 233 * @param \Grpc\Testing\TestOrcaReport $var 234 * @return $this 235 */ 236 public function setOrcaOobReport($var) 237 { 238 GPBUtil::checkMessage($var, \Grpc\Testing\TestOrcaReport::class); 239 $this->orca_oob_report = $var; 240 241 return $this; 242 } 243 244} 245 246