src/Model/ModelHydrator.php
private function guessCollectionClassname(array $data): string
    {
        switch (true) {
            case !empty($data['@type']) &&
            'hydra:PagedCollection' === $data['@type']:
                return HydraPaginatedCollection::class;

            case array_key_exists('_embedded', $data):
                return HalCollection::class;

            default:
                return Collection::class;
        }
    }
private function guessCollectionClassname(array $data): string
    {
        switch (true) {
            case !empty($data['@type']) &&
            'hydra:PagedCollection' === $data['@type']:
                return HydraPaginatedCollection::class;

            case array_key_exists('_embedded', $data):
                return HalCollection::class;

            default:
                return Collection::class;
        }
    }
guess collection classname according to response data