1<?hh // strict 2/** 3 * Autogenerated by Thrift 4 * 5 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING 6 * @generated 7 */ 8 9/** 10 * Original thrift service:- 11 * SinkService 12 */ 13interface SinkServiceAsyncIf extends \IThriftAsyncIf { 14} 15 16/** 17 * Original thrift service:- 18 * SinkService 19 */ 20interface SinkServiceIf extends \IThriftSyncIf { 21} 22 23/** 24 * Original thrift service:- 25 * SinkService 26 */ 27interface SinkServiceAsyncClientIf extends SinkServiceAsyncIf { 28 /** 29 * Original thrift definition:- 30 * void, sink<SinkPayload, FinalResponse> 31 * method(); 32 */ 33 public function method(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 34 35 /** 36 * Original thrift definition:- 37 * InitialResponse, sink<SinkPayload, FinalResponse> 38 * methodAndReponse(); 39 */ 40 public function methodAndReponse(): Awaitable<\ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>>; 41 42 /** 43 * Original thrift definition:- 44 * void, sink<SinkPayload, FinalResponse> 45 * methodThrow() 46 * throws (1: InitialException ex); 47 */ 48 public function methodThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 49 50 /** 51 * Original thrift definition:- 52 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse> 53 * methodSinkThrow(); 54 */ 55 public function methodSinkThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 56 57 /** 58 * Original thrift definition:- 59 * void, sink<SinkPayload, FinalResponse, throws (1: SinkException2 ex)> 60 * methodFinalThrow(); 61 */ 62 public function methodFinalThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 63 64 /** 65 * Original thrift definition:- 66 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse, throws (1: SinkException2 ex)> 67 * methodBothThrow(); 68 */ 69 public function methodBothThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 70 71 /** 72 * Original thrift definition:- 73 * void, sink<SinkPayload, FinalResponse> 74 * methodFast(); 75 */ 76 public function methodFast(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 77} 78 79/** 80 * Original thrift service:- 81 * SinkService 82 */ 83interface SinkServiceClientIf extends \IThriftSyncIf { 84 /** 85 * Original thrift definition:- 86 * void, sink<SinkPayload, FinalResponse> 87 * method(); 88 */ 89 public function method(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 90 91 /** 92 * Original thrift definition:- 93 * InitialResponse, sink<SinkPayload, FinalResponse> 94 * methodAndReponse(); 95 */ 96 public function methodAndReponse(): Awaitable<\ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>>; 97 98 /** 99 * Original thrift definition:- 100 * void, sink<SinkPayload, FinalResponse> 101 * methodThrow() 102 * throws (1: InitialException ex); 103 */ 104 public function methodThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 105 106 /** 107 * Original thrift definition:- 108 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse> 109 * methodSinkThrow(); 110 */ 111 public function methodSinkThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 112 113 /** 114 * Original thrift definition:- 115 * void, sink<SinkPayload, FinalResponse, throws (1: SinkException2 ex)> 116 * methodFinalThrow(); 117 */ 118 public function methodFinalThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 119 120 /** 121 * Original thrift definition:- 122 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse, throws (1: SinkException2 ex)> 123 * methodBothThrow(); 124 */ 125 public function methodBothThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 126 127 /** 128 * Original thrift definition:- 129 * void, sink<SinkPayload, FinalResponse> 130 * methodFast(); 131 */ 132 public function methodFast(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>>; 133} 134 135/** 136 * Original thrift service:- 137 * SinkService 138 */ 139interface SinkServiceAsyncRpcOptionsIf extends \IThriftAsyncRpcOptionsIf { 140} 141 142/** 143 * Original thrift service:- 144 * SinkService 145 */ 146trait SinkServiceClientBase { 147 require extends \ThriftClientBase; 148 149 protected function sendImpl_method(): int { 150 $currentseqid = $this->getNextSequenceID(); 151 $args = SinkService_method_args::withDefaultValues(); 152 try { 153 $this->eventHandler_->preSend('method', $args, $currentseqid); 154 if ($this->output_ is \TBinaryProtocolAccelerated) 155 { 156 \thrift_protocol_write_binary($this->output_, 'method', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 157 } 158 else if ($this->output_ is \TCompactProtocolAccelerated) 159 { 160 \thrift_protocol_write_compact($this->output_, 'method', \TMessageType::CALL, $args, $currentseqid, false); 161 } 162 else 163 { 164 $this->output_->writeMessageBegin('method', \TMessageType::CALL, $currentseqid); 165 $args->write($this->output_); 166 $this->output_->writeMessageEnd(); 167 $this->output_->getTransport()->flush(); 168 } 169 } catch (\THandlerShortCircuitException $ex) { 170 switch ($ex->resultType) { 171 case \THandlerShortCircuitException::R_EXPECTED_EX: 172 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 173 $this->eventHandler_->sendError('method', $args, $currentseqid, $ex->result); 174 throw $ex->result; 175 case \THandlerShortCircuitException::R_SUCCESS: 176 default: 177 $this->eventHandler_->postSend('method', $args, $currentseqid); 178 return $currentseqid; 179 } 180 } catch (\Exception $ex) { 181 $this->eventHandler_->sendError('method', $args, $currentseqid, $ex); 182 throw $ex; 183 } 184 $this->eventHandler_->postSend('method', $args, $currentseqid); 185 return $currentseqid; 186 } 187 188 protected function sendImpl_method_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 189 $protocol = $this->output_; 190 return function( 191 ?SinkPayload $sink_payload, ?\Exception $ex 192 ) use ( 193 $protocol, 194 ) { 195 196 $transport = $protocol->getTransport(); 197 invariant( 198 $transport is \TMemoryBuffer, 199 "Sink methods require TMemoryBuffer transport" 200 ); 201 202 $is_application_ex = false; 203 204 if ($ex !== null) { 205 if ($ex is \TApplicationException) { 206 $is_application_ex = true; 207 $result = $ex; 208 } else { 209 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 210 } 211 } else { 212 $result = SinkService_method_SinkPayload::fromShape(shape( 213 'success' => $sink_payload, 214 )); 215 } 216 217 $result->write($protocol); 218 $protocol->writeMessageEnd(); 219 $transport->flush(); 220 $msg = $transport->getBuffer(); 221 $transport->resetBuffer(); 222 return tuple($msg, $is_application_ex); 223 }; 224 } 225 226 protected function recvImpl_method_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 227 $protocol = $this->input_; 228 return function( 229 ?string $sink_final_response, ?\Exception $ex 230 ) use ( 231 $protocol, 232 ) { 233 try { 234 if ($ex !== null) { 235 throw $ex; 236 } 237 $transport = $protocol->getTransport(); 238 invariant( 239 $transport is \TMemoryBuffer, 240 "Stream methods require TMemoryBuffer transport" 241 ); 242 243 $transport->resetBuffer(); 244 $transport->write($sink_final_response as nonnull); 245 $result = SinkService_method_FinalResponse::withDefaultValues(); 246 $result->read($protocol); 247 $protocol->readMessageEnd(); 248 } catch (\THandlerShortCircuitException $ex) { 249 throw $ex->result; 250 } 251 if ($result->success !== null) { 252 return $result->success; 253 } 254 throw new \TApplicationException("method failed: unknown result", \TApplicationException::MISSING_RESULT); 255 }; 256 } 257 258 protected function recvImpl_method_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): void { 259 try { 260 $this->eventHandler_->preRecv('method', $expectedsequenceid); 261 if ($this->input_ is \TBinaryProtocolAccelerated) { 262 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_method_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 263 } else if ($this->input_ is \TCompactProtocolAccelerated) 264 { 265 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_method_FirstResponse', Shapes::idx($options, 'read_options', 0)); 266 } 267 else 268 { 269 $rseqid = 0; 270 $fname = ''; 271 $mtype = 0; 272 273 $this->input_->readMessageBegin( 274 inout $fname, 275 inout $mtype, 276 inout $rseqid, 277 ); 278 if ($mtype === \TMessageType::EXCEPTION) { 279 $x = new \TApplicationException(); 280 $x->read($this->input_); 281 $this->input_->readMessageEnd(); 282 throw $x; 283 } 284 $result = SinkService_method_FirstResponse::withDefaultValues(); 285 $result->read($this->input_); 286 $this->input_->readMessageEnd(); 287 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 288 throw new \TProtocolException("method failed: sequence id is out of order"); 289 } 290 } 291 } catch (\THandlerShortCircuitException $ex) { 292 switch ($ex->resultType) { 293 case \THandlerShortCircuitException::R_EXPECTED_EX: 294 $this->eventHandler_->recvException('method', $expectedsequenceid, $ex->result); 295 throw $ex->result; 296 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 297 $this->eventHandler_->recvError('method', $expectedsequenceid, $ex->result); 298 throw $ex->result; 299 case \THandlerShortCircuitException::R_SUCCESS: 300 default: 301 $this->eventHandler_->postRecv('method', $expectedsequenceid, $ex->result); 302 return; 303 } 304 } catch (\Exception $ex) { 305 $this->eventHandler_->recvError('method', $expectedsequenceid, $ex); 306 throw $ex; 307 } 308 $this->eventHandler_->postRecv('method', $expectedsequenceid, null); 309 return; 310 } 311 312 protected function sendImpl_methodAndReponse(): int { 313 $currentseqid = $this->getNextSequenceID(); 314 $args = SinkService_methodAndReponse_args::withDefaultValues(); 315 try { 316 $this->eventHandler_->preSend('methodAndReponse', $args, $currentseqid); 317 if ($this->output_ is \TBinaryProtocolAccelerated) 318 { 319 \thrift_protocol_write_binary($this->output_, 'methodAndReponse', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 320 } 321 else if ($this->output_ is \TCompactProtocolAccelerated) 322 { 323 \thrift_protocol_write_compact($this->output_, 'methodAndReponse', \TMessageType::CALL, $args, $currentseqid, false); 324 } 325 else 326 { 327 $this->output_->writeMessageBegin('methodAndReponse', \TMessageType::CALL, $currentseqid); 328 $args->write($this->output_); 329 $this->output_->writeMessageEnd(); 330 $this->output_->getTransport()->flush(); 331 } 332 } catch (\THandlerShortCircuitException $ex) { 333 switch ($ex->resultType) { 334 case \THandlerShortCircuitException::R_EXPECTED_EX: 335 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 336 $this->eventHandler_->sendError('methodAndReponse', $args, $currentseqid, $ex->result); 337 throw $ex->result; 338 case \THandlerShortCircuitException::R_SUCCESS: 339 default: 340 $this->eventHandler_->postSend('methodAndReponse', $args, $currentseqid); 341 return $currentseqid; 342 } 343 } catch (\Exception $ex) { 344 $this->eventHandler_->sendError('methodAndReponse', $args, $currentseqid, $ex); 345 throw $ex; 346 } 347 $this->eventHandler_->postSend('methodAndReponse', $args, $currentseqid); 348 return $currentseqid; 349 } 350 351 protected function sendImpl_methodAndReponse_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 352 $protocol = $this->output_; 353 return function( 354 ?SinkPayload $sink_payload, ?\Exception $ex 355 ) use ( 356 $protocol, 357 ) { 358 359 $transport = $protocol->getTransport(); 360 invariant( 361 $transport is \TMemoryBuffer, 362 "Sink methods require TMemoryBuffer transport" 363 ); 364 365 $is_application_ex = false; 366 367 if ($ex !== null) { 368 if ($ex is \TApplicationException) { 369 $is_application_ex = true; 370 $result = $ex; 371 } else { 372 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 373 } 374 } else { 375 $result = SinkService_methodAndReponse_SinkPayload::fromShape(shape( 376 'success' => $sink_payload, 377 )); 378 } 379 380 $result->write($protocol); 381 $protocol->writeMessageEnd(); 382 $transport->flush(); 383 $msg = $transport->getBuffer(); 384 $transport->resetBuffer(); 385 return tuple($msg, $is_application_ex); 386 }; 387 } 388 389 protected function recvImpl_methodAndReponse_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 390 $protocol = $this->input_; 391 return function( 392 ?string $sink_final_response, ?\Exception $ex 393 ) use ( 394 $protocol, 395 ) { 396 try { 397 if ($ex !== null) { 398 throw $ex; 399 } 400 $transport = $protocol->getTransport(); 401 invariant( 402 $transport is \TMemoryBuffer, 403 "Stream methods require TMemoryBuffer transport" 404 ); 405 406 $transport->resetBuffer(); 407 $transport->write($sink_final_response as nonnull); 408 $result = SinkService_methodAndReponse_FinalResponse::withDefaultValues(); 409 $result->read($protocol); 410 $protocol->readMessageEnd(); 411 } catch (\THandlerShortCircuitException $ex) { 412 throw $ex->result; 413 } 414 if ($result->success !== null) { 415 return $result->success; 416 } 417 throw new \TApplicationException("methodAndReponse failed: unknown result", \TApplicationException::MISSING_RESULT); 418 }; 419 } 420 421 protected function recvImpl_methodAndReponse_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): InitialResponse { 422 try { 423 $this->eventHandler_->preRecv('methodAndReponse', $expectedsequenceid); 424 if ($this->input_ is \TBinaryProtocolAccelerated) { 425 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_methodAndReponse_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 426 } else if ($this->input_ is \TCompactProtocolAccelerated) 427 { 428 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_methodAndReponse_FirstResponse', Shapes::idx($options, 'read_options', 0)); 429 } 430 else 431 { 432 $rseqid = 0; 433 $fname = ''; 434 $mtype = 0; 435 436 $this->input_->readMessageBegin( 437 inout $fname, 438 inout $mtype, 439 inout $rseqid, 440 ); 441 if ($mtype === \TMessageType::EXCEPTION) { 442 $x = new \TApplicationException(); 443 $x->read($this->input_); 444 $this->input_->readMessageEnd(); 445 throw $x; 446 } 447 $result = SinkService_methodAndReponse_FirstResponse::withDefaultValues(); 448 $result->read($this->input_); 449 $this->input_->readMessageEnd(); 450 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 451 throw new \TProtocolException("methodAndReponse failed: sequence id is out of order"); 452 } 453 } 454 } catch (\THandlerShortCircuitException $ex) { 455 switch ($ex->resultType) { 456 case \THandlerShortCircuitException::R_EXPECTED_EX: 457 $this->eventHandler_->recvException('methodAndReponse', $expectedsequenceid, $ex->result); 458 throw $ex->result; 459 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 460 $this->eventHandler_->recvError('methodAndReponse', $expectedsequenceid, $ex->result); 461 throw $ex->result; 462 case \THandlerShortCircuitException::R_SUCCESS: 463 default: 464 $this->eventHandler_->postRecv('methodAndReponse', $expectedsequenceid, $ex->result); 465 return $ex->result; 466 } 467 } catch (\Exception $ex) { 468 $this->eventHandler_->recvError('methodAndReponse', $expectedsequenceid, $ex); 469 throw $ex; 470 } 471 if ($result->success !== null) { 472 $success = $result->success; 473 $this->eventHandler_->postRecv('methodAndReponse', $expectedsequenceid, $success); 474 return $success; 475 } 476 $x = new \TApplicationException("methodAndReponse failed: unknown result", \TApplicationException::MISSING_RESULT); 477 $this->eventHandler_->recvError('methodAndReponse', $expectedsequenceid, $x); 478 throw $x; 479 } 480 481 protected function sendImpl_methodThrow(): int { 482 $currentseqid = $this->getNextSequenceID(); 483 $args = SinkService_methodThrow_args::withDefaultValues(); 484 try { 485 $this->eventHandler_->preSend('methodThrow', $args, $currentseqid); 486 if ($this->output_ is \TBinaryProtocolAccelerated) 487 { 488 \thrift_protocol_write_binary($this->output_, 'methodThrow', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 489 } 490 else if ($this->output_ is \TCompactProtocolAccelerated) 491 { 492 \thrift_protocol_write_compact($this->output_, 'methodThrow', \TMessageType::CALL, $args, $currentseqid, false); 493 } 494 else 495 { 496 $this->output_->writeMessageBegin('methodThrow', \TMessageType::CALL, $currentseqid); 497 $args->write($this->output_); 498 $this->output_->writeMessageEnd(); 499 $this->output_->getTransport()->flush(); 500 } 501 } catch (\THandlerShortCircuitException $ex) { 502 switch ($ex->resultType) { 503 case \THandlerShortCircuitException::R_EXPECTED_EX: 504 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 505 $this->eventHandler_->sendError('methodThrow', $args, $currentseqid, $ex->result); 506 throw $ex->result; 507 case \THandlerShortCircuitException::R_SUCCESS: 508 default: 509 $this->eventHandler_->postSend('methodThrow', $args, $currentseqid); 510 return $currentseqid; 511 } 512 } catch (\Exception $ex) { 513 $this->eventHandler_->sendError('methodThrow', $args, $currentseqid, $ex); 514 throw $ex; 515 } 516 $this->eventHandler_->postSend('methodThrow', $args, $currentseqid); 517 return $currentseqid; 518 } 519 520 protected function sendImpl_methodThrow_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 521 $protocol = $this->output_; 522 return function( 523 ?SinkPayload $sink_payload, ?\Exception $ex 524 ) use ( 525 $protocol, 526 ) { 527 528 $transport = $protocol->getTransport(); 529 invariant( 530 $transport is \TMemoryBuffer, 531 "Sink methods require TMemoryBuffer transport" 532 ); 533 534 $is_application_ex = false; 535 536 if ($ex !== null) { 537 if ($ex is \TApplicationException) { 538 $is_application_ex = true; 539 $result = $ex; 540 } else { 541 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 542 } 543 } else { 544 $result = SinkService_methodThrow_SinkPayload::fromShape(shape( 545 'success' => $sink_payload, 546 )); 547 } 548 549 $result->write($protocol); 550 $protocol->writeMessageEnd(); 551 $transport->flush(); 552 $msg = $transport->getBuffer(); 553 $transport->resetBuffer(); 554 return tuple($msg, $is_application_ex); 555 }; 556 } 557 558 protected function recvImpl_methodThrow_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 559 $protocol = $this->input_; 560 return function( 561 ?string $sink_final_response, ?\Exception $ex 562 ) use ( 563 $protocol, 564 ) { 565 try { 566 if ($ex !== null) { 567 throw $ex; 568 } 569 $transport = $protocol->getTransport(); 570 invariant( 571 $transport is \TMemoryBuffer, 572 "Stream methods require TMemoryBuffer transport" 573 ); 574 575 $transport->resetBuffer(); 576 $transport->write($sink_final_response as nonnull); 577 $result = SinkService_methodThrow_FinalResponse::withDefaultValues(); 578 $result->read($protocol); 579 $protocol->readMessageEnd(); 580 } catch (\THandlerShortCircuitException $ex) { 581 throw $ex->result; 582 } 583 if ($result->success !== null) { 584 return $result->success; 585 } 586 throw new \TApplicationException("methodThrow failed: unknown result", \TApplicationException::MISSING_RESULT); 587 }; 588 } 589 590 protected function recvImpl_methodThrow_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): void { 591 try { 592 $this->eventHandler_->preRecv('methodThrow', $expectedsequenceid); 593 if ($this->input_ is \TBinaryProtocolAccelerated) { 594 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_methodThrow_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 595 } else if ($this->input_ is \TCompactProtocolAccelerated) 596 { 597 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_methodThrow_FirstResponse', Shapes::idx($options, 'read_options', 0)); 598 } 599 else 600 { 601 $rseqid = 0; 602 $fname = ''; 603 $mtype = 0; 604 605 $this->input_->readMessageBegin( 606 inout $fname, 607 inout $mtype, 608 inout $rseqid, 609 ); 610 if ($mtype === \TMessageType::EXCEPTION) { 611 $x = new \TApplicationException(); 612 $x->read($this->input_); 613 $this->input_->readMessageEnd(); 614 throw $x; 615 } 616 $result = SinkService_methodThrow_FirstResponse::withDefaultValues(); 617 $result->read($this->input_); 618 $this->input_->readMessageEnd(); 619 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 620 throw new \TProtocolException("methodThrow failed: sequence id is out of order"); 621 } 622 } 623 } catch (\THandlerShortCircuitException $ex) { 624 switch ($ex->resultType) { 625 case \THandlerShortCircuitException::R_EXPECTED_EX: 626 $this->eventHandler_->recvException('methodThrow', $expectedsequenceid, $ex->result); 627 throw $ex->result; 628 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 629 $this->eventHandler_->recvError('methodThrow', $expectedsequenceid, $ex->result); 630 throw $ex->result; 631 case \THandlerShortCircuitException::R_SUCCESS: 632 default: 633 $this->eventHandler_->postRecv('methodThrow', $expectedsequenceid, $ex->result); 634 return; 635 } 636 } catch (\Exception $ex) { 637 $this->eventHandler_->recvError('methodThrow', $expectedsequenceid, $ex); 638 throw $ex; 639 } 640 if ($result->ex !== null) { 641 $x = $result->ex; 642 $this->eventHandler_->recvException('methodThrow', $expectedsequenceid, $x); 643 throw $x; 644 } 645 $this->eventHandler_->postRecv('methodThrow', $expectedsequenceid, null); 646 return; 647 } 648 649 protected function sendImpl_methodSinkThrow(): int { 650 $currentseqid = $this->getNextSequenceID(); 651 $args = SinkService_methodSinkThrow_args::withDefaultValues(); 652 try { 653 $this->eventHandler_->preSend('methodSinkThrow', $args, $currentseqid); 654 if ($this->output_ is \TBinaryProtocolAccelerated) 655 { 656 \thrift_protocol_write_binary($this->output_, 'methodSinkThrow', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 657 } 658 else if ($this->output_ is \TCompactProtocolAccelerated) 659 { 660 \thrift_protocol_write_compact($this->output_, 'methodSinkThrow', \TMessageType::CALL, $args, $currentseqid, false); 661 } 662 else 663 { 664 $this->output_->writeMessageBegin('methodSinkThrow', \TMessageType::CALL, $currentseqid); 665 $args->write($this->output_); 666 $this->output_->writeMessageEnd(); 667 $this->output_->getTransport()->flush(); 668 } 669 } catch (\THandlerShortCircuitException $ex) { 670 switch ($ex->resultType) { 671 case \THandlerShortCircuitException::R_EXPECTED_EX: 672 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 673 $this->eventHandler_->sendError('methodSinkThrow', $args, $currentseqid, $ex->result); 674 throw $ex->result; 675 case \THandlerShortCircuitException::R_SUCCESS: 676 default: 677 $this->eventHandler_->postSend('methodSinkThrow', $args, $currentseqid); 678 return $currentseqid; 679 } 680 } catch (\Exception $ex) { 681 $this->eventHandler_->sendError('methodSinkThrow', $args, $currentseqid, $ex); 682 throw $ex; 683 } 684 $this->eventHandler_->postSend('methodSinkThrow', $args, $currentseqid); 685 return $currentseqid; 686 } 687 688 protected function sendImpl_methodSinkThrow_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 689 $protocol = $this->output_; 690 return function( 691 ?SinkPayload $sink_payload, ?\Exception $ex 692 ) use ( 693 $protocol, 694 ) { 695 696 $transport = $protocol->getTransport(); 697 invariant( 698 $transport is \TMemoryBuffer, 699 "Sink methods require TMemoryBuffer transport" 700 ); 701 702 $is_application_ex = false; 703 704 if ($ex !== null) { 705 if ($ex is SinkException1) { 706 $result = SinkService_methodSinkThrow_SinkPayload::fromShape(shape( 707 'ex' => $ex, 708 )); 709 } else if ($ex is \TApplicationException) { 710 $is_application_ex = true; 711 $result = $ex; 712 } else { 713 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 714 } 715 } else { 716 $result = SinkService_methodSinkThrow_SinkPayload::fromShape(shape( 717 'success' => $sink_payload, 718 )); 719 } 720 721 $result->write($protocol); 722 $protocol->writeMessageEnd(); 723 $transport->flush(); 724 $msg = $transport->getBuffer(); 725 $transport->resetBuffer(); 726 return tuple($msg, $is_application_ex); 727 }; 728 } 729 730 protected function recvImpl_methodSinkThrow_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 731 $protocol = $this->input_; 732 return function( 733 ?string $sink_final_response, ?\Exception $ex 734 ) use ( 735 $protocol, 736 ) { 737 try { 738 if ($ex !== null) { 739 throw $ex; 740 } 741 $transport = $protocol->getTransport(); 742 invariant( 743 $transport is \TMemoryBuffer, 744 "Stream methods require TMemoryBuffer transport" 745 ); 746 747 $transport->resetBuffer(); 748 $transport->write($sink_final_response as nonnull); 749 $result = SinkService_methodSinkThrow_FinalResponse::withDefaultValues(); 750 $result->read($protocol); 751 $protocol->readMessageEnd(); 752 } catch (\THandlerShortCircuitException $ex) { 753 throw $ex->result; 754 } 755 if ($result->success !== null) { 756 return $result->success; 757 } 758 throw new \TApplicationException("methodSinkThrow failed: unknown result", \TApplicationException::MISSING_RESULT); 759 }; 760 } 761 762 protected function recvImpl_methodSinkThrow_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): void { 763 try { 764 $this->eventHandler_->preRecv('methodSinkThrow', $expectedsequenceid); 765 if ($this->input_ is \TBinaryProtocolAccelerated) { 766 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_methodSinkThrow_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 767 } else if ($this->input_ is \TCompactProtocolAccelerated) 768 { 769 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_methodSinkThrow_FirstResponse', Shapes::idx($options, 'read_options', 0)); 770 } 771 else 772 { 773 $rseqid = 0; 774 $fname = ''; 775 $mtype = 0; 776 777 $this->input_->readMessageBegin( 778 inout $fname, 779 inout $mtype, 780 inout $rseqid, 781 ); 782 if ($mtype === \TMessageType::EXCEPTION) { 783 $x = new \TApplicationException(); 784 $x->read($this->input_); 785 $this->input_->readMessageEnd(); 786 throw $x; 787 } 788 $result = SinkService_methodSinkThrow_FirstResponse::withDefaultValues(); 789 $result->read($this->input_); 790 $this->input_->readMessageEnd(); 791 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 792 throw new \TProtocolException("methodSinkThrow failed: sequence id is out of order"); 793 } 794 } 795 } catch (\THandlerShortCircuitException $ex) { 796 switch ($ex->resultType) { 797 case \THandlerShortCircuitException::R_EXPECTED_EX: 798 $this->eventHandler_->recvException('methodSinkThrow', $expectedsequenceid, $ex->result); 799 throw $ex->result; 800 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 801 $this->eventHandler_->recvError('methodSinkThrow', $expectedsequenceid, $ex->result); 802 throw $ex->result; 803 case \THandlerShortCircuitException::R_SUCCESS: 804 default: 805 $this->eventHandler_->postRecv('methodSinkThrow', $expectedsequenceid, $ex->result); 806 return; 807 } 808 } catch (\Exception $ex) { 809 $this->eventHandler_->recvError('methodSinkThrow', $expectedsequenceid, $ex); 810 throw $ex; 811 } 812 $this->eventHandler_->postRecv('methodSinkThrow', $expectedsequenceid, null); 813 return; 814 } 815 816 protected function sendImpl_methodFinalThrow(): int { 817 $currentseqid = $this->getNextSequenceID(); 818 $args = SinkService_methodFinalThrow_args::withDefaultValues(); 819 try { 820 $this->eventHandler_->preSend('methodFinalThrow', $args, $currentseqid); 821 if ($this->output_ is \TBinaryProtocolAccelerated) 822 { 823 \thrift_protocol_write_binary($this->output_, 'methodFinalThrow', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 824 } 825 else if ($this->output_ is \TCompactProtocolAccelerated) 826 { 827 \thrift_protocol_write_compact($this->output_, 'methodFinalThrow', \TMessageType::CALL, $args, $currentseqid, false); 828 } 829 else 830 { 831 $this->output_->writeMessageBegin('methodFinalThrow', \TMessageType::CALL, $currentseqid); 832 $args->write($this->output_); 833 $this->output_->writeMessageEnd(); 834 $this->output_->getTransport()->flush(); 835 } 836 } catch (\THandlerShortCircuitException $ex) { 837 switch ($ex->resultType) { 838 case \THandlerShortCircuitException::R_EXPECTED_EX: 839 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 840 $this->eventHandler_->sendError('methodFinalThrow', $args, $currentseqid, $ex->result); 841 throw $ex->result; 842 case \THandlerShortCircuitException::R_SUCCESS: 843 default: 844 $this->eventHandler_->postSend('methodFinalThrow', $args, $currentseqid); 845 return $currentseqid; 846 } 847 } catch (\Exception $ex) { 848 $this->eventHandler_->sendError('methodFinalThrow', $args, $currentseqid, $ex); 849 throw $ex; 850 } 851 $this->eventHandler_->postSend('methodFinalThrow', $args, $currentseqid); 852 return $currentseqid; 853 } 854 855 protected function sendImpl_methodFinalThrow_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 856 $protocol = $this->output_; 857 return function( 858 ?SinkPayload $sink_payload, ?\Exception $ex 859 ) use ( 860 $protocol, 861 ) { 862 863 $transport = $protocol->getTransport(); 864 invariant( 865 $transport is \TMemoryBuffer, 866 "Sink methods require TMemoryBuffer transport" 867 ); 868 869 $is_application_ex = false; 870 871 if ($ex !== null) { 872 if ($ex is \TApplicationException) { 873 $is_application_ex = true; 874 $result = $ex; 875 } else { 876 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 877 } 878 } else { 879 $result = SinkService_methodFinalThrow_SinkPayload::fromShape(shape( 880 'success' => $sink_payload, 881 )); 882 } 883 884 $result->write($protocol); 885 $protocol->writeMessageEnd(); 886 $transport->flush(); 887 $msg = $transport->getBuffer(); 888 $transport->resetBuffer(); 889 return tuple($msg, $is_application_ex); 890 }; 891 } 892 893 protected function recvImpl_methodFinalThrow_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 894 $protocol = $this->input_; 895 return function( 896 ?string $sink_final_response, ?\Exception $ex 897 ) use ( 898 $protocol, 899 ) { 900 try { 901 if ($ex !== null) { 902 throw $ex; 903 } 904 $transport = $protocol->getTransport(); 905 invariant( 906 $transport is \TMemoryBuffer, 907 "Stream methods require TMemoryBuffer transport" 908 ); 909 910 $transport->resetBuffer(); 911 $transport->write($sink_final_response as nonnull); 912 $result = SinkService_methodFinalThrow_FinalResponse::withDefaultValues(); 913 $result->read($protocol); 914 $protocol->readMessageEnd(); 915 } catch (\THandlerShortCircuitException $ex) { 916 throw $ex->result; 917 } 918 if ($result->success !== null) { 919 return $result->success; 920 } 921 if ($result->ex !== null) { 922 throw $result->ex; 923 } 924 throw new \TApplicationException("methodFinalThrow failed: unknown result", \TApplicationException::MISSING_RESULT); 925 }; 926 } 927 928 protected function recvImpl_methodFinalThrow_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): void { 929 try { 930 $this->eventHandler_->preRecv('methodFinalThrow', $expectedsequenceid); 931 if ($this->input_ is \TBinaryProtocolAccelerated) { 932 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_methodFinalThrow_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 933 } else if ($this->input_ is \TCompactProtocolAccelerated) 934 { 935 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_methodFinalThrow_FirstResponse', Shapes::idx($options, 'read_options', 0)); 936 } 937 else 938 { 939 $rseqid = 0; 940 $fname = ''; 941 $mtype = 0; 942 943 $this->input_->readMessageBegin( 944 inout $fname, 945 inout $mtype, 946 inout $rseqid, 947 ); 948 if ($mtype === \TMessageType::EXCEPTION) { 949 $x = new \TApplicationException(); 950 $x->read($this->input_); 951 $this->input_->readMessageEnd(); 952 throw $x; 953 } 954 $result = SinkService_methodFinalThrow_FirstResponse::withDefaultValues(); 955 $result->read($this->input_); 956 $this->input_->readMessageEnd(); 957 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 958 throw new \TProtocolException("methodFinalThrow failed: sequence id is out of order"); 959 } 960 } 961 } catch (\THandlerShortCircuitException $ex) { 962 switch ($ex->resultType) { 963 case \THandlerShortCircuitException::R_EXPECTED_EX: 964 $this->eventHandler_->recvException('methodFinalThrow', $expectedsequenceid, $ex->result); 965 throw $ex->result; 966 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 967 $this->eventHandler_->recvError('methodFinalThrow', $expectedsequenceid, $ex->result); 968 throw $ex->result; 969 case \THandlerShortCircuitException::R_SUCCESS: 970 default: 971 $this->eventHandler_->postRecv('methodFinalThrow', $expectedsequenceid, $ex->result); 972 return; 973 } 974 } catch (\Exception $ex) { 975 $this->eventHandler_->recvError('methodFinalThrow', $expectedsequenceid, $ex); 976 throw $ex; 977 } 978 $this->eventHandler_->postRecv('methodFinalThrow', $expectedsequenceid, null); 979 return; 980 } 981 982 protected function sendImpl_methodBothThrow(): int { 983 $currentseqid = $this->getNextSequenceID(); 984 $args = SinkService_methodBothThrow_args::withDefaultValues(); 985 try { 986 $this->eventHandler_->preSend('methodBothThrow', $args, $currentseqid); 987 if ($this->output_ is \TBinaryProtocolAccelerated) 988 { 989 \thrift_protocol_write_binary($this->output_, 'methodBothThrow', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 990 } 991 else if ($this->output_ is \TCompactProtocolAccelerated) 992 { 993 \thrift_protocol_write_compact($this->output_, 'methodBothThrow', \TMessageType::CALL, $args, $currentseqid, false); 994 } 995 else 996 { 997 $this->output_->writeMessageBegin('methodBothThrow', \TMessageType::CALL, $currentseqid); 998 $args->write($this->output_); 999 $this->output_->writeMessageEnd(); 1000 $this->output_->getTransport()->flush(); 1001 } 1002 } catch (\THandlerShortCircuitException $ex) { 1003 switch ($ex->resultType) { 1004 case \THandlerShortCircuitException::R_EXPECTED_EX: 1005 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 1006 $this->eventHandler_->sendError('methodBothThrow', $args, $currentseqid, $ex->result); 1007 throw $ex->result; 1008 case \THandlerShortCircuitException::R_SUCCESS: 1009 default: 1010 $this->eventHandler_->postSend('methodBothThrow', $args, $currentseqid); 1011 return $currentseqid; 1012 } 1013 } catch (\Exception $ex) { 1014 $this->eventHandler_->sendError('methodBothThrow', $args, $currentseqid, $ex); 1015 throw $ex; 1016 } 1017 $this->eventHandler_->postSend('methodBothThrow', $args, $currentseqid); 1018 return $currentseqid; 1019 } 1020 1021 protected function sendImpl_methodBothThrow_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 1022 $protocol = $this->output_; 1023 return function( 1024 ?SinkPayload $sink_payload, ?\Exception $ex 1025 ) use ( 1026 $protocol, 1027 ) { 1028 1029 $transport = $protocol->getTransport(); 1030 invariant( 1031 $transport is \TMemoryBuffer, 1032 "Sink methods require TMemoryBuffer transport" 1033 ); 1034 1035 $is_application_ex = false; 1036 1037 if ($ex !== null) { 1038 if ($ex is SinkException1) { 1039 $result = SinkService_methodBothThrow_SinkPayload::fromShape(shape( 1040 'ex' => $ex, 1041 )); 1042 } else if ($ex is \TApplicationException) { 1043 $is_application_ex = true; 1044 $result = $ex; 1045 } else { 1046 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 1047 } 1048 } else { 1049 $result = SinkService_methodBothThrow_SinkPayload::fromShape(shape( 1050 'success' => $sink_payload, 1051 )); 1052 } 1053 1054 $result->write($protocol); 1055 $protocol->writeMessageEnd(); 1056 $transport->flush(); 1057 $msg = $transport->getBuffer(); 1058 $transport->resetBuffer(); 1059 return tuple($msg, $is_application_ex); 1060 }; 1061 } 1062 1063 protected function recvImpl_methodBothThrow_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 1064 $protocol = $this->input_; 1065 return function( 1066 ?string $sink_final_response, ?\Exception $ex 1067 ) use ( 1068 $protocol, 1069 ) { 1070 try { 1071 if ($ex !== null) { 1072 throw $ex; 1073 } 1074 $transport = $protocol->getTransport(); 1075 invariant( 1076 $transport is \TMemoryBuffer, 1077 "Stream methods require TMemoryBuffer transport" 1078 ); 1079 1080 $transport->resetBuffer(); 1081 $transport->write($sink_final_response as nonnull); 1082 $result = SinkService_methodBothThrow_FinalResponse::withDefaultValues(); 1083 $result->read($protocol); 1084 $protocol->readMessageEnd(); 1085 } catch (\THandlerShortCircuitException $ex) { 1086 throw $ex->result; 1087 } 1088 if ($result->success !== null) { 1089 return $result->success; 1090 } 1091 if ($result->ex !== null) { 1092 throw $result->ex; 1093 } 1094 throw new \TApplicationException("methodBothThrow failed: unknown result", \TApplicationException::MISSING_RESULT); 1095 }; 1096 } 1097 1098 protected function recvImpl_methodBothThrow_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): void { 1099 try { 1100 $this->eventHandler_->preRecv('methodBothThrow', $expectedsequenceid); 1101 if ($this->input_ is \TBinaryProtocolAccelerated) { 1102 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_methodBothThrow_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 1103 } else if ($this->input_ is \TCompactProtocolAccelerated) 1104 { 1105 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_methodBothThrow_FirstResponse', Shapes::idx($options, 'read_options', 0)); 1106 } 1107 else 1108 { 1109 $rseqid = 0; 1110 $fname = ''; 1111 $mtype = 0; 1112 1113 $this->input_->readMessageBegin( 1114 inout $fname, 1115 inout $mtype, 1116 inout $rseqid, 1117 ); 1118 if ($mtype === \TMessageType::EXCEPTION) { 1119 $x = new \TApplicationException(); 1120 $x->read($this->input_); 1121 $this->input_->readMessageEnd(); 1122 throw $x; 1123 } 1124 $result = SinkService_methodBothThrow_FirstResponse::withDefaultValues(); 1125 $result->read($this->input_); 1126 $this->input_->readMessageEnd(); 1127 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 1128 throw new \TProtocolException("methodBothThrow failed: sequence id is out of order"); 1129 } 1130 } 1131 } catch (\THandlerShortCircuitException $ex) { 1132 switch ($ex->resultType) { 1133 case \THandlerShortCircuitException::R_EXPECTED_EX: 1134 $this->eventHandler_->recvException('methodBothThrow', $expectedsequenceid, $ex->result); 1135 throw $ex->result; 1136 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 1137 $this->eventHandler_->recvError('methodBothThrow', $expectedsequenceid, $ex->result); 1138 throw $ex->result; 1139 case \THandlerShortCircuitException::R_SUCCESS: 1140 default: 1141 $this->eventHandler_->postRecv('methodBothThrow', $expectedsequenceid, $ex->result); 1142 return; 1143 } 1144 } catch (\Exception $ex) { 1145 $this->eventHandler_->recvError('methodBothThrow', $expectedsequenceid, $ex); 1146 throw $ex; 1147 } 1148 $this->eventHandler_->postRecv('methodBothThrow', $expectedsequenceid, null); 1149 return; 1150 } 1151 1152 protected function sendImpl_methodFast(): int { 1153 $currentseqid = $this->getNextSequenceID(); 1154 $args = SinkService_methodFast_args::withDefaultValues(); 1155 try { 1156 $this->eventHandler_->preSend('methodFast', $args, $currentseqid); 1157 if ($this->output_ is \TBinaryProtocolAccelerated) 1158 { 1159 \thrift_protocol_write_binary($this->output_, 'methodFast', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); 1160 } 1161 else if ($this->output_ is \TCompactProtocolAccelerated) 1162 { 1163 \thrift_protocol_write_compact($this->output_, 'methodFast', \TMessageType::CALL, $args, $currentseqid, false); 1164 } 1165 else 1166 { 1167 $this->output_->writeMessageBegin('methodFast', \TMessageType::CALL, $currentseqid); 1168 $args->write($this->output_); 1169 $this->output_->writeMessageEnd(); 1170 $this->output_->getTransport()->flush(); 1171 } 1172 } catch (\THandlerShortCircuitException $ex) { 1173 switch ($ex->resultType) { 1174 case \THandlerShortCircuitException::R_EXPECTED_EX: 1175 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 1176 $this->eventHandler_->sendError('methodFast', $args, $currentseqid, $ex->result); 1177 throw $ex->result; 1178 case \THandlerShortCircuitException::R_SUCCESS: 1179 default: 1180 $this->eventHandler_->postSend('methodFast', $args, $currentseqid); 1181 return $currentseqid; 1182 } 1183 } catch (\Exception $ex) { 1184 $this->eventHandler_->sendError('methodFast', $args, $currentseqid, $ex); 1185 throw $ex; 1186 } 1187 $this->eventHandler_->postSend('methodFast', $args, $currentseqid); 1188 return $currentseqid; 1189 } 1190 1191 protected function sendImpl_methodFast_SinkEncode(): (function(?SinkPayload, ?\Exception) : (string, bool)) { 1192 $protocol = $this->output_; 1193 return function( 1194 ?SinkPayload $sink_payload, ?\Exception $ex 1195 ) use ( 1196 $protocol, 1197 ) { 1198 1199 $transport = $protocol->getTransport(); 1200 invariant( 1201 $transport is \TMemoryBuffer, 1202 "Sink methods require TMemoryBuffer transport" 1203 ); 1204 1205 $is_application_ex = false; 1206 1207 if ($ex !== null) { 1208 if ($ex is \TApplicationException) { 1209 $is_application_ex = true; 1210 $result = $ex; 1211 } else { 1212 $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString()); 1213 } 1214 } else { 1215 $result = SinkService_methodFast_SinkPayload::fromShape(shape( 1216 'success' => $sink_payload, 1217 )); 1218 } 1219 1220 $result->write($protocol); 1221 $protocol->writeMessageEnd(); 1222 $transport->flush(); 1223 $msg = $transport->getBuffer(); 1224 $transport->resetBuffer(); 1225 return tuple($msg, $is_application_ex); 1226 }; 1227 } 1228 1229 protected function recvImpl_methodFast_FinalResponse(): (function(?string, ?\Exception) : FinalResponse) { 1230 $protocol = $this->input_; 1231 return function( 1232 ?string $sink_final_response, ?\Exception $ex 1233 ) use ( 1234 $protocol, 1235 ) { 1236 try { 1237 if ($ex !== null) { 1238 throw $ex; 1239 } 1240 $transport = $protocol->getTransport(); 1241 invariant( 1242 $transport is \TMemoryBuffer, 1243 "Stream methods require TMemoryBuffer transport" 1244 ); 1245 1246 $transport->resetBuffer(); 1247 $transport->write($sink_final_response as nonnull); 1248 $result = SinkService_methodFast_FinalResponse::withDefaultValues(); 1249 $result->read($protocol); 1250 $protocol->readMessageEnd(); 1251 } catch (\THandlerShortCircuitException $ex) { 1252 throw $ex->result; 1253 } 1254 if ($result->success !== null) { 1255 return $result->success; 1256 } 1257 throw new \TApplicationException("methodFast failed: unknown result", \TApplicationException::MISSING_RESULT); 1258 }; 1259 } 1260 1261 protected function recvImpl_methodFast_FirstResponse(?int $expectedsequenceid = null, shape(?'read_options' => int) $options = shape()): void { 1262 try { 1263 $this->eventHandler_->preRecv('methodFast', $expectedsequenceid); 1264 if ($this->input_ is \TBinaryProtocolAccelerated) { 1265 $result = \thrift_protocol_read_binary($this->input_, 'SinkService_methodFast_FirstResponse', $this->input_->isStrictRead(), Shapes::idx($options, 'read_options', 0)); 1266 } else if ($this->input_ is \TCompactProtocolAccelerated) 1267 { 1268 $result = \thrift_protocol_read_compact($this->input_, 'SinkService_methodFast_FirstResponse', Shapes::idx($options, 'read_options', 0)); 1269 } 1270 else 1271 { 1272 $rseqid = 0; 1273 $fname = ''; 1274 $mtype = 0; 1275 1276 $this->input_->readMessageBegin( 1277 inout $fname, 1278 inout $mtype, 1279 inout $rseqid, 1280 ); 1281 if ($mtype === \TMessageType::EXCEPTION) { 1282 $x = new \TApplicationException(); 1283 $x->read($this->input_); 1284 $this->input_->readMessageEnd(); 1285 throw $x; 1286 } 1287 $result = SinkService_methodFast_FirstResponse::withDefaultValues(); 1288 $result->read($this->input_); 1289 $this->input_->readMessageEnd(); 1290 if ($expectedsequenceid !== null && ($rseqid !== $expectedsequenceid)) { 1291 throw new \TProtocolException("methodFast failed: sequence id is out of order"); 1292 } 1293 } 1294 } catch (\THandlerShortCircuitException $ex) { 1295 switch ($ex->resultType) { 1296 case \THandlerShortCircuitException::R_EXPECTED_EX: 1297 $this->eventHandler_->recvException('methodFast', $expectedsequenceid, $ex->result); 1298 throw $ex->result; 1299 case \THandlerShortCircuitException::R_UNEXPECTED_EX: 1300 $this->eventHandler_->recvError('methodFast', $expectedsequenceid, $ex->result); 1301 throw $ex->result; 1302 case \THandlerShortCircuitException::R_SUCCESS: 1303 default: 1304 $this->eventHandler_->postRecv('methodFast', $expectedsequenceid, $ex->result); 1305 return; 1306 } 1307 } catch (\Exception $ex) { 1308 $this->eventHandler_->recvError('methodFast', $expectedsequenceid, $ex); 1309 throw $ex; 1310 } 1311 $this->eventHandler_->postRecv('methodFast', $expectedsequenceid, null); 1312 return; 1313 } 1314 1315} 1316 1317class SinkServiceAsyncClient extends \ThriftClientBase implements SinkServiceAsyncClientIf { 1318 use SinkServiceClientBase; 1319 1320 /** 1321 * Original thrift definition:- 1322 * void, sink<SinkPayload, FinalResponse> 1323 * method(); 1324 */ 1325 public async function method(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1326 $hh_frame_metadata = $this->getHHFrameMetadata(); 1327 if ($hh_frame_metadata !== null) { 1328 \HH\set_frame_metadata($hh_frame_metadata); 1329 } 1330 $channel = $this->channel_; 1331 $out_transport = $this->output_->getTransport(); 1332 $in_transport = $this->input_->getTransport(); 1333 invariant( 1334 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1335 "Sink methods require nonnull channel and TMemoryBuffer transport" 1336 ); 1337 1338 await $this->asyncHandler_->genBefore("SinkService", "method"); 1339 $currentseqid = $this->sendImpl_method(); 1340 $msg = $out_transport->getBuffer(); 1341 $out_transport->resetBuffer(); 1342 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1343 1344 $payload_serializer = $this->sendImpl_method_SinkEncode(); 1345 $final_response_deserializer = $this->recvImpl_method_FinalResponse(); 1346 $client_sink_func = async function( 1347 AsyncGenerator<null, SinkPayload, void> $pld_generator 1348 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1349 return await $sink->genSink<SinkPayload, FinalResponse>( 1350 $pld_generator, 1351 $payload_serializer, 1352 $final_response_deserializer, 1353 ); 1354 }; 1355 1356 $in_transport->resetBuffer(); 1357 $in_transport->write($result_msg); 1358 $this->recvImpl_method_FirstResponse($currentseqid); 1359 1360 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1361 } 1362 1363 /** 1364 * Original thrift definition:- 1365 * InitialResponse, sink<SinkPayload, FinalResponse> 1366 * methodAndReponse(); 1367 */ 1368 public async function methodAndReponse(): Awaitable<\ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>> { 1369 $hh_frame_metadata = $this->getHHFrameMetadata(); 1370 if ($hh_frame_metadata !== null) { 1371 \HH\set_frame_metadata($hh_frame_metadata); 1372 } 1373 $channel = $this->channel_; 1374 $out_transport = $this->output_->getTransport(); 1375 $in_transport = $this->input_->getTransport(); 1376 invariant( 1377 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1378 "Sink methods require nonnull channel and TMemoryBuffer transport" 1379 ); 1380 1381 await $this->asyncHandler_->genBefore("SinkService", "methodAndReponse"); 1382 $currentseqid = $this->sendImpl_methodAndReponse(); 1383 $msg = $out_transport->getBuffer(); 1384 $out_transport->resetBuffer(); 1385 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1386 1387 $payload_serializer = $this->sendImpl_methodAndReponse_SinkEncode(); 1388 $final_response_deserializer = $this->recvImpl_methodAndReponse_FinalResponse(); 1389 $client_sink_func = async function( 1390 AsyncGenerator<null, SinkPayload, void> $pld_generator 1391 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1392 return await $sink->genSink<SinkPayload, FinalResponse>( 1393 $pld_generator, 1394 $payload_serializer, 1395 $final_response_deserializer, 1396 ); 1397 }; 1398 1399 $in_transport->resetBuffer(); 1400 $in_transport->write($result_msg); 1401 $first_response = $this->recvImpl_methodAndReponse_FirstResponse($currentseqid); 1402 1403 return new \ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>($first_response, $client_sink_func); 1404 } 1405 1406 /** 1407 * Original thrift definition:- 1408 * void, sink<SinkPayload, FinalResponse> 1409 * methodThrow() 1410 * throws (1: InitialException ex); 1411 */ 1412 public async function methodThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1413 $hh_frame_metadata = $this->getHHFrameMetadata(); 1414 if ($hh_frame_metadata !== null) { 1415 \HH\set_frame_metadata($hh_frame_metadata); 1416 } 1417 $channel = $this->channel_; 1418 $out_transport = $this->output_->getTransport(); 1419 $in_transport = $this->input_->getTransport(); 1420 invariant( 1421 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1422 "Sink methods require nonnull channel and TMemoryBuffer transport" 1423 ); 1424 1425 await $this->asyncHandler_->genBefore("SinkService", "methodThrow"); 1426 $currentseqid = $this->sendImpl_methodThrow(); 1427 $msg = $out_transport->getBuffer(); 1428 $out_transport->resetBuffer(); 1429 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1430 1431 $payload_serializer = $this->sendImpl_methodThrow_SinkEncode(); 1432 $final_response_deserializer = $this->recvImpl_methodThrow_FinalResponse(); 1433 $client_sink_func = async function( 1434 AsyncGenerator<null, SinkPayload, void> $pld_generator 1435 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1436 return await $sink->genSink<SinkPayload, FinalResponse>( 1437 $pld_generator, 1438 $payload_serializer, 1439 $final_response_deserializer, 1440 ); 1441 }; 1442 1443 $in_transport->resetBuffer(); 1444 $in_transport->write($result_msg); 1445 $this->recvImpl_methodThrow_FirstResponse($currentseqid); 1446 1447 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1448 } 1449 1450 /** 1451 * Original thrift definition:- 1452 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse> 1453 * methodSinkThrow(); 1454 */ 1455 public async function methodSinkThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1456 $hh_frame_metadata = $this->getHHFrameMetadata(); 1457 if ($hh_frame_metadata !== null) { 1458 \HH\set_frame_metadata($hh_frame_metadata); 1459 } 1460 $channel = $this->channel_; 1461 $out_transport = $this->output_->getTransport(); 1462 $in_transport = $this->input_->getTransport(); 1463 invariant( 1464 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1465 "Sink methods require nonnull channel and TMemoryBuffer transport" 1466 ); 1467 1468 await $this->asyncHandler_->genBefore("SinkService", "methodSinkThrow"); 1469 $currentseqid = $this->sendImpl_methodSinkThrow(); 1470 $msg = $out_transport->getBuffer(); 1471 $out_transport->resetBuffer(); 1472 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1473 1474 $payload_serializer = $this->sendImpl_methodSinkThrow_SinkEncode(); 1475 $final_response_deserializer = $this->recvImpl_methodSinkThrow_FinalResponse(); 1476 $client_sink_func = async function( 1477 AsyncGenerator<null, SinkPayload, void> $pld_generator 1478 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1479 return await $sink->genSink<SinkPayload, FinalResponse>( 1480 $pld_generator, 1481 $payload_serializer, 1482 $final_response_deserializer, 1483 ); 1484 }; 1485 1486 $in_transport->resetBuffer(); 1487 $in_transport->write($result_msg); 1488 $this->recvImpl_methodSinkThrow_FirstResponse($currentseqid); 1489 1490 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1491 } 1492 1493 /** 1494 * Original thrift definition:- 1495 * void, sink<SinkPayload, FinalResponse, throws (1: SinkException2 ex)> 1496 * methodFinalThrow(); 1497 */ 1498 public async function methodFinalThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1499 $hh_frame_metadata = $this->getHHFrameMetadata(); 1500 if ($hh_frame_metadata !== null) { 1501 \HH\set_frame_metadata($hh_frame_metadata); 1502 } 1503 $channel = $this->channel_; 1504 $out_transport = $this->output_->getTransport(); 1505 $in_transport = $this->input_->getTransport(); 1506 invariant( 1507 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1508 "Sink methods require nonnull channel and TMemoryBuffer transport" 1509 ); 1510 1511 await $this->asyncHandler_->genBefore("SinkService", "methodFinalThrow"); 1512 $currentseqid = $this->sendImpl_methodFinalThrow(); 1513 $msg = $out_transport->getBuffer(); 1514 $out_transport->resetBuffer(); 1515 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1516 1517 $payload_serializer = $this->sendImpl_methodFinalThrow_SinkEncode(); 1518 $final_response_deserializer = $this->recvImpl_methodFinalThrow_FinalResponse(); 1519 $client_sink_func = async function( 1520 AsyncGenerator<null, SinkPayload, void> $pld_generator 1521 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1522 return await $sink->genSink<SinkPayload, FinalResponse>( 1523 $pld_generator, 1524 $payload_serializer, 1525 $final_response_deserializer, 1526 ); 1527 }; 1528 1529 $in_transport->resetBuffer(); 1530 $in_transport->write($result_msg); 1531 $this->recvImpl_methodFinalThrow_FirstResponse($currentseqid); 1532 1533 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1534 } 1535 1536 /** 1537 * Original thrift definition:- 1538 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse, throws (1: SinkException2 ex)> 1539 * methodBothThrow(); 1540 */ 1541 public async function methodBothThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1542 $hh_frame_metadata = $this->getHHFrameMetadata(); 1543 if ($hh_frame_metadata !== null) { 1544 \HH\set_frame_metadata($hh_frame_metadata); 1545 } 1546 $channel = $this->channel_; 1547 $out_transport = $this->output_->getTransport(); 1548 $in_transport = $this->input_->getTransport(); 1549 invariant( 1550 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1551 "Sink methods require nonnull channel and TMemoryBuffer transport" 1552 ); 1553 1554 await $this->asyncHandler_->genBefore("SinkService", "methodBothThrow"); 1555 $currentseqid = $this->sendImpl_methodBothThrow(); 1556 $msg = $out_transport->getBuffer(); 1557 $out_transport->resetBuffer(); 1558 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1559 1560 $payload_serializer = $this->sendImpl_methodBothThrow_SinkEncode(); 1561 $final_response_deserializer = $this->recvImpl_methodBothThrow_FinalResponse(); 1562 $client_sink_func = async function( 1563 AsyncGenerator<null, SinkPayload, void> $pld_generator 1564 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1565 return await $sink->genSink<SinkPayload, FinalResponse>( 1566 $pld_generator, 1567 $payload_serializer, 1568 $final_response_deserializer, 1569 ); 1570 }; 1571 1572 $in_transport->resetBuffer(); 1573 $in_transport->write($result_msg); 1574 $this->recvImpl_methodBothThrow_FirstResponse($currentseqid); 1575 1576 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1577 } 1578 1579 /** 1580 * Original thrift definition:- 1581 * void, sink<SinkPayload, FinalResponse> 1582 * methodFast(); 1583 */ 1584 public async function methodFast(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1585 $hh_frame_metadata = $this->getHHFrameMetadata(); 1586 if ($hh_frame_metadata !== null) { 1587 \HH\set_frame_metadata($hh_frame_metadata); 1588 } 1589 $channel = $this->channel_; 1590 $out_transport = $this->output_->getTransport(); 1591 $in_transport = $this->input_->getTransport(); 1592 invariant( 1593 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1594 "Sink methods require nonnull channel and TMemoryBuffer transport" 1595 ); 1596 1597 await $this->asyncHandler_->genBefore("SinkService", "methodFast"); 1598 $currentseqid = $this->sendImpl_methodFast(); 1599 $msg = $out_transport->getBuffer(); 1600 $out_transport->resetBuffer(); 1601 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1602 1603 $payload_serializer = $this->sendImpl_methodFast_SinkEncode(); 1604 $final_response_deserializer = $this->recvImpl_methodFast_FinalResponse(); 1605 $client_sink_func = async function( 1606 AsyncGenerator<null, SinkPayload, void> $pld_generator 1607 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1608 return await $sink->genSink<SinkPayload, FinalResponse>( 1609 $pld_generator, 1610 $payload_serializer, 1611 $final_response_deserializer, 1612 ); 1613 }; 1614 1615 $in_transport->resetBuffer(); 1616 $in_transport->write($result_msg); 1617 $this->recvImpl_methodFast_FirstResponse($currentseqid); 1618 1619 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1620 } 1621 1622} 1623 1624class SinkServiceClient extends \ThriftClientBase implements SinkServiceClientIf { 1625 use SinkServiceClientBase; 1626 1627 /** 1628 * Original thrift definition:- 1629 * void, sink<SinkPayload, FinalResponse> 1630 * method(); 1631 */ 1632 public async function method(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1633 $hh_frame_metadata = $this->getHHFrameMetadata(); 1634 if ($hh_frame_metadata !== null) { 1635 \HH\set_frame_metadata($hh_frame_metadata); 1636 } 1637 $channel = $this->channel_; 1638 $out_transport = $this->output_->getTransport(); 1639 $in_transport = $this->input_->getTransport(); 1640 invariant( 1641 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1642 "Sink methods require nonnull channel and TMemoryBuffer transport" 1643 ); 1644 1645 await $this->asyncHandler_->genBefore("SinkService", "method"); 1646 $currentseqid = $this->sendImpl_method(); 1647 $msg = $out_transport->getBuffer(); 1648 $out_transport->resetBuffer(); 1649 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1650 1651 $payload_serializer = $this->sendImpl_method_SinkEncode(); 1652 $final_response_deserializer = $this->recvImpl_method_FinalResponse(); 1653 $client_sink_func = async function( 1654 AsyncGenerator<null, SinkPayload, void> $pld_generator 1655 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1656 return await $sink->genSink<SinkPayload, FinalResponse>( 1657 $pld_generator, 1658 $payload_serializer, 1659 $final_response_deserializer, 1660 ); 1661 }; 1662 1663 $in_transport->resetBuffer(); 1664 $in_transport->write($result_msg); 1665 $this->recvImpl_method_FirstResponse($currentseqid); 1666 1667 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1668 } 1669 1670 /** 1671 * Original thrift definition:- 1672 * InitialResponse, sink<SinkPayload, FinalResponse> 1673 * methodAndReponse(); 1674 */ 1675 public async function methodAndReponse(): Awaitable<\ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>> { 1676 $hh_frame_metadata = $this->getHHFrameMetadata(); 1677 if ($hh_frame_metadata !== null) { 1678 \HH\set_frame_metadata($hh_frame_metadata); 1679 } 1680 $channel = $this->channel_; 1681 $out_transport = $this->output_->getTransport(); 1682 $in_transport = $this->input_->getTransport(); 1683 invariant( 1684 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1685 "Sink methods require nonnull channel and TMemoryBuffer transport" 1686 ); 1687 1688 await $this->asyncHandler_->genBefore("SinkService", "methodAndReponse"); 1689 $currentseqid = $this->sendImpl_methodAndReponse(); 1690 $msg = $out_transport->getBuffer(); 1691 $out_transport->resetBuffer(); 1692 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1693 1694 $payload_serializer = $this->sendImpl_methodAndReponse_SinkEncode(); 1695 $final_response_deserializer = $this->recvImpl_methodAndReponse_FinalResponse(); 1696 $client_sink_func = async function( 1697 AsyncGenerator<null, SinkPayload, void> $pld_generator 1698 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1699 return await $sink->genSink<SinkPayload, FinalResponse>( 1700 $pld_generator, 1701 $payload_serializer, 1702 $final_response_deserializer, 1703 ); 1704 }; 1705 1706 $in_transport->resetBuffer(); 1707 $in_transport->write($result_msg); 1708 $first_response = $this->recvImpl_methodAndReponse_FirstResponse($currentseqid); 1709 1710 return new \ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>($first_response, $client_sink_func); 1711 } 1712 1713 /** 1714 * Original thrift definition:- 1715 * void, sink<SinkPayload, FinalResponse> 1716 * methodThrow() 1717 * throws (1: InitialException ex); 1718 */ 1719 public async function methodThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1720 $hh_frame_metadata = $this->getHHFrameMetadata(); 1721 if ($hh_frame_metadata !== null) { 1722 \HH\set_frame_metadata($hh_frame_metadata); 1723 } 1724 $channel = $this->channel_; 1725 $out_transport = $this->output_->getTransport(); 1726 $in_transport = $this->input_->getTransport(); 1727 invariant( 1728 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1729 "Sink methods require nonnull channel and TMemoryBuffer transport" 1730 ); 1731 1732 await $this->asyncHandler_->genBefore("SinkService", "methodThrow"); 1733 $currentseqid = $this->sendImpl_methodThrow(); 1734 $msg = $out_transport->getBuffer(); 1735 $out_transport->resetBuffer(); 1736 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1737 1738 $payload_serializer = $this->sendImpl_methodThrow_SinkEncode(); 1739 $final_response_deserializer = $this->recvImpl_methodThrow_FinalResponse(); 1740 $client_sink_func = async function( 1741 AsyncGenerator<null, SinkPayload, void> $pld_generator 1742 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1743 return await $sink->genSink<SinkPayload, FinalResponse>( 1744 $pld_generator, 1745 $payload_serializer, 1746 $final_response_deserializer, 1747 ); 1748 }; 1749 1750 $in_transport->resetBuffer(); 1751 $in_transport->write($result_msg); 1752 $this->recvImpl_methodThrow_FirstResponse($currentseqid); 1753 1754 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1755 } 1756 1757 /** 1758 * Original thrift definition:- 1759 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse> 1760 * methodSinkThrow(); 1761 */ 1762 public async function methodSinkThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1763 $hh_frame_metadata = $this->getHHFrameMetadata(); 1764 if ($hh_frame_metadata !== null) { 1765 \HH\set_frame_metadata($hh_frame_metadata); 1766 } 1767 $channel = $this->channel_; 1768 $out_transport = $this->output_->getTransport(); 1769 $in_transport = $this->input_->getTransport(); 1770 invariant( 1771 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1772 "Sink methods require nonnull channel and TMemoryBuffer transport" 1773 ); 1774 1775 await $this->asyncHandler_->genBefore("SinkService", "methodSinkThrow"); 1776 $currentseqid = $this->sendImpl_methodSinkThrow(); 1777 $msg = $out_transport->getBuffer(); 1778 $out_transport->resetBuffer(); 1779 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1780 1781 $payload_serializer = $this->sendImpl_methodSinkThrow_SinkEncode(); 1782 $final_response_deserializer = $this->recvImpl_methodSinkThrow_FinalResponse(); 1783 $client_sink_func = async function( 1784 AsyncGenerator<null, SinkPayload, void> $pld_generator 1785 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1786 return await $sink->genSink<SinkPayload, FinalResponse>( 1787 $pld_generator, 1788 $payload_serializer, 1789 $final_response_deserializer, 1790 ); 1791 }; 1792 1793 $in_transport->resetBuffer(); 1794 $in_transport->write($result_msg); 1795 $this->recvImpl_methodSinkThrow_FirstResponse($currentseqid); 1796 1797 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1798 } 1799 1800 /** 1801 * Original thrift definition:- 1802 * void, sink<SinkPayload, FinalResponse, throws (1: SinkException2 ex)> 1803 * methodFinalThrow(); 1804 */ 1805 public async function methodFinalThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1806 $hh_frame_metadata = $this->getHHFrameMetadata(); 1807 if ($hh_frame_metadata !== null) { 1808 \HH\set_frame_metadata($hh_frame_metadata); 1809 } 1810 $channel = $this->channel_; 1811 $out_transport = $this->output_->getTransport(); 1812 $in_transport = $this->input_->getTransport(); 1813 invariant( 1814 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1815 "Sink methods require nonnull channel and TMemoryBuffer transport" 1816 ); 1817 1818 await $this->asyncHandler_->genBefore("SinkService", "methodFinalThrow"); 1819 $currentseqid = $this->sendImpl_methodFinalThrow(); 1820 $msg = $out_transport->getBuffer(); 1821 $out_transport->resetBuffer(); 1822 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1823 1824 $payload_serializer = $this->sendImpl_methodFinalThrow_SinkEncode(); 1825 $final_response_deserializer = $this->recvImpl_methodFinalThrow_FinalResponse(); 1826 $client_sink_func = async function( 1827 AsyncGenerator<null, SinkPayload, void> $pld_generator 1828 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1829 return await $sink->genSink<SinkPayload, FinalResponse>( 1830 $pld_generator, 1831 $payload_serializer, 1832 $final_response_deserializer, 1833 ); 1834 }; 1835 1836 $in_transport->resetBuffer(); 1837 $in_transport->write($result_msg); 1838 $this->recvImpl_methodFinalThrow_FirstResponse($currentseqid); 1839 1840 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1841 } 1842 1843 /** 1844 * Original thrift definition:- 1845 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse, throws (1: SinkException2 ex)> 1846 * methodBothThrow(); 1847 */ 1848 public async function methodBothThrow(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1849 $hh_frame_metadata = $this->getHHFrameMetadata(); 1850 if ($hh_frame_metadata !== null) { 1851 \HH\set_frame_metadata($hh_frame_metadata); 1852 } 1853 $channel = $this->channel_; 1854 $out_transport = $this->output_->getTransport(); 1855 $in_transport = $this->input_->getTransport(); 1856 invariant( 1857 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1858 "Sink methods require nonnull channel and TMemoryBuffer transport" 1859 ); 1860 1861 await $this->asyncHandler_->genBefore("SinkService", "methodBothThrow"); 1862 $currentseqid = $this->sendImpl_methodBothThrow(); 1863 $msg = $out_transport->getBuffer(); 1864 $out_transport->resetBuffer(); 1865 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1866 1867 $payload_serializer = $this->sendImpl_methodBothThrow_SinkEncode(); 1868 $final_response_deserializer = $this->recvImpl_methodBothThrow_FinalResponse(); 1869 $client_sink_func = async function( 1870 AsyncGenerator<null, SinkPayload, void> $pld_generator 1871 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1872 return await $sink->genSink<SinkPayload, FinalResponse>( 1873 $pld_generator, 1874 $payload_serializer, 1875 $final_response_deserializer, 1876 ); 1877 }; 1878 1879 $in_transport->resetBuffer(); 1880 $in_transport->write($result_msg); 1881 $this->recvImpl_methodBothThrow_FirstResponse($currentseqid); 1882 1883 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1884 } 1885 1886 /** 1887 * Original thrift definition:- 1888 * void, sink<SinkPayload, FinalResponse> 1889 * methodFast(); 1890 */ 1891 public async function methodFast(): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1892 $hh_frame_metadata = $this->getHHFrameMetadata(); 1893 if ($hh_frame_metadata !== null) { 1894 \HH\set_frame_metadata($hh_frame_metadata); 1895 } 1896 $channel = $this->channel_; 1897 $out_transport = $this->output_->getTransport(); 1898 $in_transport = $this->input_->getTransport(); 1899 invariant( 1900 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1901 "Sink methods require nonnull channel and TMemoryBuffer transport" 1902 ); 1903 1904 await $this->asyncHandler_->genBefore("SinkService", "methodFast"); 1905 $currentseqid = $this->sendImpl_methodFast(); 1906 $msg = $out_transport->getBuffer(); 1907 $out_transport->resetBuffer(); 1908 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink(new \RpcOptions(), $msg); 1909 1910 $payload_serializer = $this->sendImpl_methodFast_SinkEncode(); 1911 $final_response_deserializer = $this->recvImpl_methodFast_FinalResponse(); 1912 $client_sink_func = async function( 1913 AsyncGenerator<null, SinkPayload, void> $pld_generator 1914 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1915 return await $sink->genSink<SinkPayload, FinalResponse>( 1916 $pld_generator, 1917 $payload_serializer, 1918 $final_response_deserializer, 1919 ); 1920 }; 1921 1922 $in_transport->resetBuffer(); 1923 $in_transport->write($result_msg); 1924 $this->recvImpl_methodFast_FirstResponse($currentseqid); 1925 1926 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1927 } 1928 1929 /* send and recv functions */ 1930} 1931 1932class SinkServiceAsyncRpcOptionsClient extends \ThriftClientBase implements SinkServiceAsyncRpcOptionsIf { 1933 use SinkServiceClientBase; 1934 1935 /** 1936 * Original thrift definition:- 1937 * void, sink<SinkPayload, FinalResponse> 1938 * method(); 1939 */ 1940 public async function method(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 1941 $hh_frame_metadata = $this->getHHFrameMetadata(); 1942 if ($hh_frame_metadata !== null) { 1943 \HH\set_frame_metadata($hh_frame_metadata); 1944 } 1945 $channel = $this->channel_; 1946 $out_transport = $this->output_->getTransport(); 1947 $in_transport = $this->input_->getTransport(); 1948 invariant( 1949 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1950 "Sink methods require nonnull channel and TMemoryBuffer transport" 1951 ); 1952 1953 await $this->asyncHandler_->genBefore("SinkService", "method"); 1954 $currentseqid = $this->sendImpl_method(); 1955 $msg = $out_transport->getBuffer(); 1956 $out_transport->resetBuffer(); 1957 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 1958 1959 $payload_serializer = $this->sendImpl_method_SinkEncode(); 1960 $final_response_deserializer = $this->recvImpl_method_FinalResponse(); 1961 $client_sink_func = async function( 1962 AsyncGenerator<null, SinkPayload, void> $pld_generator 1963 ) use ($sink, $payload_serializer, $final_response_deserializer) { 1964 return await $sink->genSink<SinkPayload, FinalResponse>( 1965 $pld_generator, 1966 $payload_serializer, 1967 $final_response_deserializer, 1968 ); 1969 }; 1970 1971 $in_transport->resetBuffer(); 1972 $in_transport->write($result_msg); 1973 $this->recvImpl_method_FirstResponse($currentseqid); 1974 1975 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 1976 } 1977 1978 /** 1979 * Original thrift definition:- 1980 * InitialResponse, sink<SinkPayload, FinalResponse> 1981 * methodAndReponse(); 1982 */ 1983 public async function methodAndReponse(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>> { 1984 $hh_frame_metadata = $this->getHHFrameMetadata(); 1985 if ($hh_frame_metadata !== null) { 1986 \HH\set_frame_metadata($hh_frame_metadata); 1987 } 1988 $channel = $this->channel_; 1989 $out_transport = $this->output_->getTransport(); 1990 $in_transport = $this->input_->getTransport(); 1991 invariant( 1992 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 1993 "Sink methods require nonnull channel and TMemoryBuffer transport" 1994 ); 1995 1996 await $this->asyncHandler_->genBefore("SinkService", "methodAndReponse"); 1997 $currentseqid = $this->sendImpl_methodAndReponse(); 1998 $msg = $out_transport->getBuffer(); 1999 $out_transport->resetBuffer(); 2000 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 2001 2002 $payload_serializer = $this->sendImpl_methodAndReponse_SinkEncode(); 2003 $final_response_deserializer = $this->recvImpl_methodAndReponse_FinalResponse(); 2004 $client_sink_func = async function( 2005 AsyncGenerator<null, SinkPayload, void> $pld_generator 2006 ) use ($sink, $payload_serializer, $final_response_deserializer) { 2007 return await $sink->genSink<SinkPayload, FinalResponse>( 2008 $pld_generator, 2009 $payload_serializer, 2010 $final_response_deserializer, 2011 ); 2012 }; 2013 2014 $in_transport->resetBuffer(); 2015 $in_transport->write($result_msg); 2016 $first_response = $this->recvImpl_methodAndReponse_FirstResponse($currentseqid); 2017 2018 return new \ResponseAndClientSink<InitialResponse, SinkPayload, FinalResponse>($first_response, $client_sink_func); 2019 } 2020 2021 /** 2022 * Original thrift definition:- 2023 * void, sink<SinkPayload, FinalResponse> 2024 * methodThrow() 2025 * throws (1: InitialException ex); 2026 */ 2027 public async function methodThrow(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 2028 $hh_frame_metadata = $this->getHHFrameMetadata(); 2029 if ($hh_frame_metadata !== null) { 2030 \HH\set_frame_metadata($hh_frame_metadata); 2031 } 2032 $channel = $this->channel_; 2033 $out_transport = $this->output_->getTransport(); 2034 $in_transport = $this->input_->getTransport(); 2035 invariant( 2036 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 2037 "Sink methods require nonnull channel and TMemoryBuffer transport" 2038 ); 2039 2040 await $this->asyncHandler_->genBefore("SinkService", "methodThrow"); 2041 $currentseqid = $this->sendImpl_methodThrow(); 2042 $msg = $out_transport->getBuffer(); 2043 $out_transport->resetBuffer(); 2044 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 2045 2046 $payload_serializer = $this->sendImpl_methodThrow_SinkEncode(); 2047 $final_response_deserializer = $this->recvImpl_methodThrow_FinalResponse(); 2048 $client_sink_func = async function( 2049 AsyncGenerator<null, SinkPayload, void> $pld_generator 2050 ) use ($sink, $payload_serializer, $final_response_deserializer) { 2051 return await $sink->genSink<SinkPayload, FinalResponse>( 2052 $pld_generator, 2053 $payload_serializer, 2054 $final_response_deserializer, 2055 ); 2056 }; 2057 2058 $in_transport->resetBuffer(); 2059 $in_transport->write($result_msg); 2060 $this->recvImpl_methodThrow_FirstResponse($currentseqid); 2061 2062 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 2063 } 2064 2065 /** 2066 * Original thrift definition:- 2067 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse> 2068 * methodSinkThrow(); 2069 */ 2070 public async function methodSinkThrow(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 2071 $hh_frame_metadata = $this->getHHFrameMetadata(); 2072 if ($hh_frame_metadata !== null) { 2073 \HH\set_frame_metadata($hh_frame_metadata); 2074 } 2075 $channel = $this->channel_; 2076 $out_transport = $this->output_->getTransport(); 2077 $in_transport = $this->input_->getTransport(); 2078 invariant( 2079 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 2080 "Sink methods require nonnull channel and TMemoryBuffer transport" 2081 ); 2082 2083 await $this->asyncHandler_->genBefore("SinkService", "methodSinkThrow"); 2084 $currentseqid = $this->sendImpl_methodSinkThrow(); 2085 $msg = $out_transport->getBuffer(); 2086 $out_transport->resetBuffer(); 2087 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 2088 2089 $payload_serializer = $this->sendImpl_methodSinkThrow_SinkEncode(); 2090 $final_response_deserializer = $this->recvImpl_methodSinkThrow_FinalResponse(); 2091 $client_sink_func = async function( 2092 AsyncGenerator<null, SinkPayload, void> $pld_generator 2093 ) use ($sink, $payload_serializer, $final_response_deserializer) { 2094 return await $sink->genSink<SinkPayload, FinalResponse>( 2095 $pld_generator, 2096 $payload_serializer, 2097 $final_response_deserializer, 2098 ); 2099 }; 2100 2101 $in_transport->resetBuffer(); 2102 $in_transport->write($result_msg); 2103 $this->recvImpl_methodSinkThrow_FirstResponse($currentseqid); 2104 2105 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 2106 } 2107 2108 /** 2109 * Original thrift definition:- 2110 * void, sink<SinkPayload, FinalResponse, throws (1: SinkException2 ex)> 2111 * methodFinalThrow(); 2112 */ 2113 public async function methodFinalThrow(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 2114 $hh_frame_metadata = $this->getHHFrameMetadata(); 2115 if ($hh_frame_metadata !== null) { 2116 \HH\set_frame_metadata($hh_frame_metadata); 2117 } 2118 $channel = $this->channel_; 2119 $out_transport = $this->output_->getTransport(); 2120 $in_transport = $this->input_->getTransport(); 2121 invariant( 2122 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 2123 "Sink methods require nonnull channel and TMemoryBuffer transport" 2124 ); 2125 2126 await $this->asyncHandler_->genBefore("SinkService", "methodFinalThrow"); 2127 $currentseqid = $this->sendImpl_methodFinalThrow(); 2128 $msg = $out_transport->getBuffer(); 2129 $out_transport->resetBuffer(); 2130 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 2131 2132 $payload_serializer = $this->sendImpl_methodFinalThrow_SinkEncode(); 2133 $final_response_deserializer = $this->recvImpl_methodFinalThrow_FinalResponse(); 2134 $client_sink_func = async function( 2135 AsyncGenerator<null, SinkPayload, void> $pld_generator 2136 ) use ($sink, $payload_serializer, $final_response_deserializer) { 2137 return await $sink->genSink<SinkPayload, FinalResponse>( 2138 $pld_generator, 2139 $payload_serializer, 2140 $final_response_deserializer, 2141 ); 2142 }; 2143 2144 $in_transport->resetBuffer(); 2145 $in_transport->write($result_msg); 2146 $this->recvImpl_methodFinalThrow_FirstResponse($currentseqid); 2147 2148 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 2149 } 2150 2151 /** 2152 * Original thrift definition:- 2153 * void, sink<SinkPayload, throws (1: SinkException1 ex), FinalResponse, throws (1: SinkException2 ex)> 2154 * methodBothThrow(); 2155 */ 2156 public async function methodBothThrow(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 2157 $hh_frame_metadata = $this->getHHFrameMetadata(); 2158 if ($hh_frame_metadata !== null) { 2159 \HH\set_frame_metadata($hh_frame_metadata); 2160 } 2161 $channel = $this->channel_; 2162 $out_transport = $this->output_->getTransport(); 2163 $in_transport = $this->input_->getTransport(); 2164 invariant( 2165 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 2166 "Sink methods require nonnull channel and TMemoryBuffer transport" 2167 ); 2168 2169 await $this->asyncHandler_->genBefore("SinkService", "methodBothThrow"); 2170 $currentseqid = $this->sendImpl_methodBothThrow(); 2171 $msg = $out_transport->getBuffer(); 2172 $out_transport->resetBuffer(); 2173 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 2174 2175 $payload_serializer = $this->sendImpl_methodBothThrow_SinkEncode(); 2176 $final_response_deserializer = $this->recvImpl_methodBothThrow_FinalResponse(); 2177 $client_sink_func = async function( 2178 AsyncGenerator<null, SinkPayload, void> $pld_generator 2179 ) use ($sink, $payload_serializer, $final_response_deserializer) { 2180 return await $sink->genSink<SinkPayload, FinalResponse>( 2181 $pld_generator, 2182 $payload_serializer, 2183 $final_response_deserializer, 2184 ); 2185 }; 2186 2187 $in_transport->resetBuffer(); 2188 $in_transport->write($result_msg); 2189 $this->recvImpl_methodBothThrow_FirstResponse($currentseqid); 2190 2191 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 2192 } 2193 2194 /** 2195 * Original thrift definition:- 2196 * void, sink<SinkPayload, FinalResponse> 2197 * methodFast(); 2198 */ 2199 public async function methodFast(\RpcOptions $rpc_options): Awaitable<\ResponseAndClientSink<void, SinkPayload, FinalResponse>> { 2200 $hh_frame_metadata = $this->getHHFrameMetadata(); 2201 if ($hh_frame_metadata !== null) { 2202 \HH\set_frame_metadata($hh_frame_metadata); 2203 } 2204 $channel = $this->channel_; 2205 $out_transport = $this->output_->getTransport(); 2206 $in_transport = $this->input_->getTransport(); 2207 invariant( 2208 $channel !== null && $out_transport is \TMemoryBuffer && $in_transport is \TMemoryBuffer, 2209 "Sink methods require nonnull channel and TMemoryBuffer transport" 2210 ); 2211 2212 await $this->asyncHandler_->genBefore("SinkService", "methodFast"); 2213 $currentseqid = $this->sendImpl_methodFast(); 2214 $msg = $out_transport->getBuffer(); 2215 $out_transport->resetBuffer(); 2216 list($result_msg, $_read_headers, $sink) = await $channel->genSendRequestSink($rpc_options, $msg); 2217 2218 $payload_serializer = $this->sendImpl_methodFast_SinkEncode(); 2219 $final_response_deserializer = $this->recvImpl_methodFast_FinalResponse(); 2220 $client_sink_func = async function( 2221 AsyncGenerator<null, SinkPayload, void> $pld_generator 2222 ) use ($sink, $payload_serializer, $final_response_deserializer) { 2223 return await $sink->genSink<SinkPayload, FinalResponse>( 2224 $pld_generator, 2225 $payload_serializer, 2226 $final_response_deserializer, 2227 ); 2228 }; 2229 2230 $in_transport->resetBuffer(); 2231 $in_transport->write($result_msg); 2232 $this->recvImpl_methodFast_FirstResponse($currentseqid); 2233 2234 return new \ResponseAndClientSink<void, SinkPayload, FinalResponse>(null, $client_sink_func); 2235 } 2236 2237} 2238 2239// HELPER FUNCTIONS AND STRUCTURES 2240 2241class SinkService_method_args implements \IThriftStruct { 2242 use \ThriftSerializationTrait; 2243 2244 const dict<int, this::TFieldSpec> SPEC = dict[ 2245 ]; 2246 const dict<string, int> FIELDMAP = dict[ 2247 ]; 2248 2249 const type TConstructorShape = shape( 2250 ); 2251 2252 const int STRUCTURAL_ID = 957977401221134810; 2253 2254 public function __construct( )[] { 2255 } 2256 2257 public static function withDefaultValues()[]: this { 2258 return new static(); 2259 } 2260 2261 public static function fromShape(self::TConstructorShape $shape)[]: this { 2262 return new static( 2263 ); 2264 } 2265 2266 public function getName()[]: string { 2267 return 'SinkService_method_args'; 2268 } 2269 2270 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2271 return tmeta_ThriftStruct::fromShape( 2272 shape( 2273 "name" => "module.method_args", 2274 "is_union" => false, 2275 ) 2276 ); 2277 } 2278 2279 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2280 return shape( 2281 'struct' => dict[], 2282 'fields' => dict[ 2283 ], 2284 ); 2285 } 2286 2287} 2288 2289class SinkService_method_FirstResponse implements \IThriftStruct { 2290 use \ThriftSerializationTrait; 2291 2292 const dict<int, this::TFieldSpec> SPEC = dict[ 2293 ]; 2294 const dict<string, int> FIELDMAP = dict[ 2295 ]; 2296 2297 const type TConstructorShape = shape( 2298 ); 2299 2300 const int STRUCTURAL_ID = 957977401221134810; 2301 2302 public function __construct( )[] { 2303 } 2304 2305 public static function withDefaultValues()[]: this { 2306 return new static(); 2307 } 2308 2309 public static function fromShape(self::TConstructorShape $shape)[]: this { 2310 return new static( 2311 ); 2312 } 2313 2314 public function getName()[]: string { 2315 return 'SinkService_method_FirstResponse'; 2316 } 2317 2318 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2319 return tmeta_ThriftStruct::fromShape( 2320 shape( 2321 "name" => "module.SinkService_method_FirstResponse", 2322 "is_union" => false, 2323 ) 2324 ); 2325 } 2326 2327 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2328 return shape( 2329 'struct' => dict[], 2330 'fields' => dict[ 2331 ], 2332 ); 2333 } 2334 2335} 2336 2337class SinkService_method_SinkPayload implements \IThriftStruct { 2338 use \ThriftSerializationTrait; 2339 2340 const dict<int, this::TFieldSpec> SPEC = dict[ 2341 0 => shape( 2342 'var' => 'success', 2343 'type' => \TType::STRUCT, 2344 'class' => SinkPayload::class, 2345 ), 2346 ]; 2347 const dict<string, int> FIELDMAP = dict[ 2348 'success' => 0, 2349 ]; 2350 2351 const type TConstructorShape = shape( 2352 ?'success' => ?SinkPayload, 2353 ); 2354 2355 const int STRUCTURAL_ID = 5047864711357047518; 2356 public ?SinkPayload $success; 2357 2358 public function __construct(?SinkPayload $success = null )[] { 2359 } 2360 2361 public static function withDefaultValues()[]: this { 2362 return new static(); 2363 } 2364 2365 public static function fromShape(self::TConstructorShape $shape)[]: this { 2366 return new static( 2367 Shapes::idx($shape, 'success'), 2368 ); 2369 } 2370 2371 public function getName()[]: string { 2372 return 'SinkService_method_SinkPayload'; 2373 } 2374 2375 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2376 return tmeta_ThriftStruct::fromShape( 2377 shape( 2378 "name" => "module.SinkService_method_SinkPayload", 2379 "fields" => vec[ 2380 tmeta_ThriftField::fromShape( 2381 shape( 2382 "id" => 0, 2383 "type" => tmeta_ThriftType::fromShape( 2384 shape( 2385 "t_struct" => tmeta_ThriftStructType::fromShape( 2386 shape( 2387 "name" => "module.SinkPayload", 2388 ) 2389 ), 2390 ) 2391 ), 2392 "name" => "success", 2393 ) 2394 ), 2395 ], 2396 "is_union" => false, 2397 ) 2398 ); 2399 } 2400 2401 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2402 return shape( 2403 'struct' => dict[], 2404 'fields' => dict[ 2405 ], 2406 ); 2407 } 2408 2409} 2410 2411class SinkService_method_FinalResponse implements \IThriftStruct { 2412 use \ThriftSerializationTrait; 2413 2414 const dict<int, this::TFieldSpec> SPEC = dict[ 2415 0 => shape( 2416 'var' => 'success', 2417 'type' => \TType::STRUCT, 2418 'class' => FinalResponse::class, 2419 ), 2420 ]; 2421 const dict<string, int> FIELDMAP = dict[ 2422 'success' => 0, 2423 ]; 2424 2425 const type TConstructorShape = shape( 2426 ?'success' => ?FinalResponse, 2427 ); 2428 2429 const int STRUCTURAL_ID = 7640464975912492398; 2430 public ?FinalResponse $success; 2431 2432 public function __construct(?FinalResponse $success = null )[] { 2433 } 2434 2435 public static function withDefaultValues()[]: this { 2436 return new static(); 2437 } 2438 2439 public static function fromShape(self::TConstructorShape $shape)[]: this { 2440 return new static( 2441 Shapes::idx($shape, 'success'), 2442 ); 2443 } 2444 2445 public function getName()[]: string { 2446 return 'SinkService_method_FinalResponse'; 2447 } 2448 2449 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2450 return tmeta_ThriftStruct::fromShape( 2451 shape( 2452 "name" => "module.SinkService_method_FinalResponse", 2453 "fields" => vec[ 2454 tmeta_ThriftField::fromShape( 2455 shape( 2456 "id" => 0, 2457 "type" => tmeta_ThriftType::fromShape( 2458 shape( 2459 "t_struct" => tmeta_ThriftStructType::fromShape( 2460 shape( 2461 "name" => "module.FinalResponse", 2462 ) 2463 ), 2464 ) 2465 ), 2466 "name" => "success", 2467 ) 2468 ), 2469 ], 2470 "is_union" => false, 2471 ) 2472 ); 2473 } 2474 2475 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2476 return shape( 2477 'struct' => dict[], 2478 'fields' => dict[ 2479 ], 2480 ); 2481 } 2482 2483} 2484 2485class SinkService_methodAndReponse_args implements \IThriftStruct { 2486 use \ThriftSerializationTrait; 2487 2488 const dict<int, this::TFieldSpec> SPEC = dict[ 2489 ]; 2490 const dict<string, int> FIELDMAP = dict[ 2491 ]; 2492 2493 const type TConstructorShape = shape( 2494 ); 2495 2496 const int STRUCTURAL_ID = 957977401221134810; 2497 2498 public function __construct( )[] { 2499 } 2500 2501 public static function withDefaultValues()[]: this { 2502 return new static(); 2503 } 2504 2505 public static function fromShape(self::TConstructorShape $shape)[]: this { 2506 return new static( 2507 ); 2508 } 2509 2510 public function getName()[]: string { 2511 return 'SinkService_methodAndReponse_args'; 2512 } 2513 2514 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2515 return tmeta_ThriftStruct::fromShape( 2516 shape( 2517 "name" => "module.methodAndReponse_args", 2518 "is_union" => false, 2519 ) 2520 ); 2521 } 2522 2523 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2524 return shape( 2525 'struct' => dict[], 2526 'fields' => dict[ 2527 ], 2528 ); 2529 } 2530 2531} 2532 2533class SinkService_methodAndReponse_FirstResponse implements \IThriftStruct { 2534 use \ThriftSerializationTrait; 2535 2536 const dict<int, this::TFieldSpec> SPEC = dict[ 2537 0 => shape( 2538 'var' => 'success', 2539 'type' => \TType::STRUCT, 2540 'class' => InitialResponse::class, 2541 ), 2542 ]; 2543 const dict<string, int> FIELDMAP = dict[ 2544 'success' => 0, 2545 ]; 2546 2547 const type TConstructorShape = shape( 2548 ?'success' => ?InitialResponse, 2549 ); 2550 2551 const int STRUCTURAL_ID = 1156060868779247352; 2552 public ?InitialResponse $success; 2553 2554 public function __construct(?InitialResponse $success = null )[] { 2555 } 2556 2557 public static function withDefaultValues()[]: this { 2558 return new static(); 2559 } 2560 2561 public static function fromShape(self::TConstructorShape $shape)[]: this { 2562 return new static( 2563 Shapes::idx($shape, 'success'), 2564 ); 2565 } 2566 2567 public function getName()[]: string { 2568 return 'SinkService_methodAndReponse_FirstResponse'; 2569 } 2570 2571 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2572 return tmeta_ThriftStruct::fromShape( 2573 shape( 2574 "name" => "module.SinkService_methodAndReponse_FirstResponse", 2575 "fields" => vec[ 2576 tmeta_ThriftField::fromShape( 2577 shape( 2578 "id" => 0, 2579 "type" => tmeta_ThriftType::fromShape( 2580 shape( 2581 "t_struct" => tmeta_ThriftStructType::fromShape( 2582 shape( 2583 "name" => "module.InitialResponse", 2584 ) 2585 ), 2586 ) 2587 ), 2588 "name" => "success", 2589 ) 2590 ), 2591 ], 2592 "is_union" => false, 2593 ) 2594 ); 2595 } 2596 2597 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2598 return shape( 2599 'struct' => dict[], 2600 'fields' => dict[ 2601 ], 2602 ); 2603 } 2604 2605} 2606 2607class SinkService_methodAndReponse_SinkPayload implements \IThriftStruct { 2608 use \ThriftSerializationTrait; 2609 2610 const dict<int, this::TFieldSpec> SPEC = dict[ 2611 0 => shape( 2612 'var' => 'success', 2613 'type' => \TType::STRUCT, 2614 'class' => SinkPayload::class, 2615 ), 2616 ]; 2617 const dict<string, int> FIELDMAP = dict[ 2618 'success' => 0, 2619 ]; 2620 2621 const type TConstructorShape = shape( 2622 ?'success' => ?SinkPayload, 2623 ); 2624 2625 const int STRUCTURAL_ID = 5047864711357047518; 2626 public ?SinkPayload $success; 2627 2628 public function __construct(?SinkPayload $success = null )[] { 2629 } 2630 2631 public static function withDefaultValues()[]: this { 2632 return new static(); 2633 } 2634 2635 public static function fromShape(self::TConstructorShape $shape)[]: this { 2636 return new static( 2637 Shapes::idx($shape, 'success'), 2638 ); 2639 } 2640 2641 public function getName()[]: string { 2642 return 'SinkService_methodAndReponse_SinkPayload'; 2643 } 2644 2645 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2646 return tmeta_ThriftStruct::fromShape( 2647 shape( 2648 "name" => "module.SinkService_methodAndReponse_SinkPayload", 2649 "fields" => vec[ 2650 tmeta_ThriftField::fromShape( 2651 shape( 2652 "id" => 0, 2653 "type" => tmeta_ThriftType::fromShape( 2654 shape( 2655 "t_struct" => tmeta_ThriftStructType::fromShape( 2656 shape( 2657 "name" => "module.SinkPayload", 2658 ) 2659 ), 2660 ) 2661 ), 2662 "name" => "success", 2663 ) 2664 ), 2665 ], 2666 "is_union" => false, 2667 ) 2668 ); 2669 } 2670 2671 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2672 return shape( 2673 'struct' => dict[], 2674 'fields' => dict[ 2675 ], 2676 ); 2677 } 2678 2679} 2680 2681class SinkService_methodAndReponse_FinalResponse implements \IThriftStruct { 2682 use \ThriftSerializationTrait; 2683 2684 const dict<int, this::TFieldSpec> SPEC = dict[ 2685 0 => shape( 2686 'var' => 'success', 2687 'type' => \TType::STRUCT, 2688 'class' => FinalResponse::class, 2689 ), 2690 ]; 2691 const dict<string, int> FIELDMAP = dict[ 2692 'success' => 0, 2693 ]; 2694 2695 const type TConstructorShape = shape( 2696 ?'success' => ?FinalResponse, 2697 ); 2698 2699 const int STRUCTURAL_ID = 7640464975912492398; 2700 public ?FinalResponse $success; 2701 2702 public function __construct(?FinalResponse $success = null )[] { 2703 } 2704 2705 public static function withDefaultValues()[]: this { 2706 return new static(); 2707 } 2708 2709 public static function fromShape(self::TConstructorShape $shape)[]: this { 2710 return new static( 2711 Shapes::idx($shape, 'success'), 2712 ); 2713 } 2714 2715 public function getName()[]: string { 2716 return 'SinkService_methodAndReponse_FinalResponse'; 2717 } 2718 2719 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2720 return tmeta_ThriftStruct::fromShape( 2721 shape( 2722 "name" => "module.SinkService_methodAndReponse_FinalResponse", 2723 "fields" => vec[ 2724 tmeta_ThriftField::fromShape( 2725 shape( 2726 "id" => 0, 2727 "type" => tmeta_ThriftType::fromShape( 2728 shape( 2729 "t_struct" => tmeta_ThriftStructType::fromShape( 2730 shape( 2731 "name" => "module.FinalResponse", 2732 ) 2733 ), 2734 ) 2735 ), 2736 "name" => "success", 2737 ) 2738 ), 2739 ], 2740 "is_union" => false, 2741 ) 2742 ); 2743 } 2744 2745 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2746 return shape( 2747 'struct' => dict[], 2748 'fields' => dict[ 2749 ], 2750 ); 2751 } 2752 2753} 2754 2755class SinkService_methodThrow_args implements \IThriftStruct { 2756 use \ThriftSerializationTrait; 2757 2758 const dict<int, this::TFieldSpec> SPEC = dict[ 2759 ]; 2760 const dict<string, int> FIELDMAP = dict[ 2761 ]; 2762 2763 const type TConstructorShape = shape( 2764 ); 2765 2766 const int STRUCTURAL_ID = 957977401221134810; 2767 2768 public function __construct( )[] { 2769 } 2770 2771 public static function withDefaultValues()[]: this { 2772 return new static(); 2773 } 2774 2775 public static function fromShape(self::TConstructorShape $shape)[]: this { 2776 return new static( 2777 ); 2778 } 2779 2780 public function getName()[]: string { 2781 return 'SinkService_methodThrow_args'; 2782 } 2783 2784 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2785 return tmeta_ThriftStruct::fromShape( 2786 shape( 2787 "name" => "module.methodThrow_args", 2788 "is_union" => false, 2789 ) 2790 ); 2791 } 2792 2793 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2794 return shape( 2795 'struct' => dict[], 2796 'fields' => dict[ 2797 ], 2798 ); 2799 } 2800 2801} 2802 2803class SinkService_methodThrow_FirstResponse implements \IThriftStruct { 2804 use \ThriftSerializationTrait; 2805 2806 const dict<int, this::TFieldSpec> SPEC = dict[ 2807 1 => shape( 2808 'var' => 'ex', 2809 'type' => \TType::STRUCT, 2810 'class' => InitialException::class, 2811 ), 2812 ]; 2813 const dict<string, int> FIELDMAP = dict[ 2814 'ex' => 1, 2815 ]; 2816 2817 const type TConstructorShape = shape( 2818 ?'ex' => ?InitialException, 2819 ); 2820 2821 const int STRUCTURAL_ID = 5881917388606205109; 2822 public ?InitialException $ex; 2823 2824 public function __construct(?InitialException $ex = null )[] { 2825 } 2826 2827 public static function withDefaultValues()[]: this { 2828 return new static(); 2829 } 2830 2831 public static function fromShape(self::TConstructorShape $shape)[]: this { 2832 return new static( 2833 Shapes::idx($shape, 'ex'), 2834 ); 2835 } 2836 2837 public function getName()[]: string { 2838 return 'SinkService_methodThrow_FirstResponse'; 2839 } 2840 2841 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2842 return tmeta_ThriftStruct::fromShape( 2843 shape( 2844 "name" => "module.SinkService_methodThrow_FirstResponse", 2845 "fields" => vec[ 2846 tmeta_ThriftField::fromShape( 2847 shape( 2848 "id" => 1, 2849 "type" => tmeta_ThriftType::fromShape( 2850 shape( 2851 "t_struct" => tmeta_ThriftStructType::fromShape( 2852 shape( 2853 "name" => "module.InitialException", 2854 ) 2855 ), 2856 ) 2857 ), 2858 "name" => "ex", 2859 ) 2860 ), 2861 ], 2862 "is_union" => false, 2863 ) 2864 ); 2865 } 2866 2867 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2868 return shape( 2869 'struct' => dict[], 2870 'fields' => dict[ 2871 ], 2872 ); 2873 } 2874 2875} 2876 2877class SinkService_methodThrow_SinkPayload implements \IThriftStruct { 2878 use \ThriftSerializationTrait; 2879 2880 const dict<int, this::TFieldSpec> SPEC = dict[ 2881 0 => shape( 2882 'var' => 'success', 2883 'type' => \TType::STRUCT, 2884 'class' => SinkPayload::class, 2885 ), 2886 ]; 2887 const dict<string, int> FIELDMAP = dict[ 2888 'success' => 0, 2889 ]; 2890 2891 const type TConstructorShape = shape( 2892 ?'success' => ?SinkPayload, 2893 ); 2894 2895 const int STRUCTURAL_ID = 5047864711357047518; 2896 public ?SinkPayload $success; 2897 2898 public function __construct(?SinkPayload $success = null )[] { 2899 } 2900 2901 public static function withDefaultValues()[]: this { 2902 return new static(); 2903 } 2904 2905 public static function fromShape(self::TConstructorShape $shape)[]: this { 2906 return new static( 2907 Shapes::idx($shape, 'success'), 2908 ); 2909 } 2910 2911 public function getName()[]: string { 2912 return 'SinkService_methodThrow_SinkPayload'; 2913 } 2914 2915 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2916 return tmeta_ThriftStruct::fromShape( 2917 shape( 2918 "name" => "module.SinkService_methodThrow_SinkPayload", 2919 "fields" => vec[ 2920 tmeta_ThriftField::fromShape( 2921 shape( 2922 "id" => 0, 2923 "type" => tmeta_ThriftType::fromShape( 2924 shape( 2925 "t_struct" => tmeta_ThriftStructType::fromShape( 2926 shape( 2927 "name" => "module.SinkPayload", 2928 ) 2929 ), 2930 ) 2931 ), 2932 "name" => "success", 2933 ) 2934 ), 2935 ], 2936 "is_union" => false, 2937 ) 2938 ); 2939 } 2940 2941 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 2942 return shape( 2943 'struct' => dict[], 2944 'fields' => dict[ 2945 ], 2946 ); 2947 } 2948 2949} 2950 2951class SinkService_methodThrow_FinalResponse implements \IThriftStruct { 2952 use \ThriftSerializationTrait; 2953 2954 const dict<int, this::TFieldSpec> SPEC = dict[ 2955 0 => shape( 2956 'var' => 'success', 2957 'type' => \TType::STRUCT, 2958 'class' => FinalResponse::class, 2959 ), 2960 ]; 2961 const dict<string, int> FIELDMAP = dict[ 2962 'success' => 0, 2963 ]; 2964 2965 const type TConstructorShape = shape( 2966 ?'success' => ?FinalResponse, 2967 ); 2968 2969 const int STRUCTURAL_ID = 7640464975912492398; 2970 public ?FinalResponse $success; 2971 2972 public function __construct(?FinalResponse $success = null )[] { 2973 } 2974 2975 public static function withDefaultValues()[]: this { 2976 return new static(); 2977 } 2978 2979 public static function fromShape(self::TConstructorShape $shape)[]: this { 2980 return new static( 2981 Shapes::idx($shape, 'success'), 2982 ); 2983 } 2984 2985 public function getName()[]: string { 2986 return 'SinkService_methodThrow_FinalResponse'; 2987 } 2988 2989 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 2990 return tmeta_ThriftStruct::fromShape( 2991 shape( 2992 "name" => "module.SinkService_methodThrow_FinalResponse", 2993 "fields" => vec[ 2994 tmeta_ThriftField::fromShape( 2995 shape( 2996 "id" => 0, 2997 "type" => tmeta_ThriftType::fromShape( 2998 shape( 2999 "t_struct" => tmeta_ThriftStructType::fromShape( 3000 shape( 3001 "name" => "module.FinalResponse", 3002 ) 3003 ), 3004 ) 3005 ), 3006 "name" => "success", 3007 ) 3008 ), 3009 ], 3010 "is_union" => false, 3011 ) 3012 ); 3013 } 3014 3015 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3016 return shape( 3017 'struct' => dict[], 3018 'fields' => dict[ 3019 ], 3020 ); 3021 } 3022 3023} 3024 3025class SinkService_methodSinkThrow_args implements \IThriftStruct { 3026 use \ThriftSerializationTrait; 3027 3028 const dict<int, this::TFieldSpec> SPEC = dict[ 3029 ]; 3030 const dict<string, int> FIELDMAP = dict[ 3031 ]; 3032 3033 const type TConstructorShape = shape( 3034 ); 3035 3036 const int STRUCTURAL_ID = 957977401221134810; 3037 3038 public function __construct( )[] { 3039 } 3040 3041 public static function withDefaultValues()[]: this { 3042 return new static(); 3043 } 3044 3045 public static function fromShape(self::TConstructorShape $shape)[]: this { 3046 return new static( 3047 ); 3048 } 3049 3050 public function getName()[]: string { 3051 return 'SinkService_methodSinkThrow_args'; 3052 } 3053 3054 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3055 return tmeta_ThriftStruct::fromShape( 3056 shape( 3057 "name" => "module.methodSinkThrow_args", 3058 "is_union" => false, 3059 ) 3060 ); 3061 } 3062 3063 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3064 return shape( 3065 'struct' => dict[], 3066 'fields' => dict[ 3067 ], 3068 ); 3069 } 3070 3071} 3072 3073class SinkService_methodSinkThrow_FirstResponse implements \IThriftStruct { 3074 use \ThriftSerializationTrait; 3075 3076 const dict<int, this::TFieldSpec> SPEC = dict[ 3077 ]; 3078 const dict<string, int> FIELDMAP = dict[ 3079 ]; 3080 3081 const type TConstructorShape = shape( 3082 ); 3083 3084 const int STRUCTURAL_ID = 957977401221134810; 3085 3086 public function __construct( )[] { 3087 } 3088 3089 public static function withDefaultValues()[]: this { 3090 return new static(); 3091 } 3092 3093 public static function fromShape(self::TConstructorShape $shape)[]: this { 3094 return new static( 3095 ); 3096 } 3097 3098 public function getName()[]: string { 3099 return 'SinkService_methodSinkThrow_FirstResponse'; 3100 } 3101 3102 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3103 return tmeta_ThriftStruct::fromShape( 3104 shape( 3105 "name" => "module.SinkService_methodSinkThrow_FirstResponse", 3106 "is_union" => false, 3107 ) 3108 ); 3109 } 3110 3111 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3112 return shape( 3113 'struct' => dict[], 3114 'fields' => dict[ 3115 ], 3116 ); 3117 } 3118 3119} 3120 3121class SinkService_methodSinkThrow_SinkPayload implements \IThriftStruct { 3122 use \ThriftSerializationTrait; 3123 3124 const dict<int, this::TFieldSpec> SPEC = dict[ 3125 0 => shape( 3126 'var' => 'success', 3127 'type' => \TType::STRUCT, 3128 'class' => SinkPayload::class, 3129 ), 3130 1 => shape( 3131 'var' => 'ex', 3132 'type' => \TType::STRUCT, 3133 'class' => SinkException1::class, 3134 ), 3135 ]; 3136 const dict<string, int> FIELDMAP = dict[ 3137 'success' => 0, 3138 'ex' => 1, 3139 ]; 3140 3141 const type TConstructorShape = shape( 3142 ?'success' => ?SinkPayload, 3143 ?'ex' => ?SinkException1, 3144 ); 3145 3146 const int STRUCTURAL_ID = 8919728181176611439; 3147 public ?SinkPayload $success; 3148 public ?SinkException1 $ex; 3149 3150 public function __construct(?SinkPayload $success = null, ?SinkException1 $ex = null )[] { 3151 } 3152 3153 public static function withDefaultValues()[]: this { 3154 return new static(); 3155 } 3156 3157 public static function fromShape(self::TConstructorShape $shape)[]: this { 3158 return new static( 3159 Shapes::idx($shape, 'success'), 3160 Shapes::idx($shape, 'ex'), 3161 ); 3162 } 3163 3164 public function getName()[]: string { 3165 return 'SinkService_methodSinkThrow_SinkPayload'; 3166 } 3167 3168 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3169 return tmeta_ThriftStruct::fromShape( 3170 shape( 3171 "name" => "module.SinkService_methodSinkThrow_SinkPayload", 3172 "fields" => vec[ 3173 tmeta_ThriftField::fromShape( 3174 shape( 3175 "id" => 0, 3176 "type" => tmeta_ThriftType::fromShape( 3177 shape( 3178 "t_struct" => tmeta_ThriftStructType::fromShape( 3179 shape( 3180 "name" => "module.SinkPayload", 3181 ) 3182 ), 3183 ) 3184 ), 3185 "name" => "success", 3186 ) 3187 ), 3188 tmeta_ThriftField::fromShape( 3189 shape( 3190 "id" => 1, 3191 "type" => tmeta_ThriftType::fromShape( 3192 shape( 3193 "t_struct" => tmeta_ThriftStructType::fromShape( 3194 shape( 3195 "name" => "module.SinkException1", 3196 ) 3197 ), 3198 ) 3199 ), 3200 "name" => "ex", 3201 ) 3202 ), 3203 ], 3204 "is_union" => false, 3205 ) 3206 ); 3207 } 3208 3209 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3210 return shape( 3211 'struct' => dict[], 3212 'fields' => dict[ 3213 ], 3214 ); 3215 } 3216 3217} 3218 3219class SinkService_methodSinkThrow_FinalResponse implements \IThriftStruct { 3220 use \ThriftSerializationTrait; 3221 3222 const dict<int, this::TFieldSpec> SPEC = dict[ 3223 0 => shape( 3224 'var' => 'success', 3225 'type' => \TType::STRUCT, 3226 'class' => FinalResponse::class, 3227 ), 3228 ]; 3229 const dict<string, int> FIELDMAP = dict[ 3230 'success' => 0, 3231 ]; 3232 3233 const type TConstructorShape = shape( 3234 ?'success' => ?FinalResponse, 3235 ); 3236 3237 const int STRUCTURAL_ID = 7640464975912492398; 3238 public ?FinalResponse $success; 3239 3240 public function __construct(?FinalResponse $success = null )[] { 3241 } 3242 3243 public static function withDefaultValues()[]: this { 3244 return new static(); 3245 } 3246 3247 public static function fromShape(self::TConstructorShape $shape)[]: this { 3248 return new static( 3249 Shapes::idx($shape, 'success'), 3250 ); 3251 } 3252 3253 public function getName()[]: string { 3254 return 'SinkService_methodSinkThrow_FinalResponse'; 3255 } 3256 3257 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3258 return tmeta_ThriftStruct::fromShape( 3259 shape( 3260 "name" => "module.SinkService_methodSinkThrow_FinalResponse", 3261 "fields" => vec[ 3262 tmeta_ThriftField::fromShape( 3263 shape( 3264 "id" => 0, 3265 "type" => tmeta_ThriftType::fromShape( 3266 shape( 3267 "t_struct" => tmeta_ThriftStructType::fromShape( 3268 shape( 3269 "name" => "module.FinalResponse", 3270 ) 3271 ), 3272 ) 3273 ), 3274 "name" => "success", 3275 ) 3276 ), 3277 ], 3278 "is_union" => false, 3279 ) 3280 ); 3281 } 3282 3283 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3284 return shape( 3285 'struct' => dict[], 3286 'fields' => dict[ 3287 ], 3288 ); 3289 } 3290 3291} 3292 3293class SinkService_methodFinalThrow_args implements \IThriftStruct { 3294 use \ThriftSerializationTrait; 3295 3296 const dict<int, this::TFieldSpec> SPEC = dict[ 3297 ]; 3298 const dict<string, int> FIELDMAP = dict[ 3299 ]; 3300 3301 const type TConstructorShape = shape( 3302 ); 3303 3304 const int STRUCTURAL_ID = 957977401221134810; 3305 3306 public function __construct( )[] { 3307 } 3308 3309 public static function withDefaultValues()[]: this { 3310 return new static(); 3311 } 3312 3313 public static function fromShape(self::TConstructorShape $shape)[]: this { 3314 return new static( 3315 ); 3316 } 3317 3318 public function getName()[]: string { 3319 return 'SinkService_methodFinalThrow_args'; 3320 } 3321 3322 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3323 return tmeta_ThriftStruct::fromShape( 3324 shape( 3325 "name" => "module.methodFinalThrow_args", 3326 "is_union" => false, 3327 ) 3328 ); 3329 } 3330 3331 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3332 return shape( 3333 'struct' => dict[], 3334 'fields' => dict[ 3335 ], 3336 ); 3337 } 3338 3339} 3340 3341class SinkService_methodFinalThrow_FirstResponse implements \IThriftStruct { 3342 use \ThriftSerializationTrait; 3343 3344 const dict<int, this::TFieldSpec> SPEC = dict[ 3345 ]; 3346 const dict<string, int> FIELDMAP = dict[ 3347 ]; 3348 3349 const type TConstructorShape = shape( 3350 ); 3351 3352 const int STRUCTURAL_ID = 957977401221134810; 3353 3354 public function __construct( )[] { 3355 } 3356 3357 public static function withDefaultValues()[]: this { 3358 return new static(); 3359 } 3360 3361 public static function fromShape(self::TConstructorShape $shape)[]: this { 3362 return new static( 3363 ); 3364 } 3365 3366 public function getName()[]: string { 3367 return 'SinkService_methodFinalThrow_FirstResponse'; 3368 } 3369 3370 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3371 return tmeta_ThriftStruct::fromShape( 3372 shape( 3373 "name" => "module.SinkService_methodFinalThrow_FirstResponse", 3374 "is_union" => false, 3375 ) 3376 ); 3377 } 3378 3379 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3380 return shape( 3381 'struct' => dict[], 3382 'fields' => dict[ 3383 ], 3384 ); 3385 } 3386 3387} 3388 3389class SinkService_methodFinalThrow_SinkPayload implements \IThriftStruct { 3390 use \ThriftSerializationTrait; 3391 3392 const dict<int, this::TFieldSpec> SPEC = dict[ 3393 0 => shape( 3394 'var' => 'success', 3395 'type' => \TType::STRUCT, 3396 'class' => SinkPayload::class, 3397 ), 3398 ]; 3399 const dict<string, int> FIELDMAP = dict[ 3400 'success' => 0, 3401 ]; 3402 3403 const type TConstructorShape = shape( 3404 ?'success' => ?SinkPayload, 3405 ); 3406 3407 const int STRUCTURAL_ID = 5047864711357047518; 3408 public ?SinkPayload $success; 3409 3410 public function __construct(?SinkPayload $success = null )[] { 3411 } 3412 3413 public static function withDefaultValues()[]: this { 3414 return new static(); 3415 } 3416 3417 public static function fromShape(self::TConstructorShape $shape)[]: this { 3418 return new static( 3419 Shapes::idx($shape, 'success'), 3420 ); 3421 } 3422 3423 public function getName()[]: string { 3424 return 'SinkService_methodFinalThrow_SinkPayload'; 3425 } 3426 3427 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3428 return tmeta_ThriftStruct::fromShape( 3429 shape( 3430 "name" => "module.SinkService_methodFinalThrow_SinkPayload", 3431 "fields" => vec[ 3432 tmeta_ThriftField::fromShape( 3433 shape( 3434 "id" => 0, 3435 "type" => tmeta_ThriftType::fromShape( 3436 shape( 3437 "t_struct" => tmeta_ThriftStructType::fromShape( 3438 shape( 3439 "name" => "module.SinkPayload", 3440 ) 3441 ), 3442 ) 3443 ), 3444 "name" => "success", 3445 ) 3446 ), 3447 ], 3448 "is_union" => false, 3449 ) 3450 ); 3451 } 3452 3453 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3454 return shape( 3455 'struct' => dict[], 3456 'fields' => dict[ 3457 ], 3458 ); 3459 } 3460 3461} 3462 3463class SinkService_methodFinalThrow_FinalResponse implements \IThriftStruct { 3464 use \ThriftSerializationTrait; 3465 3466 const dict<int, this::TFieldSpec> SPEC = dict[ 3467 0 => shape( 3468 'var' => 'success', 3469 'type' => \TType::STRUCT, 3470 'class' => FinalResponse::class, 3471 ), 3472 1 => shape( 3473 'var' => 'ex', 3474 'type' => \TType::STRUCT, 3475 'class' => SinkException2::class, 3476 ), 3477 ]; 3478 const dict<string, int> FIELDMAP = dict[ 3479 'success' => 0, 3480 'ex' => 1, 3481 ]; 3482 3483 const type TConstructorShape = shape( 3484 ?'success' => ?FinalResponse, 3485 ?'ex' => ?SinkException2, 3486 ); 3487 3488 const int STRUCTURAL_ID = 1352924921392902231; 3489 public ?FinalResponse $success; 3490 public ?SinkException2 $ex; 3491 3492 public function __construct(?FinalResponse $success = null, ?SinkException2 $ex = null )[] { 3493 } 3494 3495 public static function withDefaultValues()[]: this { 3496 return new static(); 3497 } 3498 3499 public static function fromShape(self::TConstructorShape $shape)[]: this { 3500 return new static( 3501 Shapes::idx($shape, 'success'), 3502 Shapes::idx($shape, 'ex'), 3503 ); 3504 } 3505 3506 public function getName()[]: string { 3507 return 'SinkService_methodFinalThrow_FinalResponse'; 3508 } 3509 3510 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3511 return tmeta_ThriftStruct::fromShape( 3512 shape( 3513 "name" => "module.SinkService_methodFinalThrow_FinalResponse", 3514 "fields" => vec[ 3515 tmeta_ThriftField::fromShape( 3516 shape( 3517 "id" => 0, 3518 "type" => tmeta_ThriftType::fromShape( 3519 shape( 3520 "t_struct" => tmeta_ThriftStructType::fromShape( 3521 shape( 3522 "name" => "module.FinalResponse", 3523 ) 3524 ), 3525 ) 3526 ), 3527 "name" => "success", 3528 ) 3529 ), 3530 tmeta_ThriftField::fromShape( 3531 shape( 3532 "id" => 1, 3533 "type" => tmeta_ThriftType::fromShape( 3534 shape( 3535 "t_struct" => tmeta_ThriftStructType::fromShape( 3536 shape( 3537 "name" => "module.SinkException2", 3538 ) 3539 ), 3540 ) 3541 ), 3542 "name" => "ex", 3543 ) 3544 ), 3545 ], 3546 "is_union" => false, 3547 ) 3548 ); 3549 } 3550 3551 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3552 return shape( 3553 'struct' => dict[], 3554 'fields' => dict[ 3555 ], 3556 ); 3557 } 3558 3559} 3560 3561class SinkService_methodBothThrow_args implements \IThriftStruct { 3562 use \ThriftSerializationTrait; 3563 3564 const dict<int, this::TFieldSpec> SPEC = dict[ 3565 ]; 3566 const dict<string, int> FIELDMAP = dict[ 3567 ]; 3568 3569 const type TConstructorShape = shape( 3570 ); 3571 3572 const int STRUCTURAL_ID = 957977401221134810; 3573 3574 public function __construct( )[] { 3575 } 3576 3577 public static function withDefaultValues()[]: this { 3578 return new static(); 3579 } 3580 3581 public static function fromShape(self::TConstructorShape $shape)[]: this { 3582 return new static( 3583 ); 3584 } 3585 3586 public function getName()[]: string { 3587 return 'SinkService_methodBothThrow_args'; 3588 } 3589 3590 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3591 return tmeta_ThriftStruct::fromShape( 3592 shape( 3593 "name" => "module.methodBothThrow_args", 3594 "is_union" => false, 3595 ) 3596 ); 3597 } 3598 3599 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3600 return shape( 3601 'struct' => dict[], 3602 'fields' => dict[ 3603 ], 3604 ); 3605 } 3606 3607} 3608 3609class SinkService_methodBothThrow_FirstResponse implements \IThriftStruct { 3610 use \ThriftSerializationTrait; 3611 3612 const dict<int, this::TFieldSpec> SPEC = dict[ 3613 ]; 3614 const dict<string, int> FIELDMAP = dict[ 3615 ]; 3616 3617 const type TConstructorShape = shape( 3618 ); 3619 3620 const int STRUCTURAL_ID = 957977401221134810; 3621 3622 public function __construct( )[] { 3623 } 3624 3625 public static function withDefaultValues()[]: this { 3626 return new static(); 3627 } 3628 3629 public static function fromShape(self::TConstructorShape $shape)[]: this { 3630 return new static( 3631 ); 3632 } 3633 3634 public function getName()[]: string { 3635 return 'SinkService_methodBothThrow_FirstResponse'; 3636 } 3637 3638 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3639 return tmeta_ThriftStruct::fromShape( 3640 shape( 3641 "name" => "module.SinkService_methodBothThrow_FirstResponse", 3642 "is_union" => false, 3643 ) 3644 ); 3645 } 3646 3647 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3648 return shape( 3649 'struct' => dict[], 3650 'fields' => dict[ 3651 ], 3652 ); 3653 } 3654 3655} 3656 3657class SinkService_methodBothThrow_SinkPayload implements \IThriftStruct { 3658 use \ThriftSerializationTrait; 3659 3660 const dict<int, this::TFieldSpec> SPEC = dict[ 3661 0 => shape( 3662 'var' => 'success', 3663 'type' => \TType::STRUCT, 3664 'class' => SinkPayload::class, 3665 ), 3666 1 => shape( 3667 'var' => 'ex', 3668 'type' => \TType::STRUCT, 3669 'class' => SinkException1::class, 3670 ), 3671 ]; 3672 const dict<string, int> FIELDMAP = dict[ 3673 'success' => 0, 3674 'ex' => 1, 3675 ]; 3676 3677 const type TConstructorShape = shape( 3678 ?'success' => ?SinkPayload, 3679 ?'ex' => ?SinkException1, 3680 ); 3681 3682 const int STRUCTURAL_ID = 8919728181176611439; 3683 public ?SinkPayload $success; 3684 public ?SinkException1 $ex; 3685 3686 public function __construct(?SinkPayload $success = null, ?SinkException1 $ex = null )[] { 3687 } 3688 3689 public static function withDefaultValues()[]: this { 3690 return new static(); 3691 } 3692 3693 public static function fromShape(self::TConstructorShape $shape)[]: this { 3694 return new static( 3695 Shapes::idx($shape, 'success'), 3696 Shapes::idx($shape, 'ex'), 3697 ); 3698 } 3699 3700 public function getName()[]: string { 3701 return 'SinkService_methodBothThrow_SinkPayload'; 3702 } 3703 3704 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3705 return tmeta_ThriftStruct::fromShape( 3706 shape( 3707 "name" => "module.SinkService_methodBothThrow_SinkPayload", 3708 "fields" => vec[ 3709 tmeta_ThriftField::fromShape( 3710 shape( 3711 "id" => 0, 3712 "type" => tmeta_ThriftType::fromShape( 3713 shape( 3714 "t_struct" => tmeta_ThriftStructType::fromShape( 3715 shape( 3716 "name" => "module.SinkPayload", 3717 ) 3718 ), 3719 ) 3720 ), 3721 "name" => "success", 3722 ) 3723 ), 3724 tmeta_ThriftField::fromShape( 3725 shape( 3726 "id" => 1, 3727 "type" => tmeta_ThriftType::fromShape( 3728 shape( 3729 "t_struct" => tmeta_ThriftStructType::fromShape( 3730 shape( 3731 "name" => "module.SinkException1", 3732 ) 3733 ), 3734 ) 3735 ), 3736 "name" => "ex", 3737 ) 3738 ), 3739 ], 3740 "is_union" => false, 3741 ) 3742 ); 3743 } 3744 3745 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3746 return shape( 3747 'struct' => dict[], 3748 'fields' => dict[ 3749 ], 3750 ); 3751 } 3752 3753} 3754 3755class SinkService_methodBothThrow_FinalResponse implements \IThriftStruct { 3756 use \ThriftSerializationTrait; 3757 3758 const dict<int, this::TFieldSpec> SPEC = dict[ 3759 0 => shape( 3760 'var' => 'success', 3761 'type' => \TType::STRUCT, 3762 'class' => FinalResponse::class, 3763 ), 3764 1 => shape( 3765 'var' => 'ex', 3766 'type' => \TType::STRUCT, 3767 'class' => SinkException2::class, 3768 ), 3769 ]; 3770 const dict<string, int> FIELDMAP = dict[ 3771 'success' => 0, 3772 'ex' => 1, 3773 ]; 3774 3775 const type TConstructorShape = shape( 3776 ?'success' => ?FinalResponse, 3777 ?'ex' => ?SinkException2, 3778 ); 3779 3780 const int STRUCTURAL_ID = 1352924921392902231; 3781 public ?FinalResponse $success; 3782 public ?SinkException2 $ex; 3783 3784 public function __construct(?FinalResponse $success = null, ?SinkException2 $ex = null )[] { 3785 } 3786 3787 public static function withDefaultValues()[]: this { 3788 return new static(); 3789 } 3790 3791 public static function fromShape(self::TConstructorShape $shape)[]: this { 3792 return new static( 3793 Shapes::idx($shape, 'success'), 3794 Shapes::idx($shape, 'ex'), 3795 ); 3796 } 3797 3798 public function getName()[]: string { 3799 return 'SinkService_methodBothThrow_FinalResponse'; 3800 } 3801 3802 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3803 return tmeta_ThriftStruct::fromShape( 3804 shape( 3805 "name" => "module.SinkService_methodBothThrow_FinalResponse", 3806 "fields" => vec[ 3807 tmeta_ThriftField::fromShape( 3808 shape( 3809 "id" => 0, 3810 "type" => tmeta_ThriftType::fromShape( 3811 shape( 3812 "t_struct" => tmeta_ThriftStructType::fromShape( 3813 shape( 3814 "name" => "module.FinalResponse", 3815 ) 3816 ), 3817 ) 3818 ), 3819 "name" => "success", 3820 ) 3821 ), 3822 tmeta_ThriftField::fromShape( 3823 shape( 3824 "id" => 1, 3825 "type" => tmeta_ThriftType::fromShape( 3826 shape( 3827 "t_struct" => tmeta_ThriftStructType::fromShape( 3828 shape( 3829 "name" => "module.SinkException2", 3830 ) 3831 ), 3832 ) 3833 ), 3834 "name" => "ex", 3835 ) 3836 ), 3837 ], 3838 "is_union" => false, 3839 ) 3840 ); 3841 } 3842 3843 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3844 return shape( 3845 'struct' => dict[], 3846 'fields' => dict[ 3847 ], 3848 ); 3849 } 3850 3851} 3852 3853class SinkService_methodFast_args implements \IThriftStruct { 3854 use \ThriftSerializationTrait; 3855 3856 const dict<int, this::TFieldSpec> SPEC = dict[ 3857 ]; 3858 const dict<string, int> FIELDMAP = dict[ 3859 ]; 3860 3861 const type TConstructorShape = shape( 3862 ); 3863 3864 const int STRUCTURAL_ID = 957977401221134810; 3865 3866 public function __construct( )[] { 3867 } 3868 3869 public static function withDefaultValues()[]: this { 3870 return new static(); 3871 } 3872 3873 public static function fromShape(self::TConstructorShape $shape)[]: this { 3874 return new static( 3875 ); 3876 } 3877 3878 public function getName()[]: string { 3879 return 'SinkService_methodFast_args'; 3880 } 3881 3882 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3883 return tmeta_ThriftStruct::fromShape( 3884 shape( 3885 "name" => "module.methodFast_args", 3886 "is_union" => false, 3887 ) 3888 ); 3889 } 3890 3891 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3892 return shape( 3893 'struct' => dict[], 3894 'fields' => dict[ 3895 ], 3896 ); 3897 } 3898 3899} 3900 3901class SinkService_methodFast_FirstResponse implements \IThriftStruct { 3902 use \ThriftSerializationTrait; 3903 3904 const dict<int, this::TFieldSpec> SPEC = dict[ 3905 ]; 3906 const dict<string, int> FIELDMAP = dict[ 3907 ]; 3908 3909 const type TConstructorShape = shape( 3910 ); 3911 3912 const int STRUCTURAL_ID = 957977401221134810; 3913 3914 public function __construct( )[] { 3915 } 3916 3917 public static function withDefaultValues()[]: this { 3918 return new static(); 3919 } 3920 3921 public static function fromShape(self::TConstructorShape $shape)[]: this { 3922 return new static( 3923 ); 3924 } 3925 3926 public function getName()[]: string { 3927 return 'SinkService_methodFast_FirstResponse'; 3928 } 3929 3930 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3931 return tmeta_ThriftStruct::fromShape( 3932 shape( 3933 "name" => "module.SinkService_methodFast_FirstResponse", 3934 "is_union" => false, 3935 ) 3936 ); 3937 } 3938 3939 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 3940 return shape( 3941 'struct' => dict[], 3942 'fields' => dict[ 3943 ], 3944 ); 3945 } 3946 3947} 3948 3949class SinkService_methodFast_SinkPayload implements \IThriftStruct { 3950 use \ThriftSerializationTrait; 3951 3952 const dict<int, this::TFieldSpec> SPEC = dict[ 3953 0 => shape( 3954 'var' => 'success', 3955 'type' => \TType::STRUCT, 3956 'class' => SinkPayload::class, 3957 ), 3958 ]; 3959 const dict<string, int> FIELDMAP = dict[ 3960 'success' => 0, 3961 ]; 3962 3963 const type TConstructorShape = shape( 3964 ?'success' => ?SinkPayload, 3965 ); 3966 3967 const int STRUCTURAL_ID = 5047864711357047518; 3968 public ?SinkPayload $success; 3969 3970 public function __construct(?SinkPayload $success = null )[] { 3971 } 3972 3973 public static function withDefaultValues()[]: this { 3974 return new static(); 3975 } 3976 3977 public static function fromShape(self::TConstructorShape $shape)[]: this { 3978 return new static( 3979 Shapes::idx($shape, 'success'), 3980 ); 3981 } 3982 3983 public function getName()[]: string { 3984 return 'SinkService_methodFast_SinkPayload'; 3985 } 3986 3987 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 3988 return tmeta_ThriftStruct::fromShape( 3989 shape( 3990 "name" => "module.SinkService_methodFast_SinkPayload", 3991 "fields" => vec[ 3992 tmeta_ThriftField::fromShape( 3993 shape( 3994 "id" => 0, 3995 "type" => tmeta_ThriftType::fromShape( 3996 shape( 3997 "t_struct" => tmeta_ThriftStructType::fromShape( 3998 shape( 3999 "name" => "module.SinkPayload", 4000 ) 4001 ), 4002 ) 4003 ), 4004 "name" => "success", 4005 ) 4006 ), 4007 ], 4008 "is_union" => false, 4009 ) 4010 ); 4011 } 4012 4013 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 4014 return shape( 4015 'struct' => dict[], 4016 'fields' => dict[ 4017 ], 4018 ); 4019 } 4020 4021} 4022 4023class SinkService_methodFast_FinalResponse implements \IThriftStruct { 4024 use \ThriftSerializationTrait; 4025 4026 const dict<int, this::TFieldSpec> SPEC = dict[ 4027 0 => shape( 4028 'var' => 'success', 4029 'type' => \TType::STRUCT, 4030 'class' => FinalResponse::class, 4031 ), 4032 ]; 4033 const dict<string, int> FIELDMAP = dict[ 4034 'success' => 0, 4035 ]; 4036 4037 const type TConstructorShape = shape( 4038 ?'success' => ?FinalResponse, 4039 ); 4040 4041 const int STRUCTURAL_ID = 7640464975912492398; 4042 public ?FinalResponse $success; 4043 4044 public function __construct(?FinalResponse $success = null )[] { 4045 } 4046 4047 public static function withDefaultValues()[]: this { 4048 return new static(); 4049 } 4050 4051 public static function fromShape(self::TConstructorShape $shape)[]: this { 4052 return new static( 4053 Shapes::idx($shape, 'success'), 4054 ); 4055 } 4056 4057 public function getName()[]: string { 4058 return 'SinkService_methodFast_FinalResponse'; 4059 } 4060 4061 public static function getStructMetadata()[]: \tmeta_ThriftStruct { 4062 return tmeta_ThriftStruct::fromShape( 4063 shape( 4064 "name" => "module.SinkService_methodFast_FinalResponse", 4065 "fields" => vec[ 4066 tmeta_ThriftField::fromShape( 4067 shape( 4068 "id" => 0, 4069 "type" => tmeta_ThriftType::fromShape( 4070 shape( 4071 "t_struct" => tmeta_ThriftStructType::fromShape( 4072 shape( 4073 "name" => "module.FinalResponse", 4074 ) 4075 ), 4076 ) 4077 ), 4078 "name" => "success", 4079 ) 4080 ), 4081 ], 4082 "is_union" => false, 4083 ) 4084 ); 4085 } 4086 4087 public static function getAllStructuredAnnotations()[]: \TStructAnnotations { 4088 return shape( 4089 'struct' => dict[], 4090 'fields' => dict[ 4091 ], 4092 ); 4093 } 4094 4095} 4096 4097class SinkServiceStaticMetadata implements \IThriftServiceStaticMetadata { 4098 public static function getServiceMetadata()[]: \tmeta_ThriftService { 4099 return tmeta_ThriftService::fromShape( 4100 shape( 4101 "name" => "module.SinkService", 4102 "functions" => vec[ 4103 tmeta_ThriftFunction::fromShape( 4104 shape( 4105 "name" => "method", 4106 "return_type" => tmeta_ThriftType::fromShape( 4107 shape( 4108 "t_sink" => tmeta_ThriftSinkType::fromShape( 4109 shape( 4110 "elemType" => tmeta_ThriftType::fromShape( 4111 shape( 4112 "t_struct" => tmeta_ThriftStructType::fromShape( 4113 shape( 4114 "name" => "module.SinkPayload", 4115 ) 4116 ), 4117 ) 4118 ), 4119 "finalResponseType" => tmeta_ThriftType::fromShape( 4120 shape( 4121 "t_struct" => tmeta_ThriftStructType::fromShape( 4122 shape( 4123 "name" => "module.FinalResponse", 4124 ) 4125 ), 4126 ) 4127 ), 4128 "initialResponseType" => tmeta_ThriftType::fromShape( 4129 shape( 4130 "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE, 4131 ) 4132 ), 4133 ) 4134 ), 4135 ) 4136 ), 4137 ) 4138 ), 4139 tmeta_ThriftFunction::fromShape( 4140 shape( 4141 "name" => "methodAndReponse", 4142 "return_type" => tmeta_ThriftType::fromShape( 4143 shape( 4144 "t_sink" => tmeta_ThriftSinkType::fromShape( 4145 shape( 4146 "elemType" => tmeta_ThriftType::fromShape( 4147 shape( 4148 "t_struct" => tmeta_ThriftStructType::fromShape( 4149 shape( 4150 "name" => "module.SinkPayload", 4151 ) 4152 ), 4153 ) 4154 ), 4155 "finalResponseType" => tmeta_ThriftType::fromShape( 4156 shape( 4157 "t_struct" => tmeta_ThriftStructType::fromShape( 4158 shape( 4159 "name" => "module.FinalResponse", 4160 ) 4161 ), 4162 ) 4163 ), 4164 "initialResponseType" => tmeta_ThriftType::fromShape( 4165 shape( 4166 "t_struct" => tmeta_ThriftStructType::fromShape( 4167 shape( 4168 "name" => "module.InitialResponse", 4169 ) 4170 ), 4171 ) 4172 ), 4173 ) 4174 ), 4175 ) 4176 ), 4177 ) 4178 ), 4179 tmeta_ThriftFunction::fromShape( 4180 shape( 4181 "name" => "methodThrow", 4182 "return_type" => tmeta_ThriftType::fromShape( 4183 shape( 4184 "t_sink" => tmeta_ThriftSinkType::fromShape( 4185 shape( 4186 "elemType" => tmeta_ThriftType::fromShape( 4187 shape( 4188 "t_struct" => tmeta_ThriftStructType::fromShape( 4189 shape( 4190 "name" => "module.SinkPayload", 4191 ) 4192 ), 4193 ) 4194 ), 4195 "finalResponseType" => tmeta_ThriftType::fromShape( 4196 shape( 4197 "t_struct" => tmeta_ThriftStructType::fromShape( 4198 shape( 4199 "name" => "module.FinalResponse", 4200 ) 4201 ), 4202 ) 4203 ), 4204 "initialResponseType" => tmeta_ThriftType::fromShape( 4205 shape( 4206 "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE, 4207 ) 4208 ), 4209 ) 4210 ), 4211 ) 4212 ), 4213 "exceptions" => vec[ 4214 tmeta_ThriftField::fromShape( 4215 shape( 4216 "id" => 1, 4217 "type" => tmeta_ThriftType::fromShape( 4218 shape( 4219 "t_struct" => tmeta_ThriftStructType::fromShape( 4220 shape( 4221 "name" => "module.InitialException", 4222 ) 4223 ), 4224 ) 4225 ), 4226 "name" => "ex", 4227 ) 4228 ), 4229 ], 4230 ) 4231 ), 4232 tmeta_ThriftFunction::fromShape( 4233 shape( 4234 "name" => "methodSinkThrow", 4235 "return_type" => tmeta_ThriftType::fromShape( 4236 shape( 4237 "t_sink" => tmeta_ThriftSinkType::fromShape( 4238 shape( 4239 "elemType" => tmeta_ThriftType::fromShape( 4240 shape( 4241 "t_struct" => tmeta_ThriftStructType::fromShape( 4242 shape( 4243 "name" => "module.SinkPayload", 4244 ) 4245 ), 4246 ) 4247 ), 4248 "finalResponseType" => tmeta_ThriftType::fromShape( 4249 shape( 4250 "t_struct" => tmeta_ThriftStructType::fromShape( 4251 shape( 4252 "name" => "module.FinalResponse", 4253 ) 4254 ), 4255 ) 4256 ), 4257 "initialResponseType" => tmeta_ThriftType::fromShape( 4258 shape( 4259 "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE, 4260 ) 4261 ), 4262 ) 4263 ), 4264 ) 4265 ), 4266 ) 4267 ), 4268 tmeta_ThriftFunction::fromShape( 4269 shape( 4270 "name" => "methodFinalThrow", 4271 "return_type" => tmeta_ThriftType::fromShape( 4272 shape( 4273 "t_sink" => tmeta_ThriftSinkType::fromShape( 4274 shape( 4275 "elemType" => tmeta_ThriftType::fromShape( 4276 shape( 4277 "t_struct" => tmeta_ThriftStructType::fromShape( 4278 shape( 4279 "name" => "module.SinkPayload", 4280 ) 4281 ), 4282 ) 4283 ), 4284 "finalResponseType" => tmeta_ThriftType::fromShape( 4285 shape( 4286 "t_struct" => tmeta_ThriftStructType::fromShape( 4287 shape( 4288 "name" => "module.FinalResponse", 4289 ) 4290 ), 4291 ) 4292 ), 4293 "initialResponseType" => tmeta_ThriftType::fromShape( 4294 shape( 4295 "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE, 4296 ) 4297 ), 4298 ) 4299 ), 4300 ) 4301 ), 4302 ) 4303 ), 4304 tmeta_ThriftFunction::fromShape( 4305 shape( 4306 "name" => "methodBothThrow", 4307 "return_type" => tmeta_ThriftType::fromShape( 4308 shape( 4309 "t_sink" => tmeta_ThriftSinkType::fromShape( 4310 shape( 4311 "elemType" => tmeta_ThriftType::fromShape( 4312 shape( 4313 "t_struct" => tmeta_ThriftStructType::fromShape( 4314 shape( 4315 "name" => "module.SinkPayload", 4316 ) 4317 ), 4318 ) 4319 ), 4320 "finalResponseType" => tmeta_ThriftType::fromShape( 4321 shape( 4322 "t_struct" => tmeta_ThriftStructType::fromShape( 4323 shape( 4324 "name" => "module.FinalResponse", 4325 ) 4326 ), 4327 ) 4328 ), 4329 "initialResponseType" => tmeta_ThriftType::fromShape( 4330 shape( 4331 "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE, 4332 ) 4333 ), 4334 ) 4335 ), 4336 ) 4337 ), 4338 ) 4339 ), 4340 tmeta_ThriftFunction::fromShape( 4341 shape( 4342 "name" => "methodFast", 4343 "return_type" => tmeta_ThriftType::fromShape( 4344 shape( 4345 "t_sink" => tmeta_ThriftSinkType::fromShape( 4346 shape( 4347 "elemType" => tmeta_ThriftType::fromShape( 4348 shape( 4349 "t_struct" => tmeta_ThriftStructType::fromShape( 4350 shape( 4351 "name" => "module.SinkPayload", 4352 ) 4353 ), 4354 ) 4355 ), 4356 "finalResponseType" => tmeta_ThriftType::fromShape( 4357 shape( 4358 "t_struct" => tmeta_ThriftStructType::fromShape( 4359 shape( 4360 "name" => "module.FinalResponse", 4361 ) 4362 ), 4363 ) 4364 ), 4365 "initialResponseType" => tmeta_ThriftType::fromShape( 4366 shape( 4367 "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE, 4368 ) 4369 ), 4370 ) 4371 ), 4372 ) 4373 ), 4374 ) 4375 ), 4376 ], 4377 ) 4378 ); 4379 } 4380 4381 public static function getServiceMetadataResponse()[]: \tmeta_ThriftServiceMetadataResponse { 4382 return \tmeta_ThriftServiceMetadataResponse::fromShape( 4383 shape( 4384 'context' => \tmeta_ThriftServiceContext::fromShape( 4385 shape( 4386 'service_info' => self::getServiceMetadata(), 4387 'module' => \tmeta_ThriftModuleContext::fromShape( 4388 shape( 4389 'name' => 'module', 4390 ) 4391 ), 4392 ) 4393 ), 4394 'metadata' => \tmeta_ThriftMetadata::fromShape( 4395 shape( 4396 'enums' => dict[ 4397 ], 4398 'structs' => dict[ 4399 'module.SinkPayload' => SinkPayload::getStructMetadata(), 4400 'module.FinalResponse' => FinalResponse::getStructMetadata(), 4401 'module.InitialResponse' => InitialResponse::getStructMetadata(), 4402 ], 4403 'exceptions' => dict[ 4404 'module.InitialException' => InitialException::getExceptionMetadata(), 4405 ], 4406 'services' => dict[ 4407 ], 4408 ) 4409 ), 4410 ) 4411 ); 4412 } 4413 4414 public static function getAllStructuredAnnotations()[]: \TServiceAnnotations { 4415 return shape( 4416 'service' => dict[], 4417 'functions' => dict[ 4418 ], 4419 ); 4420 } 4421} 4422 4423