/** * @param MetadataId $id * @param string $typeSchemaName * @param array $fields * @throws InvalidArgumentException */ public function __construct(MetadataId $id, string $typeSchemaName, array $fields = []) { $this->id = $id; if (empty($typeSchemaName)) { throw InvalidArgumentException::emptyValue("type schema name"); } $this->typeSchemaName = $typeSchemaName; $this->fields = $fields; }