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

namespace test\fixtures;

/**
 * Original thrift enum:-
 * Enum
 */
enum Enum: int {
  ENUM = 1;
}

class Enum_TEnumStaticMetadata implements \IThriftEnumStaticMetadata {
  public static function getEnumMetadata()[]: \tmeta_ThriftEnum {
    return \tmeta_ThriftEnum::fromShape(
      shape(
        "name" => "module.Enum",
        "elements" => dict[
          1 => "ENUM",
        ],
      )
    );
  }

  public static function getAllStructuredAnnotations()[write_props]: \TEnumAnnotations {
    return shape(
      'enum' => dict[],
      'constants' => dict[
      ],
    );
  }
}

enum UnionEnum: int {
  _EMPTY_ = 0;
  intValue = 1;
  stringValue = 5;
}

/**
 * Original thrift struct:-
 * Union
 */
class Union implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftUnion<\test\fixtures\UnionEnum>, \IThriftShapishSyncStruct {
  use \ThriftUnionSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'intValue',
      'union' => true,
      'type' => \TType::I64,
    ),
    5 => shape(
      'var' => 'stringValue',
      'union' => true,
      'type' => \TType::STRING,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'intValue' => 1,
    'stringValue' => 5,
  ];

  const type TConstructorShape = shape(
    ?'intValue' => ?int,
    ?'stringValue' => ?string,
  );

  const type TShape = shape(
    ?'intValue' => ?int,
    ?'stringValue' => ?string,
    ...
  );
  const int STRUCTURAL_ID = 7430801321277306554;
  /**
   * Original thrift field:-
   * 1: i64 intValue
   */
  public ?int $intValue;
  /**
   * Original thrift field:-
   * 5: string stringValue
   */
  public ?string $stringValue;
  protected \test\fixtures\UnionEnum $_type = \test\fixtures\UnionEnum::_EMPTY_;

  public function __construct(?int $intValue = null, ?string $stringValue = null)[] {
    $this->_type = \test\fixtures\UnionEnum::_EMPTY_;
    if ($intValue !== null) {
      $this->intValue = $intValue;
      $this->_type = \test\fixtures\UnionEnum::intValue;
    }
    if ($stringValue !== null) {
      $this->stringValue = $stringValue;
      $this->_type = \test\fixtures\UnionEnum::stringValue;
    }
  }

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

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

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

  public function getType()[]: \test\fixtures\UnionEnum {
    return $this->_type;
  }

  public function reset()[write_props]: void {
    switch ($this->_type) {
      case \test\fixtures\UnionEnum::intValue:
        $this->intValue = null;
        break;
      case \test\fixtures\UnionEnum::stringValue:
        $this->stringValue = null;
        break;
      case \test\fixtures\UnionEnum::_EMPTY_:
        break;
    }
    $this->_type = \test\fixtures\UnionEnum::_EMPTY_;
  }

  public function set_intValue(int $intValue)[write_props]: this {
    $this->reset();
    $this->_type = \test\fixtures\UnionEnum::intValue;
    $this->intValue = $intValue;
    return $this;
  }

  public function get_intValue()[]: ?int {
    return $this->intValue;
  }

  public function getx_intValue()[]: int {
    invariant(
      $this->_type === \test\fixtures\UnionEnum::intValue,
      'get_intValue called on an instance of Union whose current type is %s',
      (string)$this->_type,
    );
    return $this->intValue as nonnull;
  }

  public function set_stringValue(string $stringValue)[write_props]: this {
    $this->reset();
    $this->_type = \test\fixtures\UnionEnum::stringValue;
    $this->stringValue = $stringValue;
    return $this;
  }

  public function get_stringValue()[]: ?string {
    return $this->stringValue;
  }

  public function getx_stringValue()[]: string {
    invariant(
      $this->_type === \test\fixtures\UnionEnum::stringValue,
      'get_stringValue called on an instance of Union whose current type is %s',
      (string)$this->_type,
    );
    return $this->stringValue as nonnull;
  }

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

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.Union",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I64_TYPE,
                )
              ),
              "name" => "intValue",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 5,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                )
              ),
              "name" => "stringValue",
            )
          ),
        ],
        "is_union" => true,
      )
    );
  }

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

  public static function __fromShape(self::TShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'intValue'),
      Shapes::idx($shape, 'stringValue'),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'intValue' => $this->intValue,
      'stringValue' => $this->stringValue,
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}

/**
 * Original thrift struct:-
 * A
 */
class A implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'a',
      'type' => \TType::STRING,
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'a' => 1,
  ];

  const type TConstructorShape = shape(
    ?'a' => ?string,
  );

  const type TShape = shape(
    'a' => string,
    ...
  );
  const int STRUCTURAL_ID = 7939807933046472325;
  /**
   * Original thrift field:-
   * 1: string a
   */
  public string $a;

  public function __construct(?string $a = null)[] {
    $this->a = $a ?? '';
  }

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

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

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

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

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.A",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                )
              ),
              "name" => "a",
            )
          ),
        ],
        "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['a'],
    );
  }

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

}

/**
 * Original thrift struct:-
 * B
 */
class B implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct {
  use \ThriftSerializationTrait;

  const \ThriftStructTypes::TSpec SPEC = dict[
    1 => shape(
      'var' => 'just_an_A',
      'type' => \TType::STRUCT,
      'class' => \test\fixtures\A::class,
    ),
    2 => shape(
      'var' => 'set_of_i32',
      'type' => \TType::SET,
      'etype' => \TType::I32,
      'elem' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    3 => shape(
      'var' => 'list_of_i32',
      'type' => \TType::LST,
      'etype' => \TType::I32,
      'elem' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    4 => shape(
      'var' => 'list_of_string',
      'type' => \TType::LST,
      'etype' => \TType::STRING,
      'elem' => shape(
        'type' => \TType::STRING,
      ),
      'format' => 'collection',
    ),
    5 => shape(
      'var' => 'map_of_string_to_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::I32,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    6 => shape(
      'var' => 'map_of_string_to_A',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::STRUCT,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::STRUCT,
        'class' => \test\fixtures\A::class,
      ),
      'format' => 'collection',
    ),
    7 => shape(
      'var' => 'map_of_string_to_list_of_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::LST,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::LST,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    8 => shape(
      'var' => 'map_of_string_to_list_of_A',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::LST,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::LST,
        'etype' => \TType::STRUCT,
        'elem' => shape(
          'type' => \TType::STRUCT,
          'class' => \test\fixtures\A::class,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    9 => shape(
      'var' => 'map_of_string_to_set_of_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::SET,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::SET,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    10 => shape(
      'var' => 'map_of_string_to_map_of_string_to_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::MAP,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::MAP,
        'ktype' => \TType::STRING,
        'vtype' => \TType::I32,
        'key' => shape(
          'type' => \TType::STRING,
        ),
        'val' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    11 => shape(
      'var' => 'map_of_string_to_map_of_string_to_A',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::MAP,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::MAP,
        'ktype' => \TType::STRING,
        'vtype' => \TType::STRUCT,
        'key' => shape(
          'type' => \TType::STRING,
        ),
        'val' => shape(
          'type' => \TType::STRUCT,
          'class' => \test\fixtures\A::class,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    12 => shape(
      'var' => 'list_of_set_of_i32',
      'type' => \TType::LST,
      'etype' => \TType::SET,
      'elem' => shape(
        'type' => \TType::SET,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    13 => shape(
      'var' => 'list_of_map_of_string_to_list_of_A',
      'type' => \TType::LST,
      'etype' => \TType::MAP,
      'elem' => shape(
        'type' => \TType::MAP,
        'ktype' => \TType::STRING,
        'vtype' => \TType::LST,
        'key' => shape(
          'type' => \TType::STRING,
        ),
        'val' => shape(
          'type' => \TType::LST,
          'etype' => \TType::STRUCT,
          'elem' => shape(
            'type' => \TType::STRUCT,
            'class' => \test\fixtures\A::class,
          ),
          'format' => 'collection',
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    14 => shape(
      'var' => 'list_of_map_of_string_to_A',
      'type' => \TType::LST,
      'etype' => \TType::MAP,
      'elem' => shape(
        'type' => \TType::MAP,
        'ktype' => \TType::STRING,
        'vtype' => \TType::STRUCT,
        'key' => shape(
          'type' => \TType::STRING,
        ),
        'val' => shape(
          'type' => \TType::STRUCT,
          'class' => \test\fixtures\A::class,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    17 => shape(
      'var' => 'just_an_enum',
      'type' => \TType::I32,
      'enum' => \test\fixtures\Enum::class,
    ),
    18 => shape(
      'var' => 'just_a_union',
      'type' => \TType::STRUCT,
      'class' => \test\fixtures\Union::class,
    ),
    51 => shape(
      'var' => 'optional_just_an_A',
      'type' => \TType::STRUCT,
      'class' => \test\fixtures\A::class,
    ),
    52 => shape(
      'var' => 'optional_set_of_i32',
      'type' => \TType::SET,
      'etype' => \TType::I32,
      'elem' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    53 => shape(
      'var' => 'optional_list_of_i32',
      'type' => \TType::LST,
      'etype' => \TType::I32,
      'elem' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    54 => shape(
      'var' => 'optional_list_of_string',
      'type' => \TType::LST,
      'etype' => \TType::STRING,
      'elem' => shape(
        'type' => \TType::STRING,
      ),
      'format' => 'collection',
    ),
    55 => shape(
      'var' => 'optional_map_of_string_to_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::I32,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    56 => shape(
      'var' => 'optional_map_of_string_to_A',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::STRUCT,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::STRUCT,
        'class' => \test\fixtures\A::class,
      ),
      'format' => 'collection',
    ),
    57 => shape(
      'var' => 'optional_map_of_string_to_list_of_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::LST,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::LST,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    58 => shape(
      'var' => 'optional_map_of_string_to_list_of_A',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::LST,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::LST,
        'etype' => \TType::STRUCT,
        'elem' => shape(
          'type' => \TType::STRUCT,
          'class' => \test\fixtures\A::class,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    59 => shape(
      'var' => 'optional_map_of_string_to_set_of_i32',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::SET,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::SET,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
    60 => shape(
      'var' => 'optional_enum',
      'type' => \TType::I32,
      'enum' => \test\fixtures\Enum::class,
    ),
    70 => shape(
      'var' => 'required_enum_with_default',
      'type' => \TType::I32,
      'enum' => \test\fixtures\Enum::class,
    ),
    80 => shape(
      'var' => 'string_with_default_value',
      'type' => \TType::STRING,
    ),
    81 => shape(
      'var' => 'i32_with_default_value',
      'type' => \TType::I32,
    ),
    82 => shape(
      'var' => 'double_with_default_value',
      'type' => \TType::DOUBLE,
    ),
    83 => shape(
      'var' => 'enum_with_default_value',
      'type' => \TType::I32,
      'enum' => \test\fixtures\Enum::class,
    ),
    84 => shape(
      'var' => 'A_with_default_value',
      'type' => \TType::STRUCT,
      'class' => \test\fixtures\A::class,
    ),
    85 => shape(
      'var' => 'set_of_i32_with_default_value',
      'type' => \TType::SET,
      'etype' => \TType::I32,
      'elem' => shape(
        'type' => \TType::I32,
      ),
      'format' => 'collection',
    ),
    86 => shape(
      'var' => 'map_of_i32_to_string_with_default_value',
      'type' => \TType::MAP,
      'ktype' => \TType::I32,
      'vtype' => \TType::STRING,
      'key' => shape(
        'type' => \TType::I32,
      ),
      'val' => shape(
        'type' => \TType::STRING,
      ),
      'format' => 'collection',
    ),
    87 => shape(
      'var' => 'list_of_string_with_default_value',
      'type' => \TType::LST,
      'etype' => \TType::STRING,
      'elem' => shape(
        'type' => \TType::STRING,
      ),
      'format' => 'collection',
    ),
    88 => shape(
      'var' => 'map_of_string_to_list_of_i32_with_default_value',
      'type' => \TType::MAP,
      'ktype' => \TType::STRING,
      'vtype' => \TType::LST,
      'key' => shape(
        'type' => \TType::STRING,
      ),
      'val' => shape(
        'type' => \TType::LST,
        'etype' => \TType::I32,
        'elem' => shape(
          'type' => \TType::I32,
        ),
        'format' => 'collection',
      ),
      'format' => 'collection',
    ),
  ];
  const dict<string, int> FIELDMAP = dict[
    'just_an_A' => 1,
    'set_of_i32' => 2,
    'list_of_i32' => 3,
    'list_of_string' => 4,
    'map_of_string_to_i32' => 5,
    'map_of_string_to_A' => 6,
    'map_of_string_to_list_of_i32' => 7,
    'map_of_string_to_list_of_A' => 8,
    'map_of_string_to_set_of_i32' => 9,
    'map_of_string_to_map_of_string_to_i32' => 10,
    'map_of_string_to_map_of_string_to_A' => 11,
    'list_of_set_of_i32' => 12,
    'list_of_map_of_string_to_list_of_A' => 13,
    'list_of_map_of_string_to_A' => 14,
    'just_an_enum' => 17,
    'just_a_union' => 18,
    'optional_just_an_A' => 51,
    'optional_set_of_i32' => 52,
    'optional_list_of_i32' => 53,
    'optional_list_of_string' => 54,
    'optional_map_of_string_to_i32' => 55,
    'optional_map_of_string_to_A' => 56,
    'optional_map_of_string_to_list_of_i32' => 57,
    'optional_map_of_string_to_list_of_A' => 58,
    'optional_map_of_string_to_set_of_i32' => 59,
    'optional_enum' => 60,
    'required_enum_with_default' => 70,
    'string_with_default_value' => 80,
    'i32_with_default_value' => 81,
    'double_with_default_value' => 82,
    'enum_with_default_value' => 83,
    'A_with_default_value' => 84,
    'set_of_i32_with_default_value' => 85,
    'map_of_i32_to_string_with_default_value' => 86,
    'list_of_string_with_default_value' => 87,
    'map_of_string_to_list_of_i32_with_default_value' => 88,
  ];

  const type TConstructorShape = shape(
    ?'just_an_A' => ?\test\fixtures\A,
    ?'set_of_i32' => ?Set<int>,
    ?'list_of_i32' => ?Vector<int>,
    ?'list_of_string' => ?Vector<string>,
    ?'map_of_string_to_i32' => ?Map<string, int>,
    ?'map_of_string_to_A' => ?Map<string, \test\fixtures\A>,
    ?'map_of_string_to_list_of_i32' => ?Map<string, Vector<int>>,
    ?'map_of_string_to_list_of_A' => ?Map<string, Vector<\test\fixtures\A>>,
    ?'map_of_string_to_set_of_i32' => ?Map<string, Set<int>>,
    ?'map_of_string_to_map_of_string_to_i32' => ?Map<string, Map<string, int>>,
    ?'map_of_string_to_map_of_string_to_A' => ?Map<string, Map<string, \test\fixtures\A>>,
    ?'list_of_set_of_i32' => ?Vector<Set<int>>,
    ?'list_of_map_of_string_to_list_of_A' => ?Vector<Map<string, Vector<\test\fixtures\A>>>,
    ?'list_of_map_of_string_to_A' => ?Vector<Map<string, \test\fixtures\A>>,
    ?'just_an_enum' => ?\test\fixtures\Enum,
    ?'just_a_union' => ?\test\fixtures\Union,
    ?'optional_just_an_A' => ?\test\fixtures\A,
    ?'optional_set_of_i32' => ?Set<int>,
    ?'optional_list_of_i32' => ?Vector<int>,
    ?'optional_list_of_string' => ?Vector<string>,
    ?'optional_map_of_string_to_i32' => ?Map<string, int>,
    ?'optional_map_of_string_to_A' => ?Map<string, \test\fixtures\A>,
    ?'optional_map_of_string_to_list_of_i32' => ?Map<string, Vector<int>>,
    ?'optional_map_of_string_to_list_of_A' => ?Map<string, Vector<\test\fixtures\A>>,
    ?'optional_map_of_string_to_set_of_i32' => ?Map<string, Set<int>>,
    ?'optional_enum' => ?\test\fixtures\Enum,
    ?'required_enum_with_default' => ?\test\fixtures\Enum,
    ?'string_with_default_value' => ?string,
    ?'i32_with_default_value' => ?int,
    ?'double_with_default_value' => ?float,
    ?'enum_with_default_value' => ?\test\fixtures\Enum,
    ?'A_with_default_value' => ?\test\fixtures\A,
    ?'set_of_i32_with_default_value' => ?Set<int>,
    ?'map_of_i32_to_string_with_default_value' => ?Map<int, string>,
    ?'list_of_string_with_default_value' => ?Vector<string>,
    ?'map_of_string_to_list_of_i32_with_default_value' => ?Map<string, Vector<int>>,
  );

  const type TShape = shape(
    ?'just_an_A' => ?\test\fixtures\A::TShape,
    'set_of_i32' => dict<int, bool>,
    'list_of_i32' => vec<int>,
    'list_of_string' => vec<string>,
    'map_of_string_to_i32' => dict<string, int>,
    'map_of_string_to_A' => dict<string, \test\fixtures\A::TShape>,
    'map_of_string_to_list_of_i32' => dict<string, vec<int>>,
    'map_of_string_to_list_of_A' => dict<string, vec<\test\fixtures\A::TShape>>,
    'map_of_string_to_set_of_i32' => dict<string, dict<int, bool>>,
    'map_of_string_to_map_of_string_to_i32' => dict<string, dict<string, int>>,
    'map_of_string_to_map_of_string_to_A' => dict<string, dict<string, \test\fixtures\A::TShape>>,
    'list_of_set_of_i32' => vec<dict<int, bool>>,
    'list_of_map_of_string_to_list_of_A' => vec<dict<string, vec<\test\fixtures\A::TShape>>>,
    'list_of_map_of_string_to_A' => vec<dict<string, \test\fixtures\A::TShape>>,
    ?'just_an_enum' => ?\test\fixtures\Enum,
    ?'just_a_union' => ?\test\fixtures\Union::TShape,
    ?'optional_just_an_A' => ?\test\fixtures\A::TShape,
    ?'optional_set_of_i32' => ?dict<int, bool>,
    ?'optional_list_of_i32' => ?vec<int>,
    ?'optional_list_of_string' => ?vec<string>,
    ?'optional_map_of_string_to_i32' => ?dict<string, int>,
    ?'optional_map_of_string_to_A' => ?dict<string, \test\fixtures\A::TShape>,
    ?'optional_map_of_string_to_list_of_i32' => ?dict<string, vec<int>>,
    ?'optional_map_of_string_to_list_of_A' => ?dict<string, vec<\test\fixtures\A::TShape>>,
    ?'optional_map_of_string_to_set_of_i32' => ?dict<string, dict<int, bool>>,
    ?'optional_enum' => ?\test\fixtures\Enum,
    'required_enum_with_default' => \test\fixtures\Enum,
    'string_with_default_value' => string,
    'i32_with_default_value' => int,
    'double_with_default_value' => float,
    ?'enum_with_default_value' => ?\test\fixtures\Enum,
    ?'A_with_default_value' => ?\test\fixtures\A::TShape,
    'set_of_i32_with_default_value' => dict<int, bool>,
    'map_of_i32_to_string_with_default_value' => dict<int, string>,
    'list_of_string_with_default_value' => vec<string>,
    'map_of_string_to_list_of_i32_with_default_value' => dict<string, vec<int>>,
    ...
  );
  const int STRUCTURAL_ID = 7290621384819644133;
  /**
   * Original thrift field:-
   * 1: module.A just_an_A
   */
  public ?\test\fixtures\A $just_an_A;
  /**
   * Original thrift field:-
   * 2: set<i32> set_of_i32
   */
  public Set<int> $set_of_i32;
  /**
   * Original thrift field:-
   * 3: list<i32> list_of_i32
   */
  public Vector<int> $list_of_i32;
  /**
   * Original thrift field:-
   * 4: list<string> list_of_string
   */
  public Vector<string> $list_of_string;
  /**
   * Original thrift field:-
   * 5: map<string, i32> map_of_string_to_i32
   */
  public Map<string, int> $map_of_string_to_i32;
  /**
   * Original thrift field:-
   * 6: map<string, module.A> map_of_string_to_A
   */
  public Map<string, \test\fixtures\A> $map_of_string_to_A;
  /**
   * Original thrift field:-
   * 7: map<string, list<i32>> map_of_string_to_list_of_i32
   */
  public Map<string, Vector<int>> $map_of_string_to_list_of_i32;
  /**
   * Original thrift field:-
   * 8: map<string, list<module.A>> map_of_string_to_list_of_A
   */
  public Map<string, Vector<\test\fixtures\A>> $map_of_string_to_list_of_A;
  /**
   * Original thrift field:-
   * 9: map<string, set<i32>> map_of_string_to_set_of_i32
   */
  public Map<string, Set<int>> $map_of_string_to_set_of_i32;
  /**
   * Original thrift field:-
   * 10: map<string, map<string, i32>> map_of_string_to_map_of_string_to_i32
   */
  public Map<string, Map<string, int>> $map_of_string_to_map_of_string_to_i32;
  /**
   * Original thrift field:-
   * 11: map<string, map<string, module.A>> map_of_string_to_map_of_string_to_A
   */
  public Map<string, Map<string, \test\fixtures\A>> $map_of_string_to_map_of_string_to_A;
  /**
   * Original thrift field:-
   * 12: list<set<i32>> list_of_set_of_i32
   */
  public Vector<Set<int>> $list_of_set_of_i32;
  /**
   * Original thrift field:-
   * 13: list<map<string, list<module.A>>> list_of_map_of_string_to_list_of_A
   */
  public Vector<Map<string, Vector<\test\fixtures\A>>> $list_of_map_of_string_to_list_of_A;
  /**
   * Original thrift field:-
   * 14: list<map<string, module.A>> list_of_map_of_string_to_A
   */
  public Vector<Map<string, \test\fixtures\A>> $list_of_map_of_string_to_A;
  /**
   * Original thrift field:-
   * 17: module.Enum just_an_enum
   */
  public ?\test\fixtures\Enum $just_an_enum;
  /**
   * Original thrift field:-
   * 18: module.Union just_a_union
   */
  public ?\test\fixtures\Union $just_a_union;
  /**
   * Original thrift field:-
   * 51: module.A optional_just_an_A
   */
  public ?\test\fixtures\A $optional_just_an_A;
  /**
   * Original thrift field:-
   * 52: set<i32> optional_set_of_i32
   */
  public ?Set<int> $optional_set_of_i32;
  /**
   * Original thrift field:-
   * 53: list<i32> optional_list_of_i32
   */
  public ?Vector<int> $optional_list_of_i32;
  /**
   * Original thrift field:-
   * 54: list<string> optional_list_of_string
   */
  public ?Vector<string> $optional_list_of_string;
  /**
   * Original thrift field:-
   * 55: map<string, i32> optional_map_of_string_to_i32
   */
  public ?Map<string, int> $optional_map_of_string_to_i32;
  /**
   * Original thrift field:-
   * 56: map<string, module.A> optional_map_of_string_to_A
   */
  public ?Map<string, \test\fixtures\A> $optional_map_of_string_to_A;
  /**
   * Original thrift field:-
   * 57: map<string, list<i32>> optional_map_of_string_to_list_of_i32
   */
  public ?Map<string, Vector<int>> $optional_map_of_string_to_list_of_i32;
  /**
   * Original thrift field:-
   * 58: map<string, list<module.A>> optional_map_of_string_to_list_of_A
   */
  public ?Map<string, Vector<\test\fixtures\A>> $optional_map_of_string_to_list_of_A;
  /**
   * Original thrift field:-
   * 59: map<string, set<i32>> optional_map_of_string_to_set_of_i32
   */
  public ?Map<string, Set<int>> $optional_map_of_string_to_set_of_i32;
  /**
   * Original thrift field:-
   * 60: module.Enum optional_enum
   */
  public ?\test\fixtures\Enum $optional_enum;
  /**
   * Original thrift field:-
   * 70: module.Enum required_enum_with_default
   */
  public \test\fixtures\Enum $required_enum_with_default;
  /**
   * Original thrift field:-
   * 80: string string_with_default_value
   */
  public string $string_with_default_value;
  /**
   * Original thrift field:-
   * 81: i32 i32_with_default_value
   */
  public int $i32_with_default_value;
  /**
   * Original thrift field:-
   * 82: double double_with_default_value
   */
  public float $double_with_default_value;
  /**
   * Original thrift field:-
   * 83: module.Enum enum_with_default_value
   */
  public ?\test\fixtures\Enum $enum_with_default_value;
  /**
   * Original thrift field:-
   * 84: module.A A_with_default_value
   */
  public ?\test\fixtures\A $A_with_default_value;
  /**
   * Original thrift field:-
   * 85: set<i32> set_of_i32_with_default_value
   */
  public Set<int> $set_of_i32_with_default_value;
  /**
   * Original thrift field:-
   * 86: map<i32, string> map_of_i32_to_string_with_default_value
   */
  public Map<int, string> $map_of_i32_to_string_with_default_value;
  /**
   * Original thrift field:-
   * 87: list<string> list_of_string_with_default_value
   */
  public Vector<string> $list_of_string_with_default_value;
  /**
   * Original thrift field:-
   * 88: map<string, list<i32>> map_of_string_to_list_of_i32_with_default_value
   */
  public Map<string, Vector<int>> $map_of_string_to_list_of_i32_with_default_value;

  public function __construct(?\test\fixtures\A $just_an_A = null, ?Set<int> $set_of_i32 = null, ?Vector<int> $list_of_i32 = null, ?Vector<string> $list_of_string = null, ?Map<string, int> $map_of_string_to_i32 = null, ?Map<string, \test\fixtures\A> $map_of_string_to_A = null, ?Map<string, Vector<int>> $map_of_string_to_list_of_i32 = null, ?Map<string, Vector<\test\fixtures\A>> $map_of_string_to_list_of_A = null, ?Map<string, Set<int>> $map_of_string_to_set_of_i32 = null, ?Map<string, Map<string, int>> $map_of_string_to_map_of_string_to_i32 = null, ?Map<string, Map<string, \test\fixtures\A>> $map_of_string_to_map_of_string_to_A = null, ?Vector<Set<int>> $list_of_set_of_i32 = null, ?Vector<Map<string, Vector<\test\fixtures\A>>> $list_of_map_of_string_to_list_of_A = null, ?Vector<Map<string, \test\fixtures\A>> $list_of_map_of_string_to_A = null, ?\test\fixtures\Enum $just_an_enum = null, ?\test\fixtures\Union $just_a_union = null, ?\test\fixtures\A $optional_just_an_A = null, ?Set<int> $optional_set_of_i32 = null, ?Vector<int> $optional_list_of_i32 = null, ?Vector<string> $optional_list_of_string = null, ?Map<string, int> $optional_map_of_string_to_i32 = null, ?Map<string, \test\fixtures\A> $optional_map_of_string_to_A = null, ?Map<string, Vector<int>> $optional_map_of_string_to_list_of_i32 = null, ?Map<string, Vector<\test\fixtures\A>> $optional_map_of_string_to_list_of_A = null, ?Map<string, Set<int>> $optional_map_of_string_to_set_of_i32 = null, ?\test\fixtures\Enum $optional_enum = null, ?\test\fixtures\Enum $required_enum_with_default = null, ?string $string_with_default_value = null, ?int $i32_with_default_value = null, ?float $double_with_default_value = null, ?\test\fixtures\Enum $enum_with_default_value = null, ?\test\fixtures\A $A_with_default_value = null, ?Set<int> $set_of_i32_with_default_value = null, ?Map<int, string> $map_of_i32_to_string_with_default_value = null, ?Vector<string> $list_of_string_with_default_value = null, ?Map<string, Vector<int>> $map_of_string_to_list_of_i32_with_default_value = null)[] {
    $this->just_an_A = $just_an_A;
    $this->set_of_i32 = $set_of_i32 ?? Set {};
    $this->list_of_i32 = $list_of_i32 ?? Vector {};
    $this->list_of_string = $list_of_string ?? Vector {};
    $this->map_of_string_to_i32 = $map_of_string_to_i32 ?? Map {};
    $this->map_of_string_to_A = $map_of_string_to_A ?? Map {};
    $this->map_of_string_to_list_of_i32 = $map_of_string_to_list_of_i32 ?? Map {};
    $this->map_of_string_to_list_of_A = $map_of_string_to_list_of_A ?? Map {};
    $this->map_of_string_to_set_of_i32 = $map_of_string_to_set_of_i32 ?? Map {};
    $this->map_of_string_to_map_of_string_to_i32 = $map_of_string_to_map_of_string_to_i32 ?? Map {};
    $this->map_of_string_to_map_of_string_to_A = $map_of_string_to_map_of_string_to_A ?? Map {};
    $this->list_of_set_of_i32 = $list_of_set_of_i32 ?? Vector {};
    $this->list_of_map_of_string_to_list_of_A = $list_of_map_of_string_to_list_of_A ?? Vector {};
    $this->list_of_map_of_string_to_A = $list_of_map_of_string_to_A ?? Vector {};
    $this->just_an_enum = $just_an_enum;
    $this->just_a_union = $just_a_union;
    $this->optional_just_an_A = $optional_just_an_A;
    $this->optional_set_of_i32 = $optional_set_of_i32;
    $this->optional_list_of_i32 = $optional_list_of_i32;
    $this->optional_list_of_string = $optional_list_of_string;
    $this->optional_map_of_string_to_i32 = $optional_map_of_string_to_i32;
    $this->optional_map_of_string_to_A = $optional_map_of_string_to_A;
    $this->optional_map_of_string_to_list_of_i32 = $optional_map_of_string_to_list_of_i32;
    $this->optional_map_of_string_to_list_of_A = $optional_map_of_string_to_list_of_A;
    $this->optional_map_of_string_to_set_of_i32 = $optional_map_of_string_to_set_of_i32;
    $this->optional_enum = $optional_enum;
    $this->required_enum_with_default = $required_enum_with_default ?? \test\fixtures\Enum::ENUM;
    $this->string_with_default_value = $string_with_default_value ?? "de_fault_in_our_stars";
    $this->i32_with_default_value = $i32_with_default_value ?? 1729;
    $this->double_with_default_value = $double_with_default_value ?? 3.14159;
    $this->enum_with_default_value = $enum_with_default_value ?? \test\fixtures\Enum::ENUM;
    $this->A_with_default_value = $A_with_default_value;
    $this->set_of_i32_with_default_value = $set_of_i32_with_default_value ?? Set {
      3,
      7,
      31,
      127,
    };
    $this->map_of_i32_to_string_with_default_value = $map_of_i32_to_string_with_default_value ?? Map {
      1 => "fish",
      2 => "fish",
    };
    $this->list_of_string_with_default_value = $list_of_string_with_default_value ?? Vector {
      "red fish",
      "blue fish",
    };
    $this->map_of_string_to_list_of_i32_with_default_value = $map_of_string_to_list_of_i32_with_default_value ?? Map {
      "Jenny" => Vector {
        8,
        6,
        7,
        5,
        3,
        0,
        9,
      },
    };
  }

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

  public static function fromShape(self::TConstructorShape $shape)[]: this {
    return new static(
      Shapes::idx($shape, 'just_an_A'),
      Shapes::idx($shape, 'set_of_i32'),
      Shapes::idx($shape, 'list_of_i32'),
      Shapes::idx($shape, 'list_of_string'),
      Shapes::idx($shape, 'map_of_string_to_i32'),
      Shapes::idx($shape, 'map_of_string_to_A'),
      Shapes::idx($shape, 'map_of_string_to_list_of_i32'),
      Shapes::idx($shape, 'map_of_string_to_list_of_A'),
      Shapes::idx($shape, 'map_of_string_to_set_of_i32'),
      Shapes::idx($shape, 'map_of_string_to_map_of_string_to_i32'),
      Shapes::idx($shape, 'map_of_string_to_map_of_string_to_A'),
      Shapes::idx($shape, 'list_of_set_of_i32'),
      Shapes::idx($shape, 'list_of_map_of_string_to_list_of_A'),
      Shapes::idx($shape, 'list_of_map_of_string_to_A'),
      Shapes::idx($shape, 'just_an_enum'),
      Shapes::idx($shape, 'just_a_union'),
      Shapes::idx($shape, 'optional_just_an_A'),
      Shapes::idx($shape, 'optional_set_of_i32'),
      Shapes::idx($shape, 'optional_list_of_i32'),
      Shapes::idx($shape, 'optional_list_of_string'),
      Shapes::idx($shape, 'optional_map_of_string_to_i32'),
      Shapes::idx($shape, 'optional_map_of_string_to_A'),
      Shapes::idx($shape, 'optional_map_of_string_to_list_of_i32'),
      Shapes::idx($shape, 'optional_map_of_string_to_list_of_A'),
      Shapes::idx($shape, 'optional_map_of_string_to_set_of_i32'),
      Shapes::idx($shape, 'optional_enum'),
      Shapes::idx($shape, 'required_enum_with_default'),
      Shapes::idx($shape, 'string_with_default_value'),
      Shapes::idx($shape, 'i32_with_default_value'),
      Shapes::idx($shape, 'double_with_default_value'),
      Shapes::idx($shape, 'enum_with_default_value'),
      Shapes::idx($shape, 'A_with_default_value'),
      Shapes::idx($shape, 'set_of_i32_with_default_value'),
      Shapes::idx($shape, 'map_of_i32_to_string_with_default_value'),
      Shapes::idx($shape, 'list_of_string_with_default_value'),
      Shapes::idx($shape, 'map_of_string_to_list_of_i32_with_default_value'),
    );
  }

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

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

  public static function getStructMetadata()[]: \tmeta_ThriftStruct {
    return \tmeta_ThriftStruct::fromShape(
      shape(
        "name" => "module.B",
        "fields" => vec[
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 1,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                    shape(
                      "name" => "module.A",
                    )
                  ),
                )
              ),
              "name" => "just_an_A",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 2,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_set" => \tmeta_ThriftSetType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "set_of_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 3,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => \tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "list_of_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 4,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => \tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "list_of_string",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 5,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "map_of_string_to_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 6,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_struct" => \tmeta_ThriftStructType::fromShape(
                            shape(
                              "name" => "module.A",
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "map_of_string_to_A",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 7,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_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" => "map_of_string_to_list_of_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 8,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_list" => \tmeta_ThriftListType::fromShape(
                            shape(
                              "valueType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                                    shape(
                                      "name" => "module.A",
                                    )
                                  ),
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "map_of_string_to_list_of_A",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 9,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_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" => "map_of_string_to_set_of_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 10,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_map" => \tmeta_ThriftMapType::fromShape(
                            shape(
                              "keyType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                                )
                              ),
                              "valueType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "map_of_string_to_map_of_string_to_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 11,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_map" => \tmeta_ThriftMapType::fromShape(
                            shape(
                              "keyType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                                )
                              ),
                              "valueType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                                    shape(
                                      "name" => "module.A",
                                    )
                                  ),
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "map_of_string_to_map_of_string_to_A",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 12,
              "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" => "list_of_set_of_i32",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 13,
              "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_STRING_TYPE,
                                )
                              ),
                              "valueType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_list" => \tmeta_ThriftListType::fromShape(
                                    shape(
                                      "valueType" => \tmeta_ThriftType::fromShape(
                                        shape(
                                          "t_struct" => \tmeta_ThriftStructType::fromShape(
                                            shape(
                                              "name" => "module.A",
                                            )
                                          ),
                                        )
                                      ),
                                    )
                                  ),
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "list_of_map_of_string_to_list_of_A",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 14,
              "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_STRING_TYPE,
                                )
                              ),
                              "valueType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                                    shape(
                                      "name" => "module.A",
                                    )
                                  ),
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "list_of_map_of_string_to_A",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 17,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_enum" => \tmeta_ThriftEnumType::fromShape(
                    shape(
                      "name" => "module.Enum",
                    )
                  ),
                )
              ),
              "name" => "just_an_enum",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 18,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                    shape(
                      "name" => "module.Union",
                    )
                  ),
                )
              ),
              "name" => "just_a_union",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 51,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                    shape(
                      "name" => "module.A",
                    )
                  ),
                )
              ),
              "name" => "optional_just_an_A",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 52,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_set" => \tmeta_ThriftSetType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "optional_set_of_i32",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 53,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => \tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "optional_list_of_i32",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 54,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => \tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "optional_list_of_string",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 55,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "optional_map_of_string_to_i32",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 56,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_struct" => \tmeta_ThriftStructType::fromShape(
                            shape(
                              "name" => "module.A",
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "optional_map_of_string_to_A",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 57,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_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" => "optional_map_of_string_to_list_of_i32",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 58,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_list" => \tmeta_ThriftListType::fromShape(
                            shape(
                              "valueType" => \tmeta_ThriftType::fromShape(
                                shape(
                                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                                    shape(
                                      "name" => "module.A",
                                    )
                                  ),
                                )
                              ),
                            )
                          ),
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "optional_map_of_string_to_list_of_A",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 59,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_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" => "optional_map_of_string_to_set_of_i32",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 60,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_enum" => \tmeta_ThriftEnumType::fromShape(
                    shape(
                      "name" => "module.Enum",
                    )
                  ),
                )
              ),
              "name" => "optional_enum",
              "is_optional" => true,
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 70,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_enum" => \tmeta_ThriftEnumType::fromShape(
                    shape(
                      "name" => "module.Enum",
                    )
                  ),
                )
              ),
              "name" => "required_enum_with_default",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 80,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                )
              ),
              "name" => "string_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 81,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                )
              ),
              "name" => "i32_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 82,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_DOUBLE_TYPE,
                )
              ),
              "name" => "double_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 83,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_enum" => \tmeta_ThriftEnumType::fromShape(
                    shape(
                      "name" => "module.Enum",
                    )
                  ),
                )
              ),
              "name" => "enum_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 84,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_struct" => \tmeta_ThriftStructType::fromShape(
                    shape(
                      "name" => "module.A",
                    )
                  ),
                )
              ),
              "name" => "A_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 85,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_set" => \tmeta_ThriftSetType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_I32_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "set_of_i32_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 86,
              "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_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "map_of_i32_to_string_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 87,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_list" => \tmeta_ThriftListType::fromShape(
                    shape(
                      "valueType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE,
                        )
                      ),
                    )
                  ),
                )
              ),
              "name" => "list_of_string_with_default_value",
            )
          ),
          \tmeta_ThriftField::fromShape(
            shape(
              "id" => 88,
              "type" => \tmeta_ThriftType::fromShape(
                shape(
                  "t_map" => \tmeta_ThriftMapType::fromShape(
                    shape(
                      "keyType" => \tmeta_ThriftType::fromShape(
                        shape(
                          "t_primitive" => \tmeta_ThriftPrimitiveType::THRIFT_STRING_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" => "map_of_string_to_list_of_i32_with_default_value",
            )
          ),
        ],
        "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(
      Shapes::idx($shape, 'just_an_A') === null ? null : (\test\fixtures\A::__fromShape($shape['just_an_A'])),
      new Set(Keyset\keys($shape['set_of_i32'])),
      $shape['list_of_i32'] |> new Vector($$),
      $shape['list_of_string'] |> new Vector($$),
      $shape['map_of_string_to_i32'] |> new Map($$),
      $shape['map_of_string_to_A']
        |> Dict\map(
          $$,
          $_val0 ==> $_val0
            |> \test\fixtures\A::__fromShape($$),
        ) |> new Map($$),
      $shape['map_of_string_to_list_of_i32']
        |> Dict\map(
          $$,
          $_val1 ==> $_val1 |> new Vector($$),
        ) |> new Map($$),
      $shape['map_of_string_to_list_of_A']
        |> Dict\map(
          $$,
          $_val3 ==> $_val3
            |> Vec\map(
              $$,
              $_val2 ==> $_val2
                |> \test\fixtures\A::__fromShape($$),
            ) |> new Vector($$),
        ) |> new Map($$),
      $shape['map_of_string_to_set_of_i32']
        |> Dict\map(
          $$,
          $_val4 ==> $_val4
            |> new Set(Keyset\keys($$)),
        ) |> new Map($$),
      $shape['map_of_string_to_map_of_string_to_i32']
        |> Dict\map(
          $$,
          $_val5 ==> $_val5 |> new Map($$),
        ) |> new Map($$),
      $shape['map_of_string_to_map_of_string_to_A']
        |> Dict\map(
          $$,
          $_val7 ==> $_val7
            |> Dict\map(
              $$,
              $_val6 ==> $_val6
                |> \test\fixtures\A::__fromShape($$),
            ) |> new Map($$),
        ) |> new Map($$),
      $shape['list_of_set_of_i32']
        |> Vec\map(
          $$,
          $_val8 ==> $_val8
            |> new Set(Keyset\keys($$)),
        ) |> new Vector($$),
      $shape['list_of_map_of_string_to_list_of_A']
        |> Vec\map(
          $$,
          $_val11 ==> $_val11
            |> Dict\map(
              $$,
              $_val10 ==> $_val10
                |> Vec\map(
                  $$,
                  $_val9 ==> $_val9
                    |> \test\fixtures\A::__fromShape($$),
                ) |> new Vector($$),
            ) |> new Map($$),
        ) |> new Vector($$),
      $shape['list_of_map_of_string_to_A']
        |> Vec\map(
          $$,
          $_val13 ==> $_val13
            |> Dict\map(
              $$,
              $_val12 ==> $_val12
                |> \test\fixtures\A::__fromShape($$),
            ) |> new Map($$),
        ) |> new Vector($$),
      Shapes::idx($shape, 'just_an_enum'),
      Shapes::idx($shape, 'just_a_union') === null ? null : (\test\fixtures\Union::__fromShape($shape['just_a_union'])),
      Shapes::idx($shape, 'optional_just_an_A') === null ? null : (\test\fixtures\A::__fromShape($shape['optional_just_an_A'])),
      Shapes::idx($shape, 'optional_set_of_i32') === null ? null : (new Set(Keyset\keys($shape['optional_set_of_i32']))),
      Shapes::idx($shape, 'optional_list_of_i32') === null ? null : ($shape['optional_list_of_i32'] |> new Vector($$)),
      Shapes::idx($shape, 'optional_list_of_string') === null ? null : ($shape['optional_list_of_string'] |> new Vector($$)),
      Shapes::idx($shape, 'optional_map_of_string_to_i32') === null ? null : ($shape['optional_map_of_string_to_i32'] |> new Map($$)),
      Shapes::idx($shape, 'optional_map_of_string_to_A') === null ? null : ($shape['optional_map_of_string_to_A']
        |> Dict\map(
          $$,
          $_val14 ==> $_val14
            |> \test\fixtures\A::__fromShape($$),
        ) |> new Map($$)),
      Shapes::idx($shape, 'optional_map_of_string_to_list_of_i32') === null ? null : ($shape['optional_map_of_string_to_list_of_i32']
        |> Dict\map(
          $$,
          $_val15 ==> $_val15 |> new Vector($$),
        ) |> new Map($$)),
      Shapes::idx($shape, 'optional_map_of_string_to_list_of_A') === null ? null : ($shape['optional_map_of_string_to_list_of_A']
        |> Dict\map(
          $$,
          $_val17 ==> $_val17
            |> Vec\map(
              $$,
              $_val16 ==> $_val16
                |> \test\fixtures\A::__fromShape($$),
            ) |> new Vector($$),
        ) |> new Map($$)),
      Shapes::idx($shape, 'optional_map_of_string_to_set_of_i32') === null ? null : ($shape['optional_map_of_string_to_set_of_i32']
        |> Dict\map(
          $$,
          $_val18 ==> $_val18
            |> new Set(Keyset\keys($$)),
        ) |> new Map($$)),
      Shapes::idx($shape, 'optional_enum'),
      $shape['required_enum_with_default'],
      $shape['string_with_default_value'],
      $shape['i32_with_default_value'],
      $shape['double_with_default_value'],
      Shapes::idx($shape, 'enum_with_default_value'),
      Shapes::idx($shape, 'A_with_default_value') === null ? null : (\test\fixtures\A::__fromShape($shape['A_with_default_value'])),
      new Set(Keyset\keys($shape['set_of_i32_with_default_value'])),
      $shape['map_of_i32_to_string_with_default_value'] |> new Map($$),
      $shape['list_of_string_with_default_value'] |> new Vector($$),
      $shape['map_of_string_to_list_of_i32_with_default_value']
        |> Dict\map(
          $$,
          $_val19 ==> $_val19 |> new Vector($$),
        ) |> new Map($$),
    );
  }

  public function __toShape()[]: self::TShape {
    return shape(
      'just_an_A' => $this->just_an_A?->__toShape(),
      'set_of_i32' => ThriftUtil::toDArray(Dict\fill_keys($this->set_of_i32->toValuesArray(), true), static::class),
      'list_of_i32' => vec($this->list_of_i32),
      'list_of_string' => vec($this->list_of_string),
      'map_of_string_to_i32' => dict($this->map_of_string_to_i32),
      'map_of_string_to_A' => $this->map_of_string_to_A->map(
        ($_val0) ==> $_val0->__toShape(),
      )
        |> dict($$),
      'map_of_string_to_list_of_i32' => $this->map_of_string_to_list_of_i32->map(
        ($_val0) ==> vec($_val0),
      )
        |> dict($$),
      'map_of_string_to_list_of_A' => $this->map_of_string_to_list_of_A->map(
        ($_val0) ==> $_val0->map(
          ($_val1) ==> $_val1->__toShape(),
        )
          |> vec($$),
      )
        |> dict($$),
      'map_of_string_to_set_of_i32' => $this->map_of_string_to_set_of_i32->map(
        ($_val0) ==> ThriftUtil::toDArray(Dict\fill_keys($_val0, true), static::class),
      )
        |> dict($$),
      'map_of_string_to_map_of_string_to_i32' => $this->map_of_string_to_map_of_string_to_i32->map(
        ($_val0) ==> dict($_val0),
      )
        |> dict($$),
      'map_of_string_to_map_of_string_to_A' => $this->map_of_string_to_map_of_string_to_A->map(
        ($_val0) ==> $_val0->map(
          ($_val1) ==> $_val1->__toShape(),
        )
          |> dict($$),
      )
        |> dict($$),
      'list_of_set_of_i32' => $this->list_of_set_of_i32->map(
        ($_val0) ==> ThriftUtil::toDArray(Dict\fill_keys($_val0, true), static::class),
      )
        |> vec($$),
      'list_of_map_of_string_to_list_of_A' => $this->list_of_map_of_string_to_list_of_A->map(
        ($_val0) ==> $_val0->map(
          ($_val1) ==> $_val1->map(
            ($_val2) ==> $_val2->__toShape(),
          )
            |> vec($$),
        )
          |> dict($$),
      )
        |> vec($$),
      'list_of_map_of_string_to_A' => $this->list_of_map_of_string_to_A->map(
        ($_val0) ==> $_val0->map(
          ($_val1) ==> $_val1->__toShape(),
        )
          |> dict($$),
      )
        |> vec($$),
      'just_an_enum' => $this->just_an_enum,
      'just_a_union' => $this->just_a_union?->__toShape(),
      'optional_just_an_A' => $this->optional_just_an_A?->__toShape(),
      'optional_set_of_i32' => $this->optional_set_of_i32
        |> $$ === null ? null : ThriftUtil::toDArray(Dict\fill_keys($$->toValuesArray(), true), static::class),
      'optional_list_of_i32' => $this->optional_list_of_i32
        |> $$ === null ? null : vec($$),
      'optional_list_of_string' => $this->optional_list_of_string
        |> $$ === null ? null : vec($$),
      'optional_map_of_string_to_i32' => $this->optional_map_of_string_to_i32
        |> $$ === null ? null : dict($$),
      'optional_map_of_string_to_A' => $this->optional_map_of_string_to_A?->map(
        ($_val0) ==> $_val0->__toShape(),
      )
        |> $$ === null ? null : dict($$),
      'optional_map_of_string_to_list_of_i32' => $this->optional_map_of_string_to_list_of_i32?->map(
        ($_val0) ==> vec($_val0),
      )
        |> $$ === null ? null : dict($$),
      'optional_map_of_string_to_list_of_A' => $this->optional_map_of_string_to_list_of_A?->map(
        ($_val0) ==> $_val0->map(
          ($_val1) ==> $_val1->__toShape(),
        )
          |> vec($$),
      )
        |> $$ === null ? null : dict($$),
      'optional_map_of_string_to_set_of_i32' => $this->optional_map_of_string_to_set_of_i32?->map(
        ($_val0) ==> ThriftUtil::toDArray(Dict\fill_keys($_val0, true), static::class),
      )
        |> $$ === null ? null : dict($$),
      'optional_enum' => $this->optional_enum,
      'required_enum_with_default' => $this->required_enum_with_default,
      'string_with_default_value' => $this->string_with_default_value,
      'i32_with_default_value' => $this->i32_with_default_value,
      'double_with_default_value' => $this->double_with_default_value,
      'enum_with_default_value' => $this->enum_with_default_value,
      'A_with_default_value' => $this->A_with_default_value?->__toShape(),
      'set_of_i32_with_default_value' => ThriftUtil::toDArray(Dict\fill_keys($this->set_of_i32_with_default_value->toValuesArray(), true), static::class),
      'map_of_i32_to_string_with_default_value' => dict($this->map_of_i32_to_string_with_default_value),
      'list_of_string_with_default_value' => vec($this->list_of_string_with_default_value),
      'map_of_string_to_list_of_i32_with_default_value' => $this->map_of_string_to_list_of_i32_with_default_value->map(
        ($_val0) ==> vec($_val0),
      )
        |> dict($$),
    );
  }
  public function getInstanceKey()[write_props]: string {
    return \TCompactSerializer::serialize($this);
  }

}