// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/Constants.java
// public class Constants {
//     public static final String LOG_TAG = "MapsPlacesAutoComplete";
//     public static final String MAGIC_HISTORY_VALUE_PRE = "____history____=";
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/json/PlacesApiJsonParser.java
// public interface PlacesApiJsonParser {
//     PlacesAutocompleteResponse autocompleteFromStream(InputStream is) throws JsonParsingException;
// 
//     PlacesDetailsResponse detailsFromStream(InputStream is) throws JsonParsingException;
// 
//     List<Place> readHistoryJson(InputStream in) throws JsonParsingException;
// 
//     void writeHistoryJson(OutputStream os, List<Place> places) throws JsonWritingException;
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesApiException.java
// public class PlacesApiException extends IOException {
// 
//     public PlacesApiException() {
//     }
// 
//     public PlacesApiException(final String detailMessage) {
//         super(detailMessage);
//     }
// 
//     public PlacesApiException(final String detailMessage, final Throwable throwable) {
//         super(detailMessage, throwable);
//     }
// 
//     public PlacesApiException(final Throwable throwable) {
//         super(throwable);
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesApiResponse.java
// public class PlacesApiResponse {
// 
//     /**
//      * API response status. Can and should be used to see if a request was successful
//      */
//     public final Status status;
// 
//     /**
//      * If !status.isSuccessful(), should return an en error message about what went wrong
//      */
//     public final String error_message;
// 
//     public PlacesApiResponse(final Status status, final String error_message) {
//         this.status = status;
//         this.error_message = error_message;
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/Status.java
// public enum Status {
//     @SerializedName("OK")
//     OK(true),
//     @SerializedName("ZERO_RESULTS")
//     ZERO_RESULTS(true),
//     @SerializedName("OVER_QUERY_LIMIT")
//     OVER_QUERY_LIMIT(false),
//     @SerializedName("REQUEST_DENIED")
//     REQUEST_DENIED(false),
//     @SerializedName("INVALID_REQUEST")
//     INVALID_REQUEST(false);
// 
//     private final boolean successful;
// 
//     Status(final boolean successfulResponse) {
//         successful = successfulResponse;
//     }
// 
//     public boolean isSuccessful() {
//         return successful;
//     }
// }


import android.net.Uri;
import android.util.Log;
import com.seatgeek.placesautocomplete.Constants;
import com.seatgeek.placesautocomplete.json.PlacesApiJsonParser;
import com.seatgeek.placesautocomplete.model.PlacesApiException;
import com.seatgeek.placesautocomplete.model.PlacesApiResponse;
import com.seatgeek.placesautocomplete.model.Status;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
package com.seatgeek.placesautocomplete.network;





class OkHttpPlacesHttpClient extends AbstractPlacesHttpClient {
    private final OkHttpClient okHttpClient;

    OkHttpPlacesHttpClient(PlacesApiJsonParser parser) {
        super(parser);

        okHttpClient = new OkHttpClient.Builder()
                .connectTimeout(15L, TimeUnit.SECONDS)
                .readTimeout(15L, TimeUnit.SECONDS)
                .writeTimeout(15L, TimeUnit.SECONDS)
                .build();
    }

    @Override
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/Constants.java
// public class Constants {
//     public static final String LOG_TAG = "MapsPlacesAutoComplete";
//     public static final String MAGIC_HISTORY_VALUE_PRE = "____history____=";
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/json/PlacesApiJsonParser.java
// public interface PlacesApiJsonParser {
//     PlacesAutocompleteResponse autocompleteFromStream(InputStream is) throws JsonParsingException;
// 
//     PlacesDetailsResponse detailsFromStream(InputStream is) throws JsonParsingException;
// 
//     List<Place> readHistoryJson(InputStream in) throws JsonParsingException;
// 
//     void writeHistoryJson(OutputStream os, List<Place> places) throws JsonWritingException;
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesApiException.java
// public class PlacesApiException extends IOException {
// 
//     public PlacesApiException() {
//     }
// 
//     public PlacesApiException(final String detailMessage) {
//         super(detailMessage);
//     }
// 
//     public PlacesApiException(final String detailMessage, final Throwable throwable) {
//         super(detailMessage, throwable);
//     }
// 
//     public PlacesApiException(final Throwable throwable) {
//         super(throwable);
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesApiResponse.java
// public class PlacesApiResponse {
// 
//     /**
//      * API response status. Can and should be used to see if a request was successful
//      */
//     public final Status status;
// 
//     /**
//      * If !status.isSuccessful(), should return an en error message about what went wrong
//      */
//     public final String error_message;
// 
//     public PlacesApiResponse(final Status status, final String error_message) {
//         this.status = status;
//         this.error_message = error_message;
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/Status.java
// public enum Status {
//     @SerializedName("OK")
//     OK(true),
//     @SerializedName("ZERO_RESULTS")
//     ZERO_RESULTS(true),
//     @SerializedName("OVER_QUERY_LIMIT")
//     OVER_QUERY_LIMIT(false),
//     @SerializedName("REQUEST_DENIED")
//     REQUEST_DENIED(false),
//     @SerializedName("INVALID_REQUEST")
//     INVALID_REQUEST(false);
// 
//     private final boolean successful;
// 
//     Status(final boolean successfulResponse) {
//         successful = successfulResponse;
//     }
// 
//     public boolean isSuccessful() {
//         return successful;
//     }
// }


// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/network/OkHttpPlacesHttpClient.java
import android.net.Uri;
import android.util.Log;
import com.seatgeek.placesautocomplete.Constants;
import com.seatgeek.placesautocomplete.json.PlacesApiJsonParser;
import com.seatgeek.placesautocomplete.model.PlacesApiException;
import com.seatgeek.placesautocomplete.model.PlacesApiResponse;
import com.seatgeek.placesautocomplete.model.Status;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;
import java.util.concurrent.TimeUnit;

package com.seatgeek.placesautocomplete.network;





class OkHttpPlacesHttpClient extends AbstractPlacesHttpClient {
    private final OkHttpClient okHttpClient;

    OkHttpPlacesHttpClient(PlacesApiJsonParser parser) {
        super(parser);

        okHttpClient = new OkHttpClient.Builder()
                .connectTimeout(15L, TimeUnit.SECONDS)
                .readTimeout(15L, TimeUnit.SECONDS)
                .writeTimeout(15L, TimeUnit.SECONDS)
                .build();
    }

    @Override
    protected <T extends PlacesApiResponse> T executeNetworkRequest(final Uri uri, final ResponseHandler<T> responseHandler) throws IOException {