// Path: src/main/java/com/greensopinion/swagger/jaxrsgen/MoreObjects.java
// public class MoreObjects {
// 
// 	public static <T> T firstNonNull(T first, T second) {
// 		return first == null ? second : first;
// 	}
// }


import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.URI;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.greensopinion.swagger.jaxrsgen.MoreObjects;
import io.swagger.annotations.ApiModel;
		String typeName = typeNameByClass.get(parameterType);
		if (typeName != null) {
			return typeName;
		}
		if (parameterType.isPrimitive() || parameterType.getPackage().getName().equals("java.lang")) {
			return "string";
		}
		if (parameterType.getName().equals("com.sun.jersey.multipart.MultiPart")) {
			return "File";
		}
		ApiModel apiModel = parameterType.getAnnotation(ApiModel.class);
		typeName = apiModel == null ? null : Strings.emptyToNull(apiModel.value());
		return MoreObjects.firstNonNull(typeName, parameterType.getSimpleName());
	}

	public static Class<?> modelClass(Type type) {
		if (type instanceof ParameterizedType) {
			ParameterizedType parameterizedType = (ParameterizedType) type;
			Type typeArgument = parameterizedType.getActualTypeArguments()[0];
			if (typeArgument instanceof Class) {
				return (Class<?>) typeArgument;
			}
		}
		return (Class<?>) type;
	}

	public static String calculateTypeParameterName(Type type) {
		return calculateTypeName(typeArgument(type));
	}

// Path: src/main/java/com/greensopinion/swagger/jaxrsgen/MoreObjects.java
// public class MoreObjects {
// 
// 	public static <T> T firstNonNull(T first, T second) {
// 		return first == null ? second : first;
// 	}
// }


// Path: src/main/java/com/greensopinion/swagger/jaxrsgen/model/ApiTypes.java
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.net.URI;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Map;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.greensopinion.swagger.jaxrsgen.MoreObjects;
import io.swagger.annotations.ApiModel;

		String typeName = typeNameByClass.get(parameterType);
		if (typeName != null) {
			return typeName;
		}
		if (parameterType.isPrimitive() || parameterType.getPackage().getName().equals("java.lang")) {
			return "string";
		}
		if (parameterType.getName().equals("com.sun.jersey.multipart.MultiPart")) {
			return "File";
		}
		ApiModel apiModel = parameterType.getAnnotation(ApiModel.class);
		typeName = apiModel == null ? null : Strings.emptyToNull(apiModel.value());
		return MoreObjects.firstNonNull(typeName, parameterType.getSimpleName());
	}

	public static Class<?> modelClass(Type type) {
		if (type instanceof ParameterizedType) {
			ParameterizedType parameterizedType = (ParameterizedType) type;
			Type typeArgument = parameterizedType.getActualTypeArguments()[0];
			if (typeArgument instanceof Class) {
				return (Class<?>) typeArgument;
			}
		}
		return (Class<?>) type;
	}

	public static String calculateTypeParameterName(Type type) {
		return calculateTypeName(typeArgument(type));
	}

	private static Class<?> typeArgument(Type type) {