@Override
    public TypeSerializer buildTypeSerializer(final SerializationConfig config, final JavaType baseType,
                                              final Collection<NamedType> subtypes) {
        final TypeIdResolver idRes = this.idResolver(config, baseType, typeValidator, subtypes, true, false);
        switch (version) {
            case V2_0:
                return new GraphSONTypeSerializerV2(idRes, this.getTypeProperty(), typeInfo, valuePropertyName);
            case V3_0:
                return new GraphSONTypeSerializerV3(idRes, this.getTypeProperty(), typeInfo, valuePropertyName);
            case V4_0:
            default:
                return new GraphSONTypeSerializerV4(idRes, this.getTypeProperty(), typeInfo, valuePropertyName);
        }
    }
Creates the Type serializers as well as the Typed deserializers that will be provided to the serializers and
deserializers. Contains the typeInfo level that should be provided by the GraphSONMapper.

@author Kevin Gallardo (https://kgdo.me)
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTypeResolverBuilder.java