<?hh
/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */

/**
 * Original thrift service:-
 * NestedContainers
 */
interface NestedContainersAsyncIf extends \IThriftAsyncIf {
  /**
   * Original thrift definition:-
   * void
   *   mapList(1: map<i32, list<i32>> foo);
   */
  public function mapList(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   mapSet(1: map<i32, set<i32>> foo);
   */
  public function mapSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   listMap(1: list<map<i32, i32>> foo);
   */
  public function listMap(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   listSet(1: list<set<i32>> foo);
   */
  public function listSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   turtles(1: list<list<map<i32, map<i32, set<i32>>>>> foo);
   */
  public function turtles(KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, Set<int>>>>> $foo): Awaitable<void>;
}

/**
 * Original thrift service:-
 * NestedContainers
 */
interface NestedContainersIf extends \IThriftSyncIf {
  /**
   * Original thrift definition:-
   * void
   *   mapList(1: map<i32, list<i32>> foo);
   */
  public function mapList(KeyedContainer<int, KeyedContainer<int, int>> $foo): void;

  /**
   * Original thrift definition:-
   * void
   *   mapSet(1: map<i32, set<i32>> foo);
   */
  public function mapSet(KeyedContainer<int, Set<int>> $foo): void;

  /**
   * Original thrift definition:-
   * void
   *   listMap(1: list<map<i32, i32>> foo);
   */
  public function listMap(KeyedContainer<int, KeyedContainer<int, int>> $foo): void;

  /**
   * Original thrift definition:-
   * void
   *   listSet(1: list<set<i32>> foo);
   */
  public function listSet(KeyedContainer<int, Set<int>> $foo): void;

  /**
   * Original thrift definition:-
   * void
   *   turtles(1: list<list<map<i32, map<i32, set<i32>>>>> foo);
   */
  public function turtles(KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, Set<int>>>>> $foo): void;
}

/**
 * Original thrift service:-
 * NestedContainers
 */
interface NestedContainersAsyncClientIf extends NestedContainersAsyncIf {
}

/**
 * Original thrift service:-
 * NestedContainers
 */
interface NestedContainersClientIf extends \IThriftSyncIf {
  /**
   * Original thrift definition:-
   * void
   *   mapList(1: map<i32, list<i32>> foo);
   */
  public function mapList(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   mapSet(1: map<i32, set<i32>> foo);
   */
  public function mapSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   listMap(1: list<map<i32, i32>> foo);
   */
  public function listMap(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   listSet(1: list<set<i32>> foo);
   */
  public function listSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void>;

  /**
   * Original thrift definition:-
   * void
   *   turtles(1: list<list<map<i32, map<i32, set<i32>>>>> foo);
   */
  public function turtles(KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, Set<int>>>>> $foo): Awaitable<void>;
}

/**
 * Original thrift service:-
 * NestedContainers
 */
trait NestedContainersClientBase {
  require extends \ThriftClientBase;

}

class NestedContainersAsyncClient extends \ThriftClientBase implements NestedContainersAsyncClientIf {
  use NestedContainersClientBase;

  /**
   * Original thrift definition:-
   * void
   *   mapList(1: map<i32, list<i32>> foo);
   */
  public async function mapList(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_mapList_args::fromShape(shape(
      'foo' => (new Map($foo))->map(
        $_val0 ==> new Vector($_val0)
      ),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "mapList", $args);
    $currentseqid = $this->sendImplHelper($args, "mapList", false);
    await $this->genAwaitResponse(NestedContainers_mapList_result::class, "mapList", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   mapSet(1: map<i32, set<i32>> foo);
   */
  public async function mapSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_mapSet_args::fromShape(shape(
      'foo' => new Map($foo),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "mapSet", $args);
    $currentseqid = $this->sendImplHelper($args, "mapSet", false);
    await $this->genAwaitResponse(NestedContainers_mapSet_result::class, "mapSet", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   listMap(1: list<map<i32, i32>> foo);
   */
  public async function listMap(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_listMap_args::fromShape(shape(
      'foo' => (new Vector($foo))->map(
        $_val0 ==> new Map($_val0)
      ),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "listMap", $args);
    $currentseqid = $this->sendImplHelper($args, "listMap", false);
    await $this->genAwaitResponse(NestedContainers_listMap_result::class, "listMap", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   listSet(1: list<set<i32>> foo);
   */
  public async function listSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_listSet_args::fromShape(shape(
      'foo' => new Vector($foo),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "listSet", $args);
    $currentseqid = $this->sendImplHelper($args, "listSet", false);
    await $this->genAwaitResponse(NestedContainers_listSet_result::class, "listSet", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   turtles(1: list<list<map<i32, map<i32, set<i32>>>>> foo);
   */
  public async function turtles(KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, Set<int>>>>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_turtles_args::fromShape(shape(
      'foo' => (new Vector($foo))->map(
        $_val0 ==> (new Vector($_val0))->map(
          $_val1 ==> (new Map($_val1))->map(
            $_val2 ==> new Map($_val2)
          )
        )
      ),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "turtles", $args);
    $currentseqid = $this->sendImplHelper($args, "turtles", false);
    await $this->genAwaitResponse(NestedContainers_turtles_result::class, "turtles", true, $currentseqid, $rpc_options);
  }

}

class NestedContainersClient extends \ThriftClientBase implements NestedContainersClientIf {
  use NestedContainersClientBase;

  /**
   * Original thrift definition:-
   * void
   *   mapList(1: map<i32, list<i32>> foo);
   */
  public async function mapList(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_mapList_args::fromShape(shape(
      'foo' => (new Map($foo))->map(
        $_val0 ==> new Vector($_val0)
      ),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "mapList", $args);
    $currentseqid = $this->sendImplHelper($args, "mapList", false);
    await $this->genAwaitResponse(NestedContainers_mapList_result::class, "mapList", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   mapSet(1: map<i32, set<i32>> foo);
   */
  public async function mapSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_mapSet_args::fromShape(shape(
      'foo' => new Map($foo),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "mapSet", $args);
    $currentseqid = $this->sendImplHelper($args, "mapSet", false);
    await $this->genAwaitResponse(NestedContainers_mapSet_result::class, "mapSet", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   listMap(1: list<map<i32, i32>> foo);
   */
  public async function listMap(KeyedContainer<int, KeyedContainer<int, int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_listMap_args::fromShape(shape(
      'foo' => (new Vector($foo))->map(
        $_val0 ==> new Map($_val0)
      ),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "listMap", $args);
    $currentseqid = $this->sendImplHelper($args, "listMap", false);
    await $this->genAwaitResponse(NestedContainers_listMap_result::class, "listMap", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   listSet(1: list<set<i32>> foo);
   */
  public async function listSet(KeyedContainer<int, Set<int>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_listSet_args::fromShape(shape(
      'foo' => new Vector($foo),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "listSet", $args);
    $currentseqid = $this->sendImplHelper($args, "listSet", false);
    await $this->genAwaitResponse(NestedContainers_listSet_result::class, "listSet", true, $currentseqid, $rpc_options);
  }

  /**
   * Original thrift definition:-
   * void
   *   turtles(1: list<list<map<i32, map<i32, set<i32>>>>> foo);
   */
  public async function turtles(KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, Set<int>>>>> $foo): Awaitable<void> {
    $hh_frame_metadata = $this->getHHFrameMetadata();
    if ($hh_frame_metadata !== null) {
      \HH\set_frame_metadata($hh_frame_metadata);
    }
    $rpc_options = $this->getAndResetOptions() ?? \ThriftClientBase::defaultOptions();
    $args = NestedContainers_turtles_args::fromShape(shape(
      'foo' => (new Vector($foo))->map(
        $_val0 ==> (new Vector($_val0))->map(
          $_val1 ==> (new Map($_val1))->map(
            $_val2 ==> new Map($_val2)
          )
        )
      ),
    ));
    await $this->asyncHandler_->genBefore("NestedContainers", "turtles", $args);
    $currentseqid = $this->sendImplHelper($args, "turtles", false);
    await $this->genAwaitResponse(NestedContainers_turtles_result::class, "turtles", true, $currentseqid, $rpc_options);
  }

  /* send and recv functions */
  public function send_mapList(KeyedContainer<int, KeyedContainer<int, int>> $foo): int {
    $args = NestedContainers_mapList_args::fromShape(shape(
      'foo' => (new Map($foo))->map(
        $_val0 ==> new Vector($_val0)
      ),
    ));
    return $this->sendImplHelper($args, "mapList", false);
  }
  public function recv_mapList(?int $expectedsequenceid = null): void {
    $this->recvImplHelper(NestedContainers_mapList_result::class, "mapList", true, $expectedsequenceid);
  }
  public function send_mapSet(KeyedContainer<int, Set<int>> $foo): int {
    $args = NestedContainers_mapSet_args::fromShape(shape(
      'foo' => new Map($foo),
    ));
    return $this->sendImplHelper($args, "mapSet", false);
  }
  public function recv_mapSet(?int $expectedsequenceid = null): void {
    $this->recvImplHelper(NestedContainers_mapSet_result::class, "mapSet", true, $expectedsequenceid);
  }
  public function send_listMap(KeyedContainer<int, KeyedContainer<int, int>> $foo): int {
    $args = NestedContainers_listMap_args::fromShape(shape(
      'foo' => (new Vector($foo))->map(
        $_val0 ==> new Map($_val0)
      ),
    ));
    return $this->sendImplHelper($args, "listMap", false);
  }
  public function recv_listMap(?int $expectedsequenceid = null): void {
    $this->recvImplHelper(NestedContainers_listMap_result::class, "listMap", true, $expectedsequenceid);
  }
  public function send_listSet(KeyedContainer<int, Set<int>> $foo): int {
    $args = NestedContainers_listSet_args::fromShape(shape(
      'foo' => new Vector($foo),
    ));
    return $this->sendImplHelper($args, "listSet", false);
  }
  public function recv_listSet(?int $expectedsequenceid = null): void {
    $this->recvImplHelper(NestedContainers_listSet_result::class, "listSet", true, $expectedsequenceid);
  }
  public function send_turtles(KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, KeyedContainer<int, Set<int>>>>> $foo): int {
    $args = NestedContainers_turtles_args::fromShape(shape(
      'foo' => (new Vector($foo))->map(
        $_val0 ==> (new Vector($_val0))->map(
          $_val1 ==> (new Map($_val1))->map(
            $_val2 ==> new Map($_val2)
          )
        )
      ),
    ));
    return $this->sendImplHelper($args, "turtles", false);
  }
  public function recv_turtles(?int $expectedsequenceid = null): void {
    $this->recvImplHelper(NestedContainers_turtles_result::class, "turtles", true, $expectedsequenceid);
  }
}

abstract class NestedContainersAsyncProcessorBase extends \ThriftAsyncProcessor {
  abstract const type TThriftIf as NestedContainersAsyncIf;
  const classname<\IThriftServiceStaticMetadata> SERVICE_METADATA_CLASS = NestedContainersStaticMetadata::class;
  const string THRIFT_SVC_NAME = 'NestedContainers';

  protected async function process_mapList(int $seqid, \TProtocol $input, \TProtocol $output): Awaitable<void> {
    $handler_ctx = $this->eventHandler_->getHandlerContext('mapList');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'mapList', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_mapList_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_mapList_args');
    } else {
      $args = NestedContainers_mapList_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'mapList', $args);
    $result = NestedContainers_mapList_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'mapList', $args);
      await $this->handler->mapList($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'mapList', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'mapList', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'mapList', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'mapList', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'mapList', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("mapList", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'mapList', $result);
  }
  protected async function process_mapSet(int $seqid, \TProtocol $input, \TProtocol $output): Awaitable<void> {
    $handler_ctx = $this->eventHandler_->getHandlerContext('mapSet');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'mapSet', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_mapSet_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_mapSet_args');
    } else {
      $args = NestedContainers_mapSet_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'mapSet', $args);
    $result = NestedContainers_mapSet_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'mapSet', $args);
      await $this->handler->mapSet($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'mapSet', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'mapSet', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'mapSet', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'mapSet', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'mapSet', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("mapSet", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'mapSet', $result);
  }
  protected async function process_listMap(int $seqid, \TProtocol $input, \TProtocol $output): Awaitable<void> {
    $handler_ctx = $this->eventHandler_->getHandlerContext('listMap');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'listMap', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_listMap_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_listMap_args');
    } else {
      $args = NestedContainers_listMap_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'listMap', $args);
    $result = NestedContainers_listMap_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'listMap', $args);
      await $this->handler->listMap($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'listMap', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'listMap', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'listMap', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'listMap', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'listMap', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("listMap", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'listMap', $result);
  }
  protected async function process_listSet(int $seqid, \TProtocol $input, \TProtocol $output): Awaitable<void> {
    $handler_ctx = $this->eventHandler_->getHandlerContext('listSet');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'listSet', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_listSet_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_listSet_args');
    } else {
      $args = NestedContainers_listSet_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'listSet', $args);
    $result = NestedContainers_listSet_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'listSet', $args);
      await $this->handler->listSet($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'listSet', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'listSet', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'listSet', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'listSet', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'listSet', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("listSet", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'listSet', $result);
  }
  protected async function process_turtles(int $seqid, \TProtocol $input, \TProtocol $output): Awaitable<void> {
    $handler_ctx = $this->eventHandler_->getHandlerContext('turtles');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'turtles', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_turtles_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_turtles_args');
    } else {
      $args = NestedContainers_turtles_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'turtles', $args);
    $result = NestedContainers_turtles_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'turtles', $args);
      await $this->handler->turtles($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'turtles', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'turtles', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'turtles', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'turtles', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'turtles', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("turtles", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'turtles', $result);
  }
  protected async function process_getThriftServiceMetadata(int $seqid, \TProtocol $input, \TProtocol $output): Awaitable<void> {
    $reply_type = \TMessageType::REPLY;

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, '\tmeta_ThriftMetadataService_getThriftServiceMetadata_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, '\tmeta_ThriftMetadataService_getThriftServiceMetadata_args');
    } else {
      $args = \tmeta_ThriftMetadataService_getThriftServiceMetadata_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $result = \tmeta_ThriftMetadataService_getThriftServiceMetadata_result::withDefaultValues();
    try {
      $result->success = NestedContainersStaticMetadata::getServiceMetadataResponse();
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'getThriftServiceMetadata', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'getThriftServiceMetadata', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("getThriftServiceMetadata", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
  }
}
class NestedContainersAsyncProcessor extends NestedContainersAsyncProcessorBase {
  const type TThriftIf = NestedContainersAsyncIf;
}

abstract class NestedContainersSyncProcessorBase extends \ThriftSyncProcessor {
  abstract const type TThriftIf as NestedContainersIf;
  const classname<\IThriftServiceStaticMetadata> SERVICE_METADATA_CLASS = NestedContainersStaticMetadata::class;
  const string THRIFT_SVC_NAME = 'NestedContainers';

  protected function process_mapList(int $seqid, \TProtocol $input, \TProtocol $output): void {
    $handler_ctx = $this->eventHandler_->getHandlerContext('mapList');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'mapList', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_mapList_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_mapList_args');
    } else {
      $args = NestedContainers_mapList_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'mapList', $args);
    $result = NestedContainers_mapList_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'mapList', $args);
      $this->handler->mapList($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'mapList', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'mapList', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'mapList', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'mapList', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'mapList', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("mapList", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'mapList', $result);
  }
  protected function process_mapSet(int $seqid, \TProtocol $input, \TProtocol $output): void {
    $handler_ctx = $this->eventHandler_->getHandlerContext('mapSet');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'mapSet', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_mapSet_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_mapSet_args');
    } else {
      $args = NestedContainers_mapSet_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'mapSet', $args);
    $result = NestedContainers_mapSet_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'mapSet', $args);
      $this->handler->mapSet($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'mapSet', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'mapSet', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'mapSet', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'mapSet', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'mapSet', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("mapSet", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'mapSet', $result);
  }
  protected function process_listMap(int $seqid, \TProtocol $input, \TProtocol $output): void {
    $handler_ctx = $this->eventHandler_->getHandlerContext('listMap');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'listMap', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_listMap_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_listMap_args');
    } else {
      $args = NestedContainers_listMap_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'listMap', $args);
    $result = NestedContainers_listMap_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'listMap', $args);
      $this->handler->listMap($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'listMap', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'listMap', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'listMap', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'listMap', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'listMap', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("listMap", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'listMap', $result);
  }
  protected function process_listSet(int $seqid, \TProtocol $input, \TProtocol $output): void {
    $handler_ctx = $this->eventHandler_->getHandlerContext('listSet');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'listSet', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_listSet_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_listSet_args');
    } else {
      $args = NestedContainers_listSet_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'listSet', $args);
    $result = NestedContainers_listSet_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'listSet', $args);
      $this->handler->listSet($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'listSet', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'listSet', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'listSet', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'listSet', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'listSet', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("listSet", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'listSet', $result);
  }
  protected function process_turtles(int $seqid, \TProtocol $input, \TProtocol $output): void {
    $handler_ctx = $this->eventHandler_->getHandlerContext('turtles');
    $reply_type = \TMessageType::REPLY;

    $this->eventHandler_->preRead($handler_ctx, 'turtles', dict[]);

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, 'NestedContainers_turtles_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, 'NestedContainers_turtles_args');
    } else {
      $args = NestedContainers_turtles_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $this->eventHandler_->postRead($handler_ctx, 'turtles', $args);
    $result = NestedContainers_turtles_result::withDefaultValues();
    try {
      $this->eventHandler_->preExec($handler_ctx, 'NestedContainers', 'turtles', $args);
      $this->handler->turtles($args->foo);
      $this->eventHandler_->postExec($handler_ctx, 'turtles', $result);
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $this->eventHandler_->handlerError($handler_ctx, 'turtles', $ex);
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    $this->eventHandler_->preWrite($handler_ctx, 'turtles', $result);
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'turtles', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'turtles', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("turtles", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
    $this->eventHandler_->postWrite($handler_ctx, 'turtles', $result);
  }
  protected function process_getThriftServiceMetadata(int $seqid, \TProtocol $input, \TProtocol $output): void {
    $reply_type = \TMessageType::REPLY;

    if ($input is \TBinaryProtocolAccelerated) {
      $args = \thrift_protocol_read_binary_struct($input, '\tmeta_ThriftMetadataService_getThriftServiceMetadata_args');
    } else if ($input is \TCompactProtocolAccelerated) {
      $args = \thrift_protocol_read_compact_struct($input, '\tmeta_ThriftMetadataService_getThriftServiceMetadata_args');
    } else {
      $args = \tmeta_ThriftMetadataService_getThriftServiceMetadata_args::withDefaultValues();
      $args->read($input);
    }
    $input->readMessageEnd();
    $result = \tmeta_ThriftMetadataService_getThriftServiceMetadata_result::withDefaultValues();
    try {
      $result->success = NestedContainersStaticMetadata::getServiceMetadataResponse();
    } catch (\Exception $ex) {
      $reply_type = \TMessageType::EXCEPTION;
      $result = new \TApplicationException($ex->getMessage()."\n".$ex->getTraceAsString());
    }
    if ($output is \TBinaryProtocolAccelerated)
    {
      \thrift_protocol_write_binary($output, 'getThriftServiceMetadata', $reply_type, $result, $seqid, $output->isStrictWrite());
    }
    else if ($output is \TCompactProtocolAccelerated)
    {
      \thrift_protocol_write_compact2($output, 'getThriftServiceMetadata', $reply_type, $result, $seqid, false, \TCompactProtocolBase::VERSION);
    }
    else
    {
      $output->writeMessageBegin("getThriftServiceMetadata", $reply_type, $seqid);
      $result->write($output);
      $output->writeMessageEnd();
      $output->getTransport()->flush();
    }
  }
}
class NestedContainersSyncProcessor extends NestedContainersSyncProcessorBase {
  const type TThriftIf = NestedContainersIf;
}
// For backwards compatibility
class NestedContainersProcessor extends NestedContainersSyncProcessor {}

// HELPER FUNCTIONS AND STRUCTURES

class NestedContainers_mapList_args implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'foo',
      'type' => \TType::MAP,
      'ktype' => \TType::I32,
      'vtype' => \TType::LST,
      'key' => shape(
        'type' => \TType::I32,
      ),
      'val' => shape(
        'type' => \TType::LST,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'foo' => 1,
  ];

  const type TConstructorShape = shape(
    ?'foo' => ?Map<int, Vector<int>>,
  );

  const type TShape = shape(
    'foo' => dict<int, vec<int>>,
    ...
  );
  const int STRUCTURAL_ID = 860610040470759468;
  public Map<int, Vector<int>> $foo;

  public function __construct(?Map<int, Vector<int>> $foo = null)[] {
    $this->foo = $foo ?? Map {};
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'foo'),
    );
  }

  public function getName()[]: string {
    return 'NestedContainers_mapList_args';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.mapList_args",
        "fields" => vec[
          tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                      "valueType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_list" => tmeta_ThriftListType::fromShape(
                            shape(
                              "valueType" => tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "foo",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[],
      'fields' => dict[
      ],
    );
  }

  public static function __fromShape(self::TShape $shape)[]: this {
    return new static(
      $shape['foo']
        |> Dict\map(
          $$,
          $_val0 ==> $_val0 |> new Vector($$),
        ) |> new Map($$),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'foo' => $this->foo->map(
        ($_val0) ==> vec($_val0),
      )
        |> dict($$),
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

class NestedContainers_mapList_result extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> 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 'NestedContainers_mapList_result';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.NestedContainers_mapList_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 NestedContainers_mapSet_args implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'foo',
      'type' => \TType::MAP,
      'ktype' => \TType::I32,
      'vtype' => \TType::SET,
      'key' => shape(
        'type' => \TType::I32,
      ),
      'val' => shape(
        'type' => \TType::SET,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'foo' => 1,
  ];

  const type TConstructorShape = shape(
    ?'foo' => ?Map<int, Set<int>>,
  );

  const type TShape = shape(
    'foo' => dict<int, dict<int, bool>>,
    ...
  );
  const int STRUCTURAL_ID = 860610040470759468;
  public Map<int, Set<int>> $foo;

  public function __construct(?Map<int, Set<int>> $foo = null)[] {
    $this->foo = $foo ?? Map {};
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'foo'),
    );
  }

  public function getName()[]: string {
    return 'NestedContainers_mapSet_args';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.mapSet_args",
        "fields" => vec[
          tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                      "valueType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_set" => tmeta_ThriftSetType::fromShape(
                            shape(
                              "valueType" => tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "foo",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[],
      'fields' => dict[
      ],
    );
  }

  public static function __fromShape(self::TShape $shape)[]: this {
    return new static(
      $shape['foo']
        |> Dict\map(
          $$,
          $_val0 ==> $_val0
            |> new Set(Keyset\keys($$)),
        ) |> new Map($$),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'foo' => $this->foo->map(
        ($_val0) ==> ThriftUtil::toDArray(Dict\fill_keys($_val0, true), static::class),
      )
        |> dict($$),
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

class NestedContainers_mapSet_result extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> 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 'NestedContainers_mapSet_result';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.NestedContainers_mapSet_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 NestedContainers_listMap_args implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'foo',
      'type' => \TType::LST,
      'etype' => \TType::MAP,
      'elem' => shape(
        'type' => \TType::MAP,
        'ktype' => \TType::I32,
        'vtype' => \TType::I32,
        'key' => shape(
          'type' => \TType::I32,
        ),
        'val' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'foo' => 1,
  ];

  const type TConstructorShape = shape(
    ?'foo' => ?Vector<Map<int, int>>,
  );

  const type TShape = shape(
    'foo' => vec<dict<int, int>>,
    ...
  );
  const int STRUCTURAL_ID = 860610040470759468;
  public Vector<Map<int, int>> $foo;

  public function __construct(?Vector<Map<int, int>> $foo = null)[] {
    $this->foo = $foo ?? Vector {};
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'foo'),
    );
  }

  public function getName()[]: string {
    return 'NestedContainers_listMap_args';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.listMap_args",
        "fields" => vec[
          tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_map" => tmeta_ThriftMapType::fromShape(
                            shape(
                              "keyType" => tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                )
                              ),
                              "valueType" => tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "foo",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[],
      'fields' => dict[
      ],
    );
  }

  public static function __fromShape(self::TShape $shape)[]: this {
    return new static(
      $shape['foo']
        |> Vec\map(
          $$,
          $_val0 ==> $_val0 |> new Map($$),
        ) |> new Vector($$),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'foo' => $this->foo->map(
        ($_val0) ==> dict($_val0),
      )
        |> vec($$),
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

class NestedContainers_listMap_result extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> 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 'NestedContainers_listMap_result';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.NestedContainers_listMap_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 NestedContainers_listSet_args implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'foo',
      'type' => \TType::LST,
      'etype' => \TType::SET,
      'elem' => shape(
        'type' => \TType::SET,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'foo' => 1,
  ];

  const type TConstructorShape = shape(
    ?'foo' => ?Vector<Set<int>>,
  );

  const type TShape = shape(
    'foo' => vec<dict<int, bool>>,
    ...
  );
  const int STRUCTURAL_ID = 860610040470759468;
  public Vector<Set<int>> $foo;

  public function __construct(?Vector<Set<int>> $foo = null)[] {
    $this->foo = $foo ?? Vector {};
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'foo'),
    );
  }

  public function getName()[]: string {
    return 'NestedContainers_listSet_args';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.listSet_args",
        "fields" => vec[
          tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_set" => tmeta_ThriftSetType::fromShape(
                            shape(
                              "valueType" => tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "foo",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[],
      'fields' => dict[
      ],
    );
  }

  public static function __fromShape(self::TShape $shape)[]: this {
    return new static(
      $shape['foo']
        |> Vec\map(
          $$,
          $_val0 ==> $_val0
            |> new Set(Keyset\keys($$)),
        ) |> new Vector($$),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'foo' => $this->foo->map(
        ($_val0) ==> ThriftUtil::toDArray(Dict\fill_keys($_val0, true), static::class),
      )
        |> vec($$),
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

class NestedContainers_listSet_result extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> 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 'NestedContainers_listSet_result';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.NestedContainers_listSet_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 NestedContainers_turtles_args implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'foo',
      'type' => \TType::LST,
      'etype' => \TType::LST,
      'elem' => shape(
        'type' => \TType::LST,
        'etype' => \TType::MAP,
        'elem' => shape(
          'type' => \TType::MAP,
          'ktype' => \TType::I32,
          'vtype' => \TType::MAP,
          'key' => shape(
            'type' => \TType::I32,
          ),
          'val' => shape(
            'type' => \TType::MAP,
            'ktype' => \TType::I32,
            'vtype' => \TType::SET,
            'key' => shape(
              'type' => \TType::I32,
            ),
            'val' => shape(
              'type' => \TType::SET,
              'etype' => \TType::I32,
              'elem' => \HH\FIXME\UNSAFE_CAST<mixed, \HH_FIXME\NON_DENOTABLE_TYPE>(shape(
                'type' => \TType::I32,
              )),
              'format' => 'collection',
            ),
            'format' => 'collection',
          ),
          'format' => 'collection',
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'foo' => 1,
  ];

  const type TConstructorShape = shape(
    ?'foo' => ?Vector<Vector<Map<int, Map<int, Set<int>>>>>,
  );

  const type TShape = shape(
    'foo' => vec<vec<dict<int, dict<int, dict<int, bool>>>>>,
    ...
  );
  const int STRUCTURAL_ID = 860610040470759468;
  public Vector<Vector<Map<int, Map<int, Set<int>>>>> $foo;

  public function __construct(?Vector<Vector<Map<int, Map<int, Set<int>>>>> $foo = null)[] {
    $this->foo = $foo ?? Vector {};
  }

  public static function withDefaultValues()[]: this {
    return new static();
  }

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'foo'),
    );
  }

  public function getName()[]: string {
    return 'NestedContainers_turtles_args';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.turtles_args",
        "fields" => vec[
          tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => tmeta_ThriftType::fromShape(
                        shape(
                          "t_list" => tmeta_ThriftListType::fromShape(
                            shape(
                              "valueType" => tmeta_ThriftType::fromShape(
                                shape(
                                  "t_map" => tmeta_ThriftMapType::fromShape(
                                    shape(
                                      "keyType" => tmeta_ThriftType::fromShape(
                                        shape(
                                          "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                        )
                                      ),
                                      "valueType" => tmeta_ThriftType::fromShape(
                                        shape(
                                          "t_map" => tmeta_ThriftMapType::fromShape(
                                            shape(
                                              "keyType" => tmeta_ThriftType::fromShape(
                                                shape(
                                                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                                )
                                              ),
                                              "valueType" => tmeta_ThriftType::fromShape(
                                                shape(
                                                  "t_set" => tmeta_ThriftSetType::fromShape(
                                                    shape(
                                                      "valueType" => tmeta_ThriftType::fromShape(
                                                        shape(
                                                          "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                                        )
                                                      ),
                                                    )
                                                  ),
                                                )
                                              ),
                                            )
                                          ),
                                        )
                                      ),
                                    )
                                  ),
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "foo",
            )
          ),
        ],
        "is_union" => false,
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TStructAnnotations {
    return shape(
      'struct' => dict[],
      'fields' => dict[
      ],
    );
  }

  public static function __fromShape(self::TShape $shape)[]: this {
    return new static(
      $shape['foo']
        |> Vec\map(
          $$,
          $_val3 ==> $_val3
            |> Vec\map(
              $$,
              $_val2 ==> $_val2
                |> Dict\map(
                  $$,
                  $_val1 ==> $_val1
                    |> Dict\map(
                      $$,
                      $_val0 ==> $_val0
                        |> new Set(Keyset\keys($$)),
                    ) |> new Map($$),
                ) |> new Map($$),
            ) |> new Vector($$),
        ) |> new Vector($$),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'foo' => $this->foo->map(
        ($_val0) ==> $_val0->map(
          ($_val1) ==> $_val1->map(
            ($_val2) ==> $_val2->map(
              ($_val3) ==> ThriftUtil::toDArray(Dict\fill_keys($_val3, true), static::class),
            )
              |> dict($$),
          )
            |> dict($$),
        )
          |> vec($$),
      )
        |> vec($$),
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

class NestedContainers_turtles_result extends \ThriftSyncStructWithoutResult implements \IThriftStructMetadata {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
  ];
  const dict<string, int> 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 'NestedContainers_turtles_result';
  }

  public function clearTerseFields()[write_props]: void {
  }

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.NestedContainers_turtles_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 NestedContainersStaticMetadata implements \IThriftServiceStaticMetadata {
  public static function getServiceMetadata()[]: \tmeta_ThriftService {
    return tmeta_ThriftService::fromShape(
      shape(
        "name" => "module.NestedContainers",
        "functions" => vec[
          tmeta_ThriftFunction::fromShape(
            shape(
              "name" => "mapList",
              "return_type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE,
                )
              ),
              "arguments" => vec[
                tmeta_ThriftField::fromShape(
                  shape(
                    "id" => 1,
                    "type" => tmeta_ThriftType::fromShape(
                      shape(
                        "t_map" => tmeta_ThriftMapType::fromShape(
                          shape(
                            "keyType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                              )
                            ),
                            "valueType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_list" => tmeta_ThriftListType::fromShape(
                                  shape(
                                    "valueType" => tmeta_ThriftType::fromShape(
                                      shape(
                                        "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                      )
                                    ),
                                  )
                                ),
                              )
                            ),
                          )
                        ),
                      )
                    ),
                    "name" => "foo",
                  )
                ),
              ],
            )
          ),
          tmeta_ThriftFunction::fromShape(
            shape(
              "name" => "mapSet",
              "return_type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE,
                )
              ),
              "arguments" => vec[
                tmeta_ThriftField::fromShape(
                  shape(
                    "id" => 1,
                    "type" => tmeta_ThriftType::fromShape(
                      shape(
                        "t_map" => tmeta_ThriftMapType::fromShape(
                          shape(
                            "keyType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                              )
                            ),
                            "valueType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_set" => tmeta_ThriftSetType::fromShape(
                                  shape(
                                    "valueType" => tmeta_ThriftType::fromShape(
                                      shape(
                                        "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                      )
                                    ),
                                  )
                                ),
                              )
                            ),
                          )
                        ),
                      )
                    ),
                    "name" => "foo",
                  )
                ),
              ],
            )
          ),
          tmeta_ThriftFunction::fromShape(
            shape(
              "name" => "listMap",
              "return_type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE,
                )
              ),
              "arguments" => vec[
                tmeta_ThriftField::fromShape(
                  shape(
                    "id" => 1,
                    "type" => tmeta_ThriftType::fromShape(
                      shape(
                        "t_list" => tmeta_ThriftListType::fromShape(
                          shape(
                            "valueType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_map" => tmeta_ThriftMapType::fromShape(
                                  shape(
                                    "keyType" => tmeta_ThriftType::fromShape(
                                      shape(
                                        "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                      )
                                    ),
                                    "valueType" => tmeta_ThriftType::fromShape(
                                      shape(
                                        "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                      )
                                    ),
                                  )
                                ),
                              )
                            ),
                          )
                        ),
                      )
                    ),
                    "name" => "foo",
                  )
                ),
              ],
            )
          ),
          tmeta_ThriftFunction::fromShape(
            shape(
              "name" => "listSet",
              "return_type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE,
                )
              ),
              "arguments" => vec[
                tmeta_ThriftField::fromShape(
                  shape(
                    "id" => 1,
                    "type" => tmeta_ThriftType::fromShape(
                      shape(
                        "t_list" => tmeta_ThriftListType::fromShape(
                          shape(
                            "valueType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_set" => tmeta_ThriftSetType::fromShape(
                                  shape(
                                    "valueType" => tmeta_ThriftType::fromShape(
                                      shape(
                                        "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                      )
                                    ),
                                  )
                                ),
                              )
                            ),
                          )
                        ),
                      )
                    ),
                    "name" => "foo",
                  )
                ),
              ],
            )
          ),
          tmeta_ThriftFunction::fromShape(
            shape(
              "name" => "turtles",
              "return_type" => tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_VOID_TYPE,
                )
              ),
              "arguments" => vec[
                tmeta_ThriftField::fromShape(
                  shape(
                    "id" => 1,
                    "type" => tmeta_ThriftType::fromShape(
                      shape(
                        "t_list" => tmeta_ThriftListType::fromShape(
                          shape(
                            "valueType" => tmeta_ThriftType::fromShape(
                              shape(
                                "t_list" => tmeta_ThriftListType::fromShape(
                                  shape(
                                    "valueType" => tmeta_ThriftType::fromShape(
                                      shape(
                                        "t_map" => tmeta_ThriftMapType::fromShape(
                                          shape(
                                            "keyType" => tmeta_ThriftType::fromShape(
                                              shape(
                                                "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                              )
                                            ),
                                            "valueType" => tmeta_ThriftType::fromShape(
                                              shape(
                                                "t_map" => tmeta_ThriftMapType::fromShape(
                                                  shape(
                                                    "keyType" => tmeta_ThriftType::fromShape(
                                                      shape(
                                                        "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                                      )
                                                    ),
                                                    "valueType" => tmeta_ThriftType::fromShape(
                                                      shape(
                                                        "t_set" => tmeta_ThriftSetType::fromShape(
                                                          shape(
                                                            "valueType" => tmeta_ThriftType::fromShape(
                                                              shape(
                                                                "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                                              )
                                                            ),
                                                          )
                                                        ),
                                                      )
                                                    ),
                                                  )
                                                ),
                                              )
                                            ),
                                          )
                                        ),
                                      )
                                    ),
                                  )
                                ),
                              )
                            ),
                          )
                        ),
                      )
                    ),
                    "name" => "foo",
                  )
                ),
              ],
            )
          ),
        ],
      )
    );
  }

  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[
            ],
            'exceptions' => dict[
            ],
            'services' => dict[
            ],
          )
        ),
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TServiceAnnotations {
    return shape(
      'service' => dict[],
      'functions' => dict[
      ],
    );
  }
}