; } /** * Original thrift service:- * InteractWithShared */ interface InteractWithSharedIf extends \IThriftSyncIf { /** * Original thrift definition:- * shared.DoSomethingResult * do_some_similar_things(); */ public function do_some_similar_things(): DoSomethingResult; } /** * Original thrift service:- * InteractWithShared */ interface InteractWithSharedAsyncClientIf extends InteractWithSharedAsyncIf { } /** * Original thrift service:- * InteractWithShared */ interface InteractWithSharedClientIf extends \IThriftSyncIf { /** * Original thrift definition:- * shared.DoSomethingResult * do_some_similar_things(); */ public function do_some_similar_things(): Awaitable; } /** * Original thrift service:- * InteractWithShared */ trait InteractWithSharedClientBase { require extends \ThriftClientBase; /* interaction handlers factory methods */ public function createMyInteraction(): InteractWithShared_MyInteraction { $interaction = new InteractWithShared_MyInteraction($this->input_, $this->output_, $this->channel_); $interaction->setAsyncHandler($this->asyncHandler_)->setEventHandler($this->eventHandler_); return $interaction; } public function createSharedInteraction(): InteractWithShared_SharedInteraction { $interaction = new InteractWithShared_SharedInteraction($this->input_, $this->output_, $this->channel_); $interaction->setAsyncHandler($this->asyncHandler_)->setEventHandler($this->eventHandler_); return $interaction; } } class InteractWithSharedAsyncClient extends \ThriftClientBase implements InteractWithSharedAsyncClientIf { use InteractWithSharedClientBase; /** * Original thrift definition:- * shared.DoSomethingResult * do_some_similar_things(); */ public async function do_some_similar_things(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions(); $args = InteractWithShared_do_some_similar_things_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "do_some_similar_things", $args); $currentseqid = $this->sendImplHelper($args, "do_some_similar_things", false); return await $this->genAwaitResponse(InteractWithShared_do_some_similar_things_result::class, "do_some_similar_things", false, $currentseqid, $rpc_options); } } class InteractWithSharedClient extends \ThriftClientBase implements InteractWithSharedClientIf { use InteractWithSharedClientBase; /** * Original thrift definition:- * shared.DoSomethingResult * do_some_similar_things(); */ public async function do_some_similar_things(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions(); $args = InteractWithShared_do_some_similar_things_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "do_some_similar_things", $args); $currentseqid = $this->sendImplHelper($args, "do_some_similar_things", false); return await $this->genAwaitResponse(InteractWithShared_do_some_similar_things_result::class, "do_some_similar_things", false, $currentseqid, $rpc_options); } /* send and recv functions */ public function send_do_some_similar_things(): int { $args = InteractWithShared_do_some_similar_things_args::withDefaultValues(); return $this->sendImplHelper($args, "do_some_similar_things", false); } public function recv_do_some_similar_things(?int $expectedsequenceid = null): DoSomethingResult { return $this->recvImplHelper(InteractWithShared_do_some_similar_things_result::class, "do_some_similar_things", false, $expectedsequenceid); } } // INTERACTION HANDLERS class InteractWithShared_MyInteraction extends \ThriftClientBase { private \InteractionId $interactionId; public function __construct(\TProtocol $input, ?\TProtocol $output = null, ?\IThriftMigrationAsyncChannel $channel = null)[leak_safe] { parent::__construct($input, $output, $channel); if ($this->channel_ is nonnull) { $this->interactionId = $this->channel_->createInteraction("MyInteraction"); } else { throw new \Exception("The channel must be nonnull to create interactions."); } } /** * Original thrift definition:- * i32 * frobnicate() * throws (1: CustomException ex); */ public async function frobnicate(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options = $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_MyInteraction_frobnicate_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "MyInteraction.frobnicate", $args); $currentseqid = $this->sendImpl_frobnicate(); return await $this->genAwaitResponse(InteractWithShared_MyInteraction_frobnicate_result::class, "frobnicate", false, $currentseqid, $rpc_options); } protected function sendImpl_frobnicate(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_MyInteraction_frobnicate_args::withDefaultValues(); try { $this->eventHandler_->preSend('MyInteraction.frobnicate', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'MyInteraction.frobnicate', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'MyInteraction.frobnicate', \TMessageType::CALL, $args, $currentseqid, false, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('MyInteraction.frobnicate', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('MyInteraction.frobnicate', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('MyInteraction.frobnicate', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('MyInteraction.frobnicate', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('MyInteraction.frobnicate', $args, $currentseqid); return $currentseqid; } /** * Original thrift definition:- * oneway void * ping(); */ public async function ping(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options = $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_MyInteraction_ping_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "MyInteraction.ping", $args); $currentseqid = $this->sendImpl_ping(); await $this->genAwaitNoResponse($rpc_options); } protected function sendImpl_ping(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_MyInteraction_ping_args::withDefaultValues(); try { $this->eventHandler_->preSend('MyInteraction.ping', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'MyInteraction.ping', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), true); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'MyInteraction.ping', \TMessageType::CALL, $args, $currentseqid, true, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('MyInteraction.ping', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->onewayFlush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('MyInteraction.ping', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('MyInteraction.ping', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('MyInteraction.ping', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('MyInteraction.ping', $args, $currentseqid); return $currentseqid; } /** * Original thrift definition:- * void, stream * truthify(); */ public async function truthify(): Awaitable<\ResponseAndStream> { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options = $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_MyInteraction_truthify_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "MyInteraction.truthify", $args); $currentseqid = $this->sendImpl_truthify(); return await $this->genAwaitStreamResponse(InteractWithShared_MyInteraction_truthify_FirstResponse::class, InteractWithShared_MyInteraction_truthify_StreamResponse::class, "truthify", true, $currentseqid, $rpc_options); } protected function sendImpl_truthify(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_MyInteraction_truthify_args::withDefaultValues(); try { $this->eventHandler_->preSend('MyInteraction.truthify', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'MyInteraction.truthify', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'MyInteraction.truthify', \TMessageType::CALL, $args, $currentseqid, false, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('MyInteraction.truthify', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('MyInteraction.truthify', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('MyInteraction.truthify', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('MyInteraction.truthify', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('MyInteraction.truthify', $args, $currentseqid); return $currentseqid; } /** * Original thrift definition:- * set, sink * encode(); */ public async function encode(): Awaitable<\ResponseAndClientSink, string, string>> { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_MyInteraction_encode_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "MyInteraction.encode", $args); $currentseqid = $this->sendImpl_encode(); return await $this->genAwaitSinkResponse(InteractWithShared_MyInteraction_encode_FirstResponse::class, InteractWithShared_MyInteraction_encode_SinkPayload::class, InteractWithShared_MyInteraction_encode_FinalResponse::class, "encode", false, $currentseqid, $rpc_options); } protected function sendImpl_encode(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_MyInteraction_encode_args::withDefaultValues(); try { $this->eventHandler_->preSend('MyInteraction.encode', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'MyInteraction.encode', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'MyInteraction.encode', \TMessageType::CALL, $args, $currentseqid, false, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('MyInteraction.encode', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('MyInteraction.encode', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('MyInteraction.encode', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('MyInteraction.encode', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('MyInteraction.encode', $args, $currentseqid); return $currentseqid; } } class InteractWithShared_SharedInteraction extends \ThriftClientBase { private \InteractionId $interactionId; public function __construct(\TProtocol $input, ?\TProtocol $output = null, ?\IThriftMigrationAsyncChannel $channel = null)[leak_safe] { parent::__construct($input, $output, $channel); if ($this->channel_ is nonnull) { $this->interactionId = $this->channel_->createInteraction("SharedInteraction"); } else { throw new \Exception("The channel must be nonnull to create interactions."); } } /** * Original thrift definition:- * i32 * init(); */ public async function init(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options = $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_SharedInteraction_init_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "SharedInteraction.init", $args); $currentseqid = $this->sendImpl_init(); return await $this->genAwaitResponse(InteractWithShared_SharedInteraction_init_result::class, "init", false, $currentseqid, $rpc_options); } protected function sendImpl_init(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_SharedInteraction_init_args::withDefaultValues(); try { $this->eventHandler_->preSend('SharedInteraction.init', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'SharedInteraction.init', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'SharedInteraction.init', \TMessageType::CALL, $args, $currentseqid, false, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('SharedInteraction.init', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('SharedInteraction.init', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('SharedInteraction.init', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('SharedInteraction.init', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('SharedInteraction.init', $args, $currentseqid); return $currentseqid; } /** * Original thrift definition:- * shared.DoSomethingResult * do_something(); */ public async function do_something(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options = $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_SharedInteraction_do_something_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "SharedInteraction.do_something", $args); $currentseqid = $this->sendImpl_do_something(); return await $this->genAwaitResponse(InteractWithShared_SharedInteraction_do_something_result::class, "do_something", false, $currentseqid, $rpc_options); } protected function sendImpl_do_something(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_SharedInteraction_do_something_args::withDefaultValues(); try { $this->eventHandler_->preSend('SharedInteraction.do_something', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'SharedInteraction.do_something', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'SharedInteraction.do_something', \TMessageType::CALL, $args, $currentseqid, false, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('SharedInteraction.do_something', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('SharedInteraction.do_something', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('SharedInteraction.do_something', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('SharedInteraction.do_something', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('SharedInteraction.do_something', $args, $currentseqid); return $currentseqid; } /** * Original thrift definition:- * void * tear_down(); */ public async function tear_down(): Awaitable { $hh_frame_metadata = $this->getHHFrameMetadata(); if ($hh_frame_metadata !== null) { \HH\set_frame_metadata($hh_frame_metadata); } $rpc_options = $this->getAndResetOptions() ?? new \RpcOptions(); $rpc_options = $rpc_options->setInteractionId($this->interactionId); $args = InteractWithShared_SharedInteraction_tear_down_args::withDefaultValues(); await $this->asyncHandler_->genBefore("InteractWithShared", "SharedInteraction.tear_down", $args); $currentseqid = $this->sendImpl_tear_down(); await $this->genAwaitResponse(InteractWithShared_SharedInteraction_tear_down_result::class, "tear_down", true, $currentseqid, $rpc_options); } protected function sendImpl_tear_down(): int { $currentseqid = $this->getNextSequenceID(); $args = InteractWithShared_SharedInteraction_tear_down_args::withDefaultValues(); try { $this->eventHandler_->preSend('SharedInteraction.tear_down', $args, $currentseqid); if ($this->output_ is \TBinaryProtocolAccelerated) { \thrift_protocol_write_binary($this->output_, 'SharedInteraction.tear_down', \TMessageType::CALL, $args, $currentseqid, $this->output_->isStrictWrite(), false); } else if ($this->output_ is \TCompactProtocolAccelerated) { \thrift_protocol_write_compact2($this->output_, 'SharedInteraction.tear_down', \TMessageType::CALL, $args, $currentseqid, false, \TCompactProtocolBase::VERSION); } else { $this->output_->writeMessageBegin('SharedInteraction.tear_down', \TMessageType::CALL, $currentseqid); $args->write($this->output_); $this->output_->writeMessageEnd(); $this->output_->getTransport()->flush(); } } catch (\THandlerShortCircuitException $ex) { switch ($ex->resultType) { case \THandlerShortCircuitException::R_EXPECTED_EX: case \THandlerShortCircuitException::R_UNEXPECTED_EX: $this->eventHandler_->sendError('SharedInteraction.tear_down', $args, $currentseqid, $ex->result); throw $ex->result; case \THandlerShortCircuitException::R_SUCCESS: default: $this->eventHandler_->postSend('SharedInteraction.tear_down', $args, $currentseqid); return $currentseqid; } } catch (\Exception $ex) { $this->eventHandler_->sendError('SharedInteraction.tear_down', $args, $currentseqid, $ex); throw $ex; } $this->eventHandler_->postSend('SharedInteraction.tear_down', $args, $currentseqid); return $currentseqid; } } // HELPER FUNCTIONS AND STRUCTURES class InteractWithShared_do_some_similar_things_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_do_some_similar_things_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.do_some_similar_things_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_do_some_similar_things_result extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = DoSomethingResult; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::STRUCT, 'class' => DoSomethingResult::class, ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 1665402448780378721; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_do_some_similar_things_result'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_do_some_similar_things_result", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_struct" => tmeta_ThriftStructType::fromShape( shape( "name" => "shared.DoSomethingResult", ) ), ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_frobnicate_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_frobnicate_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.frobnicate_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_frobnicate_result extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = int; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::I32, ), 1 => shape( 'var' => 'ex', 'type' => \TType::STRUCT, 'class' => CustomException::class, ), ]; const dict FIELDMAP = dict[ 'success' => 0, 'ex' => 1, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ?'ex' => ?CustomException, ); const int STRUCTURAL_ID = 7122595353333880010; public ?this::TResult $success; public ?CustomException $ex; public function __construct(?this::TResult $success = null, ?CustomException $ex = null)[] { $this->success = $success; $this->ex = $ex; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), Shapes::idx($shape, 'ex'), ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_frobnicate_result'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_MyInteraction_frobnicate_result", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE, ) ), "name" => "success", ) ), tmeta_ThriftField::fromShape( shape( "id" => 1, "type" => tmeta_ThriftType::fromShape( shape( "t_struct" => tmeta_ThriftStructType::fromShape( shape( "name" => "module.CustomException", ) ), ) ), "name" => "ex", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } public function checkForException(): ?\TException { if ($this->ex !== null) { return $this->ex; } return null; } public function setException(\TException $e): bool { if ($e is CustomException) { $this->ex = $e; return true; } return false; } } class InteractWithShared_MyInteraction_ping_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_ping_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.ping_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_truthify_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_truthify_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.truthify_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_truthify_StreamResponse extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = bool; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::BOOL, ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 8594383818423018844; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_truthify_StreamResponse'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_MyInteraction_truthify_StreamResponse", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_BOOL_TYPE, ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_truthify_FirstResponse extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_truthify_FirstResponse'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_MyInteraction_truthify_FirstResponse", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_encode_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_encode_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.encode_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_encode_FirstResponse extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = Set; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::SET, 'etype' => \TType::I32, 'elem' => shape( 'type' => \TType::I32, ), 'format' => 'collection', ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 5594803499509360192; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_encode_FirstResponse'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_MyInteraction_encode_FirstResponse", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_set" => tmeta_ThriftSetType::fromShape( shape( "valueType" => tmeta_ThriftType::fromShape( shape( "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE, ) ), ) ), ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_encode_SinkPayload extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = string; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::STRING, ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 1365128170602685579; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_encode_SinkPayload'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_MyInteraction_encode_SinkPayload", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_MyInteraction_encode_FinalResponse extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = string; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::STRING, 'is_binary' => true, ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 1365128170602685579; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_MyInteraction_encode_FinalResponse'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_MyInteraction_encode_FinalResponse", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_BINARY_TYPE, ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_SharedInteraction_init_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_SharedInteraction_init_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "shared.init_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_SharedInteraction_init_result extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = int; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::I32, ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 3865318819874171525; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_SharedInteraction_init_result'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_SharedInteraction_init_result", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE, ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_SharedInteraction_do_something_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_SharedInteraction_do_something_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "shared.do_something_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_SharedInteraction_do_something_result extends \ThriftSyncStructWithResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const type TResult = DoSomethingResult; const \ThriftStructTypes::TSpec SPEC = dict[ 0 => shape( 'var' => 'success', 'type' => \TType::STRUCT, 'class' => DoSomethingResult::class, ), ]; const dict FIELDMAP = dict[ 'success' => 0, ]; const type TConstructorShape = shape( ?'success' => ?this::TResult, ); const int STRUCTURAL_ID = 1665402448780378721; public ?this::TResult $success; public function __construct(?this::TResult $success = null)[] { $this->success = $success; } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( Shapes::idx($shape, 'success'), ); } public function getName()[]: string { return 'InteractWithShared_SharedInteraction_do_something_result'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_SharedInteraction_do_something_result", "fields" => vec[ tmeta_ThriftField::fromShape( shape( "id" => 0, "type" => tmeta_ThriftType::fromShape( shape( "t_struct" => tmeta_ThriftStructType::fromShape( shape( "name" => "shared.DoSomethingResult", ) ), ) ), "name" => "success", ) ), ], "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_SharedInteraction_tear_down_args implements \IThriftSyncStruct, \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_SharedInteraction_tear_down_args'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "shared.tear_down_args", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithShared_SharedInteraction_tear_down_result extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata { use \ThriftSerializationTrait; const \ThriftStructTypes::TSpec SPEC = dict[ ]; const dict FIELDMAP = dict[ ]; const type TConstructorShape = shape( ); const int STRUCTURAL_ID = 957977401221134810; public function __construct()[] { } public static function withDefaultValues()[]: this { return new static(); } public static function fromShape(self::TConstructorShape $shape)[]: this { return new static( ); } public function getName()[]: string { return 'InteractWithShared_SharedInteraction_tear_down_result'; } public static function getStructMetadata()[]: \tmeta_ThriftStruct { return tmeta_ThriftStruct::fromShape( shape( "name" => "module.InteractWithShared_SharedInteraction_tear_down_result", "is_union" => false, ) ); } public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations { return shape( 'struct' => dict[], 'fields' => dict[ ], ); } public function getInstanceKey()[write_props]: string { return \TCompactSerializer::serialize($this); } } class InteractWithSharedStaticMetadata implements \IThriftServiceStaticMetadata { public static function getServiceMetadata()[]: \tmeta_ThriftService { return tmeta_ThriftService::fromShape( shape( "name" => "module.InteractWithShared", "functions" => vec[ tmeta_ThriftFunction::fromShape( shape( "name" => "do_some_similar_things", "return_type" => tmeta_ThriftType::fromShape( shape( "t_struct" => tmeta_ThriftStructType::fromShape( shape( "name" => "shared.DoSomethingResult", ) ), ) ), ) ), ], ) ); } public static function getServiceMetadataResponse()[]: \tmeta_ThriftServiceMetadataResponse { return \tmeta_ThriftServiceMetadataResponse::fromShape( shape( 'context' => \tmeta_ThriftServiceContext::fromShape( shape( 'service_info' => self::getServiceMetadata(), 'module' => \tmeta_ThriftModuleContext::fromShape( shape( 'name' => 'module', ) ), ) ), 'metadata' => \tmeta_ThriftMetadata::fromShape( shape( 'enums' => dict[ ], 'structs' => dict[ 'shared.DoSomethingResult' => DoSomethingResult::getStructMetadata(), ], 'exceptions' => dict[ ], 'services' => dict[ ], ) ), ) ); } public static function getAllStructuredAnnotations()[write_props]: \TServiceAnnotations { return shape( 'service' => dict[], 'functions' => dict[ ], ); } }