diff --git a/third-party/thrift/src/thrift/compiler/generate/t_hack_generator.cc b/third-party/thrift/src/thrift/compiler/generate/t_hack_generator.cc index 62dfd5de545421..bbbe6ce09068f2 100644 --- a/third-party/thrift/src/thrift/compiler/generate/t_hack_generator.cc +++ b/third-party/thrift/src/thrift/compiler/generate/t_hack_generator.cc @@ -157,6 +157,9 @@ class t_hack_generator : public t_concat_generator { } else if (no_use_hack_collections_ && arrays_) { throw std::runtime_error( "Don't use no_use_hack_collections with arrays. Just use arrays"); + } else if (arraysets_ && !(legacy_arrays_ || hack_collections_)) { + throw std::runtime_error( + "Don't use arraysets without either legacy_arrays or hack_collections"); } else if (mangled_services_ && has_hack_namespace) { throw std::runtime_error( "Don't use mangledsvcs with hack namespaces or package."); @@ -1386,7 +1389,7 @@ void t_hack_generator::generate_json_container( indent(out) << container << " = vec[];\n"; } } else if (ttype->is_set()) { - if (arraysets_ && (legacy_arrays_ || hack_collections_)) { + if (arraysets_) { indent(out) << container << " = dict[];\n"; } else if (hack_collections_) { indent(out) << container << " = Set {};\n"; @@ -1435,7 +1438,7 @@ void t_hack_generator::generate_json_set_element( t_field felem(tset->get_elem_type(), elem); indent(out) << declare_field(&felem, true, true, true).substr(1) << "\n"; generate_json_field(out, namer, &felem, "", "", value); - if (arraysets_ && (legacy_arrays_ || hack_collections_)) { + if (arraysets_) { indent(out) << prefix_thrift << "[" << elem << "] = true;\n"; } else if (hack_collections_) { indent(out) << prefix_thrift << "->add(" << elem << ");\n"; @@ -2304,7 +2307,7 @@ std::string t_hack_generator::render_default_value(const t_type* type) { dval = "vec[]"; } } else if (type->is_set()) { - if (arraysets_ && (legacy_arrays_ || hack_collections_)) { + if (arraysets_) { dval = "dict[]"; } else if (hack_collections_) { dval = "Set {}"; @@ -3034,7 +3037,7 @@ void t_hack_generator::generate_php_type_spec( } indent(out) << "'etype' => " << type_to_enum(etype) << ",\n"; generate_php_type_spec_shape_elt_helper(out, "elem", etype, depth); - if (arraysets_ && (hack_collections_ || legacy_arrays_)) { + if (arraysets_) { indent(out) << "'format' => 'array',\n"; } else if (hack_collections_) { indent(out) << "'format' => 'collection',\n"; @@ -6684,14 +6687,7 @@ std::string t_hack_generator::type_to_typehint( } else if (const auto* tset = dynamic_cast(ttype)) { std::string prefix; std::string suffix = ">"; - // The order of the ifs matters in the code below. - // Even though there is a small amount of duplicated code below, - // any alternative approaches to achieve the same outcome seem - // make it harder to see the order clearly. - if (arraysets_) { - prefix = "dict"; - suffix = ", bool>"; - } else if (!legacy_arrays_ && !hack_collections_) { + if (!legacy_arrays_ && !hack_collections_) { prefix = "keyset"; } else if (arraysets_ || variations[TypeToTypehintVariations::IS_SHAPE]) { prefix = "dict"; @@ -7440,7 +7436,7 @@ std::string t_hack_generator::declare_field( result += " = vec[]"; } } else if (type->is_set()) { - if (arraysets_ && (legacy_arrays_ || hack_collections_)) { + if (arraysets_) { result += " = dict[]"; } else if (hack_collections_) { result += " = Set {}"; diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/cmd b/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/cmd index 795e94b8bf7400..a2e759688f6a41 100644 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/cmd +++ b/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/cmd @@ -1,2 +1 @@ hack: hack:shapes=1,shapes_allow_unknown_fields=1,arrays=1,shapes_use_pipe_structure=1 src/module.thrift -hack_array_sets: hack:shapes=1,shapes_allow_unknown_fields=1,arrays=1,shapes_use_pipe_structure=1,arraysets=1 src/module.thrift diff --git a/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/out/hack_array_sets/gen-hack/module_types.php b/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/out/hack_array_sets/gen-hack/module_types.php deleted file mode 100644 index 36237d135d894c..00000000000000 --- a/third-party/thrift/src/thrift/compiler/test/fixtures/shape_hack_arrays/out/hack_array_sets/gen-hack/module_types.php +++ /dev/null @@ -1,1630 +0,0 @@ - shape( - 'var' => 'a', - 'type' => \TType::STRING, - ), - 2 => shape( - 'var' => 'map_of_string_to_string', - 'type' => \TType::MAP, - 'ktype' => \TType::STRING, - 'vtype' => \TType::STRING, - 'key' => shape( - 'type' => \TType::STRING, - ), - 'val' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'harray', - ), - ]; - const dict FIELDMAP = dict[ - 'a' => 1, - 'map_of_string_to_string' => 2, - ]; - - const type TConstructorShape = shape( - ?'a' => ?string, - ?'map_of_string_to_string' => ?dict, - ); - - const type TShape = shape( - 'a' => string, - 'map_of_string_to_string' => dict, - ... - ); - const int STRUCTURAL_ID = 3181416921594932928; - /** - * Original thrift field:- - * 1: string a - */ - public string $a; - /** - * Original thrift field:- - * 2: map map_of_string_to_string - */ - public dict $map_of_string_to_string; - - public function __construct(?string $a = null, ?dict $map_of_string_to_string = null)[] { - $this->a = $a ?? ''; - $this->map_of_string_to_string = $map_of_string_to_string ?? dict[]; - } - - public static function withDefaultValues()[]: this { - return new static(); - } - - public static function fromShape(self::TConstructorShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'a'), - Shapes::idx($shape, 'map_of_string_to_string'), - ); - } - - public function getName()[]: string { - return 'A'; - } - - 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", - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 2, - "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_STRING_TYPE, - ) - ), - ) - ), - ) - ), - "name" => "map_of_string_to_string", - ) - ), - ], - "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'], - $shape['map_of_string_to_string'], - ); - } - - public function __toShape()[]: self::TShape { - return shape( - 'a' => $this->a, - 'map_of_string_to_string' => $this->map_of_string_to_string, - ); - } - 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' => 'map_of_string_to_string', - 'type' => \TType::MAP, - 'ktype' => \TType::STRING, - 'vtype' => \TType::STRING, - 'key' => shape( - 'type' => \TType::STRING, - ), - 'val' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'harray', - ), - 2 => 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' => 'harray', - ), - 3 => 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' => A::class, - ), - 'format' => 'harray', - ), - 5 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 6 => 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' => 'harray', - ), - 'format' => 'harray', - ), - 7 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 8 => shape( - 'var' => 'list_of_string', - 'type' => \TType::LST, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'harray', - ), - 9 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 12 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - ]; - const dict FIELDMAP = dict[ - 'map_of_string_to_string' => 1, - 'map_of_string_to_i32' => 2, - 'map_of_string_to_A' => 3, - 'map_of_string_to_list_of_A' => 5, - 'map_of_string_to_map_of_string_to_i32' => 6, - 'map_of_string_to_map_of_string_to_A' => 7, - 'list_of_string' => 8, - 'list_of_map_of_string_to_A' => 9, - 'list_of_map_of_string_to_list_of_A' => 12, - ]; - - const type TConstructorShape = shape( - ?'map_of_string_to_string' => ?dict, - ?'map_of_string_to_i32' => ?dict, - ?'map_of_string_to_A' => ?dict, - ?'map_of_string_to_list_of_A' => ?dict>, - ?'map_of_string_to_map_of_string_to_i32' => ?dict>, - ?'map_of_string_to_map_of_string_to_A' => ?dict>, - ?'list_of_string' => ?vec, - ?'list_of_map_of_string_to_A' => ?vec>, - ?'list_of_map_of_string_to_list_of_A' => ?vec>>, - ); - - const type TShape = shape( - 'map_of_string_to_string' => dict, - 'map_of_string_to_i32' => dict, - 'map_of_string_to_A' => dict, - 'map_of_string_to_list_of_A' => dict>, - 'map_of_string_to_map_of_string_to_i32' => dict>, - 'map_of_string_to_map_of_string_to_A' => dict>, - 'list_of_string' => vec, - 'list_of_map_of_string_to_A' => vec>, - 'list_of_map_of_string_to_list_of_A' => vec>>, - ... - ); - const int STRUCTURAL_ID = 924423330915405193; - /** - * Original thrift field:- - * 1: map map_of_string_to_string - */ - public dict $map_of_string_to_string; - /** - * Original thrift field:- - * 2: map map_of_string_to_i32 - */ - public dict $map_of_string_to_i32; - /** - * Original thrift field:- - * 3: map map_of_string_to_A - */ - public dict $map_of_string_to_A; - /** - * Original thrift field:- - * 5: map> map_of_string_to_list_of_A - */ - public dict> $map_of_string_to_list_of_A; - /** - * Original thrift field:- - * 6: map> map_of_string_to_map_of_string_to_i32 - */ - public dict> $map_of_string_to_map_of_string_to_i32; - /** - * Original thrift field:- - * 7: map> map_of_string_to_map_of_string_to_A - */ - public dict> $map_of_string_to_map_of_string_to_A; - /** - * Original thrift field:- - * 8: list list_of_string - */ - public vec $list_of_string; - /** - * Original thrift field:- - * 9: list> list_of_map_of_string_to_A - */ - public vec> $list_of_map_of_string_to_A; - /** - * Original thrift field:- - * 12: list>> list_of_map_of_string_to_list_of_A - */ - public vec>> $list_of_map_of_string_to_list_of_A; - - public function __construct(?dict $map_of_string_to_string = null, ?dict $map_of_string_to_i32 = null, ?dict $map_of_string_to_A = null, ?dict> $map_of_string_to_list_of_A = null, ?dict> $map_of_string_to_map_of_string_to_i32 = null, ?dict> $map_of_string_to_map_of_string_to_A = null, ?vec $list_of_string = null, ?vec> $list_of_map_of_string_to_A = null, ?vec>> $list_of_map_of_string_to_list_of_A = null)[] { - $this->map_of_string_to_string = $map_of_string_to_string ?? dict[]; - $this->map_of_string_to_i32 = $map_of_string_to_i32 ?? dict[]; - $this->map_of_string_to_A = $map_of_string_to_A ?? dict[]; - $this->map_of_string_to_list_of_A = $map_of_string_to_list_of_A ?? dict[]; - $this->map_of_string_to_map_of_string_to_i32 = $map_of_string_to_map_of_string_to_i32 ?? dict[]; - $this->map_of_string_to_map_of_string_to_A = $map_of_string_to_map_of_string_to_A ?? dict[]; - $this->list_of_string = $list_of_string ?? vec[]; - $this->list_of_map_of_string_to_A = $list_of_map_of_string_to_A ?? vec[]; - $this->list_of_map_of_string_to_list_of_A = $list_of_map_of_string_to_list_of_A ?? vec[]; - } - - public static function withDefaultValues()[]: this { - return new static(); - } - - public static function fromShape(self::TConstructorShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'map_of_string_to_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_A'), - 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_string'), - Shapes::idx($shape, 'list_of_map_of_string_to_A'), - Shapes::idx($shape, 'list_of_map_of_string_to_list_of_A'), - ); - } - - public function getName()[]: string { - return 'B'; - } - - 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_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_STRING_TYPE, - ) - ), - ) - ), - ) - ), - "name" => "map_of_string_to_string", - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 2, - "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" => 3, - "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" => 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_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" => 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_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" => 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_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" => 8, - "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" => 9, - "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" => 12, - "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", - ) - ), - ], - "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['map_of_string_to_string'], - $shape['map_of_string_to_i32'], - $shape['map_of_string_to_A'] - |> Dict\map( - $$, - $_val0 ==> $_val0 - |> A::__fromShape($$), - ), - $shape['map_of_string_to_list_of_A'] - |> Dict\map( - $$, - $_val2 ==> $_val2 - |> Vec\map( - $$, - $_val1 ==> $_val1 - |> A::__fromShape($$), - ), - ), - $shape['map_of_string_to_map_of_string_to_i32'], - $shape['map_of_string_to_map_of_string_to_A'] - |> Dict\map( - $$, - $_val4 ==> $_val4 - |> Dict\map( - $$, - $_val3 ==> $_val3 - |> A::__fromShape($$), - ), - ), - $shape['list_of_string'], - $shape['list_of_map_of_string_to_A'] - |> Vec\map( - $$, - $_val6 ==> $_val6 - |> Dict\map( - $$, - $_val5 ==> $_val5 - |> A::__fromShape($$), - ), - ), - $shape['list_of_map_of_string_to_list_of_A'] - |> Vec\map( - $$, - $_val9 ==> $_val9 - |> Dict\map( - $$, - $_val8 ==> $_val8 - |> Vec\map( - $$, - $_val7 ==> $_val7 - |> A::__fromShape($$), - ), - ), - ), - ); - } - - public function __toShape()[]: self::TShape { - return shape( - 'map_of_string_to_string' => $this->map_of_string_to_string, - 'map_of_string_to_i32' => $this->map_of_string_to_i32, - 'map_of_string_to_A' => $this->map_of_string_to_A - |> Dict\map( - $$, - ($_val0) ==> $_val0->__toShape(), - ), - 'map_of_string_to_list_of_A' => $this->map_of_string_to_list_of_A - |> Dict\map( - $$, - ($_val0) ==> $_val0 - |> Vec\map( - $$, - ($_val1) ==> $_val1->__toShape(), - ), - ), - 'map_of_string_to_map_of_string_to_i32' => $this->map_of_string_to_map_of_string_to_i32, - 'map_of_string_to_map_of_string_to_A' => $this->map_of_string_to_map_of_string_to_A - |> Dict\map( - $$, - ($_val0) ==> $_val0 - |> Dict\map( - $$, - ($_val1) ==> $_val1->__toShape(), - ), - ), - 'list_of_string' => $this->list_of_string, - 'list_of_map_of_string_to_A' => $this->list_of_map_of_string_to_A - |> Vec\map( - $$, - ($_val0) ==> $_val0 - |> Dict\map( - $$, - ($_val1) ==> $_val1->__toShape(), - ), - ), - 'list_of_map_of_string_to_list_of_A' => $this->list_of_map_of_string_to_list_of_A - |> Vec\map( - $$, - ($_val0) ==> $_val0 - |> Dict\map( - $$, - ($_val1) ==> $_val1 - |> Vec\map( - $$, - ($_val2) ==> $_val2->__toShape(), - ), - ), - ), - ); - } - public function getInstanceKey()[write_props]: string { - return \TCompactSerializer::serialize($this); - } - -} - -/** - * Original thrift struct:- - * C - */ -class C implements \IThriftSyncStruct, \IThriftStructMetadata, \IThriftShapishSyncStruct { - use \ThriftSerializationTrait; - - const \ThriftStructTypes::TSpec SPEC = dict[ - 1 => shape( - 'var' => 'map_of_string_to_string', - 'type' => \TType::MAP, - 'ktype' => \TType::STRING, - 'vtype' => \TType::STRING, - 'key' => shape( - 'type' => \TType::STRING, - ), - 'val' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'harray', - ), - 2 => 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' => 'harray', - ), - 3 => 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' => A::class, - ), - 'format' => 'harray', - ), - 5 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 6 => 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' => 'harray', - ), - 'format' => 'harray', - ), - 7 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 8 => shape( - 'var' => 'list_of_string', - 'type' => \TType::LST, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'harray', - ), - 9 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 12 => 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' => A::class, - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 'format' => 'harray', - ), - 13 => shape( - 'var' => 'set_of_string', - 'type' => \TType::SET, - 'etype' => \TType::STRING, - 'elem' => shape( - 'type' => \TType::STRING, - ), - 'format' => 'harray', - ), - ]; - const dict FIELDMAP = dict[ - 'map_of_string_to_string' => 1, - 'map_of_string_to_i32' => 2, - 'map_of_string_to_A' => 3, - 'map_of_string_to_list_of_A' => 5, - 'map_of_string_to_map_of_string_to_i32' => 6, - 'map_of_string_to_map_of_string_to_A' => 7, - 'list_of_string' => 8, - 'list_of_map_of_string_to_A' => 9, - 'list_of_map_of_string_to_list_of_A' => 12, - 'set_of_string' => 13, - ]; - - const type TConstructorShape = shape( - ?'map_of_string_to_string' => ?dict, - ?'map_of_string_to_i32' => ?dict, - ?'map_of_string_to_A' => ?dict, - ?'map_of_string_to_list_of_A' => ?dict>, - ?'map_of_string_to_map_of_string_to_i32' => ?dict>, - ?'map_of_string_to_map_of_string_to_A' => ?dict>, - ?'list_of_string' => ?vec, - ?'list_of_map_of_string_to_A' => ?vec>, - ?'list_of_map_of_string_to_list_of_A' => ?vec>>, - ?'set_of_string' => ?dict, - ); - - const type TShape = shape( - ?'map_of_string_to_string' => ?dict, - ?'map_of_string_to_i32' => ?dict, - ?'map_of_string_to_A' => ?dict, - ?'map_of_string_to_list_of_A' => ?dict>, - ?'map_of_string_to_map_of_string_to_i32' => ?dict>, - ?'map_of_string_to_map_of_string_to_A' => ?dict>, - ?'list_of_string' => ?vec, - ?'list_of_map_of_string_to_A' => ?vec>, - ?'list_of_map_of_string_to_list_of_A' => ?vec>>, - 'set_of_string' => dict, - ... - ); - const int STRUCTURAL_ID = 2265943457444496748; - /** - * Original thrift field:- - * 1: map map_of_string_to_string - */ - public ?dict $map_of_string_to_string; - /** - * Original thrift field:- - * 2: map map_of_string_to_i32 - */ - public ?dict $map_of_string_to_i32; - /** - * Original thrift field:- - * 3: map map_of_string_to_A - */ - public ?dict $map_of_string_to_A; - /** - * Original thrift field:- - * 5: map> map_of_string_to_list_of_A - */ - public ?dict> $map_of_string_to_list_of_A; - /** - * Original thrift field:- - * 6: map> map_of_string_to_map_of_string_to_i32 - */ - public ?dict> $map_of_string_to_map_of_string_to_i32; - /** - * Original thrift field:- - * 7: map> map_of_string_to_map_of_string_to_A - */ - public ?dict> $map_of_string_to_map_of_string_to_A; - /** - * Original thrift field:- - * 8: list list_of_string - */ - public ?vec $list_of_string; - /** - * Original thrift field:- - * 9: list> list_of_map_of_string_to_A - */ - public ?vec> $list_of_map_of_string_to_A; - /** - * Original thrift field:- - * 12: list>> list_of_map_of_string_to_list_of_A - */ - public ?vec>> $list_of_map_of_string_to_list_of_A; - /** - * Original thrift field:- - * 13: set set_of_string - */ - public dict $set_of_string; - - public function __construct(?dict $map_of_string_to_string = null, ?dict $map_of_string_to_i32 = null, ?dict $map_of_string_to_A = null, ?dict> $map_of_string_to_list_of_A = null, ?dict> $map_of_string_to_map_of_string_to_i32 = null, ?dict> $map_of_string_to_map_of_string_to_A = null, ?vec $list_of_string = null, ?vec> $list_of_map_of_string_to_A = null, ?vec>> $list_of_map_of_string_to_list_of_A = null, ?dict $set_of_string = null)[] { - $this->map_of_string_to_string = $map_of_string_to_string; - $this->map_of_string_to_i32 = $map_of_string_to_i32; - $this->map_of_string_to_A = $map_of_string_to_A; - $this->map_of_string_to_list_of_A = $map_of_string_to_list_of_A; - $this->map_of_string_to_map_of_string_to_i32 = $map_of_string_to_map_of_string_to_i32; - $this->map_of_string_to_map_of_string_to_A = $map_of_string_to_map_of_string_to_A; - $this->list_of_string = $list_of_string; - $this->list_of_map_of_string_to_A = $list_of_map_of_string_to_A; - $this->list_of_map_of_string_to_list_of_A = $list_of_map_of_string_to_list_of_A; - $this->set_of_string = $set_of_string ?? keyset[ - ]; - } - - public static function withDefaultValues()[]: this { - return new static(); - } - - public static function fromShape(self::TConstructorShape $shape)[]: this { - return new static( - Shapes::idx($shape, 'map_of_string_to_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_A'), - 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_string'), - Shapes::idx($shape, 'list_of_map_of_string_to_A'), - Shapes::idx($shape, 'list_of_map_of_string_to_list_of_A'), - Shapes::idx($shape, 'set_of_string'), - ); - } - - public function getName()[]: string { - return 'C'; - } - - public static function getStructMetadata()[]: \tmeta_ThriftStruct { - return tmeta_ThriftStruct::fromShape( - shape( - "name" => "module.C", - "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_STRING_TYPE, - ) - ), - "valueType" => tmeta_ThriftType::fromShape( - shape( - "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), - ) - ), - ) - ), - "name" => "map_of_string_to_string", - "is_optional" => true, - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 2, - "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", - "is_optional" => true, - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 3, - "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", - "is_optional" => true, - ) - ), - 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_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", - "is_optional" => true, - ) - ), - 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_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", - "is_optional" => true, - ) - ), - 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_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", - "is_optional" => true, - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 8, - "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", - "is_optional" => true, - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 9, - "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", - "is_optional" => true, - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 12, - "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", - "is_optional" => true, - ) - ), - tmeta_ThriftField::fromShape( - shape( - "id" => 13, - "type" => tmeta_ThriftType::fromShape( - shape( - "t_set" => tmeta_ThriftSetType::fromShape( - shape( - "valueType" => tmeta_ThriftType::fromShape( - shape( - "t_primitive" => tmeta_ThriftPrimitiveType::THRIFT_STRING_TYPE, - ) - ), - ) - ), - ) - ), - "name" => "set_of_string", - ) - ), - ], - "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, 'map_of_string_to_string'), - Shapes::idx($shape, 'map_of_string_to_i32'), - Shapes::idx($shape, 'map_of_string_to_A') |> $$ === null ? null : ($$ - |> Dict\map( - $$, - $_val0 ==> $_val0 - |> A::__fromShape($$), - )), - Shapes::idx($shape, 'map_of_string_to_list_of_A') |> $$ === null ? null : ($$ - |> Dict\map( - $$, - $_val2 ==> $_val2 - |> Vec\map( - $$, - $_val1 ==> $_val1 - |> A::__fromShape($$), - ), - )), - Shapes::idx($shape, 'map_of_string_to_map_of_string_to_i32'), - Shapes::idx($shape, 'map_of_string_to_map_of_string_to_A') |> $$ === null ? null : ($$ - |> Dict\map( - $$, - $_val4 ==> $_val4 - |> Dict\map( - $$, - $_val3 ==> $_val3 - |> A::__fromShape($$), - ), - )), - Shapes::idx($shape, 'list_of_string'), - Shapes::idx($shape, 'list_of_map_of_string_to_A') |> $$ === null ? null : ($$ - |> Vec\map( - $$, - $_val6 ==> $_val6 - |> Dict\map( - $$, - $_val5 ==> $_val5 - |> A::__fromShape($$), - ), - )), - Shapes::idx($shape, 'list_of_map_of_string_to_list_of_A') |> $$ === null ? null : ($$ - |> Vec\map( - $$, - $_val9 ==> $_val9 - |> Dict\map( - $$, - $_val8 ==> $_val8 - |> Vec\map( - $$, - $_val7 ==> $_val7 - |> A::__fromShape($$), - ), - ), - )), - $shape['set_of_string'], - ); - } - - public function __toShape()[]: self::TShape { - return shape( - 'map_of_string_to_string' => $this->map_of_string_to_string, - 'map_of_string_to_i32' => $this->map_of_string_to_i32, - 'map_of_string_to_A' => $this->map_of_string_to_A - |> $$ === null - ? null - : Dict\map( - $$, - ($_val0) ==> $_val0->__toShape(), - ), - 'map_of_string_to_list_of_A' => $this->map_of_string_to_list_of_A - |> $$ === null - ? null - : Dict\map( - $$, - ($_val0) ==> $_val0 - |> Vec\map( - $$, - ($_val1) ==> $_val1->__toShape(), - ), - ), - 'map_of_string_to_map_of_string_to_i32' => $this->map_of_string_to_map_of_string_to_i32, - 'map_of_string_to_map_of_string_to_A' => $this->map_of_string_to_map_of_string_to_A - |> $$ === null - ? null - : Dict\map( - $$, - ($_val0) ==> $_val0 - |> Dict\map( - $$, - ($_val1) ==> $_val1->__toShape(), - ), - ), - 'list_of_string' => $this->list_of_string, - 'list_of_map_of_string_to_A' => $this->list_of_map_of_string_to_A - |> $$ === null - ? null - : Vec\map( - $$, - ($_val0) ==> $_val0 - |> Dict\map( - $$, - ($_val1) ==> $_val1->__toShape(), - ), - ), - 'list_of_map_of_string_to_list_of_A' => $this->list_of_map_of_string_to_list_of_A - |> $$ === null - ? null - : Vec\map( - $$, - ($_val0) ==> $_val0 - |> Dict\map( - $$, - ($_val1) ==> $_val1 - |> Vec\map( - $$, - ($_val2) ==> $_val2->__toShape(), - ), - ), - ), - 'set_of_string' => $this->set_of_string, - ); - } - public function getInstanceKey()[write_props]: string { - return \TCompactSerializer::serialize($this); - } - -} -