// Path: src/main/java/com/pega/api2swagger/utils/URLUtils.java
// public class URLUtils {
// public static String calculateAPIPath(String endpoint, String basePath) {
// 		
// 		String indexOfRestService = StringUtils.substringAfter(endpoint, basePath);
// 		return indexOfRestService;
// 	}
// 
// 	public static String calculateHostIncludingContext(String endpoint) {
// 		String indexOfRestService = StringUtils.substringBefore(endpoint, "PRRestService");
// 		return indexOfRestService;
// 	}
// 
// 	public static List<String> parsePathParameters(String endpoint){
// 		
// 		List<String> pathParameters = Lists.newArrayList();
// 		Pattern pattern = Pattern.compile("\\{(\\b\\w*\\b)\\}");
// 		Matcher matcher = pattern.matcher(endpoint);
// 		
// 		while(matcher.find()){
// 			pathParameters.add(matcher.group(1));
// 		}
// 		
// 		return pathParameters;
// 	}
// }


import java.util.List;
import java.util.Map;
import com.mashape.unirest.http.HttpMethod;
import com.pega.api2swagger.utils.URLUtils;
		public Builder swaggerJSONFilePath(String aSwaggerJSONFilePath) {
			this.swaggerJSONFilePath = aSwaggerJSONFilePath;
			return this;
		}
		
		public Builder parameters(Map<String, Object> parameters) {
			this.parameters = parameters;
			return this;
		}
		
		public Builder username(String username) {
			this.username = username;
			return this;
		}
		
		public Builder password(String password) {
			this.password = password;
			return this;
		}
		
		public Builder method(String aMethod){
			method = Enum.valueOf(HttpMethod.class, aMethod);
			return this;
		}
		
		public SwaggerGeneratorInput build(){
			return new SwaggerGeneratorInput(endpoint, method, pathParams, headers, parameters, swaggerJSONFilePath, authentication, username, 
											password, host, basePath, URLUtils.calculateAPIPath(endpoint, basePath), apiName, apiSummary, apiDescription, apiTags);
		}

// Path: src/main/java/com/pega/api2swagger/utils/URLUtils.java
// public class URLUtils {
// public static String calculateAPIPath(String endpoint, String basePath) {
// 		
// 		String indexOfRestService = StringUtils.substringAfter(endpoint, basePath);
// 		return indexOfRestService;
// 	}
// 
// 	public static String calculateHostIncludingContext(String endpoint) {
// 		String indexOfRestService = StringUtils.substringBefore(endpoint, "PRRestService");
// 		return indexOfRestService;
// 	}
// 
// 	public static List<String> parsePathParameters(String endpoint){
// 		
// 		List<String> pathParameters = Lists.newArrayList();
// 		Pattern pattern = Pattern.compile("\\{(\\b\\w*\\b)\\}");
// 		Matcher matcher = pattern.matcher(endpoint);
// 		
// 		while(matcher.find()){
// 			pathParameters.add(matcher.group(1));
// 		}
// 		
// 		return pathParameters;
// 	}
// }


// Path: src/main/java/com/pega/api2swagger/dto/SwaggerGeneratorInput.java
import java.util.List;
import java.util.Map;
import com.mashape.unirest.http.HttpMethod;
import com.pega.api2swagger.utils.URLUtils;

		public Builder swaggerJSONFilePath(String aSwaggerJSONFilePath) {
			this.swaggerJSONFilePath = aSwaggerJSONFilePath;
			return this;
		}
		
		public Builder parameters(Map<String, Object> parameters) {
			this.parameters = parameters;
			return this;
		}
		
		public Builder username(String username) {
			this.username = username;
			return this;
		}
		
		public Builder password(String password) {
			this.password = password;
			return this;
		}
		
		public Builder method(String aMethod){
			method = Enum.valueOf(HttpMethod.class, aMethod);
			return this;
		}
		
		public SwaggerGeneratorInput build(){
			return new SwaggerGeneratorInput(endpoint, method, pathParams, headers, parameters, swaggerJSONFilePath, authentication, username, 
											password, host, basePath, URLUtils.calculateAPIPath(endpoint, basePath), apiName, apiSummary, apiDescription, apiTags);
		}

		public Builder authentication(boolean isAuthenticationNeeded) {