// Path: src/main/java/com/sigopt/Sigopt.java
// public abstract class Sigopt {
//     public static final String VERSION = "6.3.0";
//     public static final String apiVersion = "v1";
// 
//     public static volatile String clientToken;
// 
//     private static volatile long timeout = 10 * 1000;
//     private static volatile String apiBase = "https://api.sigopt.com";
//     private static volatile Proxy connectionProxy = null;
//     private static volatile PasswordAuthentication proxyCredential = null;
// 
//     public static void setApiBase(String apiBase) {
//         Sigopt.apiBase = apiBase;
//     }
// 
//     public static String getApiBase() {
//         return Sigopt.apiBase;
//     }
// 
//     public static void setConnectionProxy(String host, int port) {
//         Sigopt.setConnectionProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(host, port)));
//     }
// 
//     public static void setConnectionProxy(Proxy proxy) {
//         Sigopt.connectionProxy = proxy;
//     }
// 
//     public static Proxy getConnectionProxy() {
//         return Sigopt.connectionProxy;
//     }
// 
//     public static void setProxyCredential(PasswordAuthentication auth) {
//         Sigopt.proxyCredential = auth;
//     }
// 
//     public static PasswordAuthentication getProxyCredential() {
//         return Sigopt.proxyCredential;
//     }
// 
//     public static void setConnectionTimeoutMs(long timeout) {
//         Sigopt.timeout = timeout;
//     }
// 
//     public static long getConnectionTimeoutMs() {
//         return Sigopt.timeout;
//     }
// }
// 
// Path: src/main/java/com/sigopt/exception/APIConnectionError.java
// public class APIConnectionError extends SigoptException {
//     public APIConnectionError(String message) {
//         super(message);
//     }
// 
//     public APIConnectionError(String message, Throwable e) {
//         super(message, e);
//     }
// }
// 
// Path: src/main/java/com/sigopt/exception/APIException.java
// public class APIException extends SigoptException {
//     APIMethod apiMethod;
// 
//     public APIException(String message, APIMethod apiMethod) {
//         super(message);
//         this.apiMethod = apiMethod;
//     }
// 
//     public APIMethod getApiMethod() {
//         return apiMethod;
//     }
// 
//     public String getBody() {
//         return apiMethod.response.body;
//     }
// 
//     public Integer getCode() {
//         return apiMethod.response.code;
//     }
// }
// 
// Path: src/main/java/com/sigopt/exception/SigoptException.java
// public abstract class SigoptException extends Exception {
//     private static final long serialVersionUID = 1L;
// 
//     public SigoptException(String message) {
//         super(message, null);
//     }
// 
//     public SigoptException(String message, Throwable e) {
//         super(message, e);
//     }
// }


import com.sigopt.Sigopt;
import com.sigopt.exception.APIConnectionError;
import com.sigopt.exception.APIException;
import com.sigopt.exception.SigoptException;
import java.util.HashMap;
import java.util.Map;
        public Builder method(String method) {
            this.method = method;
            return this;
        }

        public Builder path(String path) {
            this.path = path;
            return this;
        }

        public Builder params(Map<String, Object> params) {
            this.params = params;
            return this;
        }

        public Builder addParam(String key, Object value) {
            this.params = MapHelper.ensure(this.params);
            this.params.put(key, value);
            return this;
        }

        public Builder removeParam(String key) {
            this.params = MapHelper.ensure(this.params);
            this.params.remove(key);
            return this;
        }

        public Builder addPathComponent(String key, String value) {
            this.pathComponents = MapHelper.ensure(this.pathComponents);
            this.pathComponents.put(key, value);
// Path: src/main/java/com/sigopt/Sigopt.java
// public abstract class Sigopt {
//     public static final String VERSION = "6.3.0";
//     public static final String apiVersion = "v1";
// 
//     public static volatile String clientToken;
// 
//     private static volatile long timeout = 10 * 1000;
//     private static volatile String apiBase = "https://api.sigopt.com";
//     private static volatile Proxy connectionProxy = null;
//     private static volatile PasswordAuthentication proxyCredential = null;
// 
//     public static void setApiBase(String apiBase) {
//         Sigopt.apiBase = apiBase;
//     }
// 
//     public static String getApiBase() {
//         return Sigopt.apiBase;
//     }
// 
//     public static void setConnectionProxy(String host, int port) {
//         Sigopt.setConnectionProxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(host, port)));
//     }
// 
//     public static void setConnectionProxy(Proxy proxy) {
//         Sigopt.connectionProxy = proxy;
//     }
// 
//     public static Proxy getConnectionProxy() {
//         return Sigopt.connectionProxy;
//     }
// 
//     public static void setProxyCredential(PasswordAuthentication auth) {
//         Sigopt.proxyCredential = auth;
//     }
// 
//     public static PasswordAuthentication getProxyCredential() {
//         return Sigopt.proxyCredential;
//     }
// 
//     public static void setConnectionTimeoutMs(long timeout) {
//         Sigopt.timeout = timeout;
//     }
// 
//     public static long getConnectionTimeoutMs() {
//         return Sigopt.timeout;
//     }
// }
// 
// Path: src/main/java/com/sigopt/exception/APIConnectionError.java
// public class APIConnectionError extends SigoptException {
//     public APIConnectionError(String message) {
//         super(message);
//     }
// 
//     public APIConnectionError(String message, Throwable e) {
//         super(message, e);
//     }
// }
// 
// Path: src/main/java/com/sigopt/exception/APIException.java
// public class APIException extends SigoptException {
//     APIMethod apiMethod;
// 
//     public APIException(String message, APIMethod apiMethod) {
//         super(message);
//         this.apiMethod = apiMethod;
//     }
// 
//     public APIMethod getApiMethod() {
//         return apiMethod;
//     }
// 
//     public String getBody() {
//         return apiMethod.response.body;
//     }
// 
//     public Integer getCode() {
//         return apiMethod.response.code;
//     }
// }
// 
// Path: src/main/java/com/sigopt/exception/SigoptException.java
// public abstract class SigoptException extends Exception {
//     private static final long serialVersionUID = 1L;
// 
//     public SigoptException(String message) {
//         super(message, null);
//     }
// 
//     public SigoptException(String message, Throwable e) {
//         super(message, e);
//     }
// }


// Path: src/main/java/com/sigopt/net/APIMethod.java
import com.sigopt.Sigopt;
import com.sigopt.exception.APIConnectionError;
import com.sigopt.exception.APIException;
import com.sigopt.exception.SigoptException;
import java.util.HashMap;
import java.util.Map;

        public Builder method(String method) {
            this.method = method;
            return this;
        }

        public Builder path(String path) {
            this.path = path;
            return this;
        }

        public Builder params(Map<String, Object> params) {
            this.params = params;
            return this;
        }

        public Builder addParam(String key, Object value) {
            this.params = MapHelper.ensure(this.params);
            this.params.put(key, value);
            return this;
        }

        public Builder removeParam(String key) {
            this.params = MapHelper.ensure(this.params);
            this.params.remove(key);
            return this;
        }

        public Builder addPathComponent(String key, String value) {
            this.pathComponents = MapHelper.ensure(this.pathComponents);
            this.pathComponents.put(key, value);
            return this;