// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/exceptions/AlreadyExecutingException.java
// public class AlreadyExecutingException extends RuntimeException{
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnExceptionListener.java
// public interface OnExceptionListener {
//     void onExceptionThrown(Exception e);
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnListResponseListener.java
// public interface OnListResponseListener<T> {
// 
//     void onResponse(int code, List<T> object, Response fullResponse);
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnObjResponseListener.java
// public interface OnObjResponseListener<T> {
// 
//     void onResponse(int code, T object, Response fullResponse);
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnResponseListener.java
// public interface OnResponseListener {
// 
//     void onResponse(int code, Response fullResponse, Exception e);
// 
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnTimeoutListener.java
// public interface OnTimeoutListener {
//     void onTimeout();
// }


import com.greengrowapps.ggarest.exceptions.AlreadyExecutingException;
import com.greengrowapps.ggarest.listeners.OnExceptionListener;
import com.greengrowapps.ggarest.listeners.OnListResponseListener;
import com.greengrowapps.ggarest.listeners.OnObjResponseListener;
import com.greengrowapps.ggarest.listeners.OnResponseListener;
import com.greengrowapps.ggarest.listeners.OnTimeoutListener;
import java.io.File;
import java.util.Collection;
package com.greengrowapps.ggarest;



public interface RequestBuilder {

    RequestBuilder withBody(Object body);
    RequestBuilder withPlainBody(String body);

    RequestBuilder addHeader(String key, String value);
    RequestBuilder addHeaders(Collection<? extends RequestHeader> headers);

    RequestBuilder withTimeout(long millis);

    RequestBuilder onResponse(int statusCode, OnResponseListener listener);
    <T> RequestBuilder onResponse(Class<T> responseClass, int statusCode, OnObjResponseListener<T> listener);
    <T> RequestBuilder onResponse(Class<T> responseClass, int statusCode, OnListResponseListener<T> listener);

    RequestBuilder onSuccess(OnResponseListener listener);
    <T> RequestBuilder onSuccess(Class<T> responseClass, OnObjResponseListener<T> listener);
    <T> RequestBuilder onSuccess(Class<T> responseClass, OnListResponseListener<T> listener);

    RequestBuilder onOther(OnResponseListener listener);
    RequestBuilder onTimeout(OnTimeoutListener onTimeoutListener);

    RestRequest execute() throws AlreadyExecutingException;
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/exceptions/AlreadyExecutingException.java
// public class AlreadyExecutingException extends RuntimeException{
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnExceptionListener.java
// public interface OnExceptionListener {
//     void onExceptionThrown(Exception e);
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnListResponseListener.java
// public interface OnListResponseListener<T> {
// 
//     void onResponse(int code, List<T> object, Response fullResponse);
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnObjResponseListener.java
// public interface OnObjResponseListener<T> {
// 
//     void onResponse(int code, T object, Response fullResponse);
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnResponseListener.java
// public interface OnResponseListener {
// 
//     void onResponse(int code, Response fullResponse, Exception e);
// 
// }
// 
// Path: GgaRestJavaLib/ggarest/src/main/java/com/greengrowapps/ggarest/listeners/OnTimeoutListener.java
// public interface OnTimeoutListener {
//     void onTimeout();
// }


// Path: GgaRestAndroidLib/ggarest/src/main/java/com/greengrowapps/ggarest/RequestBuilder.java
import com.greengrowapps.ggarest.exceptions.AlreadyExecutingException;
import com.greengrowapps.ggarest.listeners.OnExceptionListener;
import com.greengrowapps.ggarest.listeners.OnListResponseListener;
import com.greengrowapps.ggarest.listeners.OnObjResponseListener;
import com.greengrowapps.ggarest.listeners.OnResponseListener;
import com.greengrowapps.ggarest.listeners.OnTimeoutListener;
import java.io.File;
import java.util.Collection;

package com.greengrowapps.ggarest;



public interface RequestBuilder {

    RequestBuilder withBody(Object body);
    RequestBuilder withPlainBody(String body);

    RequestBuilder addHeader(String key, String value);
    RequestBuilder addHeaders(Collection<? extends RequestHeader> headers);

    RequestBuilder withTimeout(long millis);

    RequestBuilder onResponse(int statusCode, OnResponseListener listener);
    <T> RequestBuilder onResponse(Class<T> responseClass, int statusCode, OnObjResponseListener<T> listener);
    <T> RequestBuilder onResponse(Class<T> responseClass, int statusCode, OnListResponseListener<T> listener);

    RequestBuilder onSuccess(OnResponseListener listener);
    <T> RequestBuilder onSuccess(Class<T> responseClass, OnObjResponseListener<T> listener);
    <T> RequestBuilder onSuccess(Class<T> responseClass, OnListResponseListener<T> listener);

    RequestBuilder onOther(OnResponseListener listener);
    RequestBuilder onTimeout(OnTimeoutListener onTimeoutListener);

    RestRequest execute() throws AlreadyExecutingException;
    void executeAndWait() throws AlreadyExecutingException;