// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/AutocompleteResultType.java
// public enum AutocompleteResultType {
//     /**
//      * Any location
//      */
//     GEOCODE("geocode"),
//     /**
//      * Any location represented by a full postal address
//      */
//     ADDRESS("address"),
//     /**
//      * Any location represented by a full postal address that is a business establishment
//      */
// 
//     CITY("(cities)"),
// 
//     ESTABLISHMENT("establishment"),
//     /**
//      * Any location or establishment
//      */
//     NO_TYPE("no_type");
// 
// 
//     private final String queryParam;
// 
//     AutocompleteResultType(final String queryParam) {
//         this.queryParam = queryParam;
//     }
// 
//     public String getQueryParam() {
//         return queryParam;
//     }
// 
//     public static AutocompleteResultType fromEnum(int enumerated) {
//         return AutocompleteResultType.values()[enumerated];
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesAutocompleteResponse.java
// public final class PlacesAutocompleteResponse extends PlacesApiResponse {
// 
//     /**
//      * A list of predicted places from the api based on the given input
//      */
//     public final List<Place> predictions;
// 
//     public PlacesAutocompleteResponse(final Status status, final String error_message, final List<Place> predictions) {
//         super(status, error_message);
//         this.predictions = predictions;
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesDetailsResponse.java
// public final class PlacesDetailsResponse extends PlacesApiResponse {
// 
//     public final PlaceDetails result;
// 
//     public PlacesDetailsResponse(final Status status, final String error_message, final PlaceDetails result) {
//         super(status, error_message);
//         this.result = result;
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/network/PlacesHttpClient.java
// public interface PlacesHttpClient {
//     PlacesAutocompleteResponse executeAutocompleteRequest(Uri uri) throws IOException;
// 
//     PlacesDetailsResponse executeDetailsRequest(Uri uri) throws IOException;
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/util/LocationUtils.java
// public final class LocationUtils {
// 
//     public static String toLatLngString(@NonNull Location location) {
//         return location.getLatitude() + "," + location.getLongitude();
//     }
// 
//     private LocationUtils() {
//     }
// }


import android.location.Location;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.seatgeek.placesautocomplete.model.AutocompleteResultType;
import com.seatgeek.placesautocomplete.model.PlacesAutocompleteResponse;
import com.seatgeek.placesautocomplete.model.PlacesDetailsResponse;
import com.seatgeek.placesautocomplete.network.PlacesHttpClient;
import com.seatgeek.placesautocomplete.util.LocationUtils;
import java.io.IOException;
package com.seatgeek.placesautocomplete;




/**
 * An Abstraction for the Google Maps Places API. Manages the building of requests to the API and
 * executing them using the provided {@link PlacesHttpClient}
 */
public class PlacesApi {
    public static final AutocompleteResultType DEFAULT_RESULT_TYPE = AutocompleteResultType.ADDRESS;

    private static final String PLACES_API_BASE = "https://maps.googleapis.com/maps/api/place";
    private static final String PATH_AUTOCOMPLETE = "autocomplete";
    private static final String PATH_DETAILS = "details";
    private static final String PATH_JSON = "json";
    private static final String PARAMETER_LOCATION = "location";
    private static final String PARAMETER_RADIUS = "radius";
    private static final String PARAMETER_INPUT = "input";
    private static final String PARAMETER_KEY = "key";
    private static final String PARAMETER_COMPONENT = "components";
    private static final String PARAMETER_TYPE = "types";
    private static final String PARAMETER_PLACE_ID = "placeid";
    private static final String PARAMETER_LANGUAGE = "language";

    private static final Long NO_BIAS_RADIUS = 20000000L;
    private static final Location NO_BIAS_LOCATION;

    static {
        NO_BIAS_LOCATION = new Location("none");
        NO_BIAS_LOCATION.setLatitude(0.0d);
        NO_BIAS_LOCATION.setLongitude(0.0d);
    }

    @NonNull
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/AutocompleteResultType.java
// public enum AutocompleteResultType {
//     /**
//      * Any location
//      */
//     GEOCODE("geocode"),
//     /**
//      * Any location represented by a full postal address
//      */
//     ADDRESS("address"),
//     /**
//      * Any location represented by a full postal address that is a business establishment
//      */
// 
//     CITY("(cities)"),
// 
//     ESTABLISHMENT("establishment"),
//     /**
//      * Any location or establishment
//      */
//     NO_TYPE("no_type");
// 
// 
//     private final String queryParam;
// 
//     AutocompleteResultType(final String queryParam) {
//         this.queryParam = queryParam;
//     }
// 
//     public String getQueryParam() {
//         return queryParam;
//     }
// 
//     public static AutocompleteResultType fromEnum(int enumerated) {
//         return AutocompleteResultType.values()[enumerated];
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesAutocompleteResponse.java
// public final class PlacesAutocompleteResponse extends PlacesApiResponse {
// 
//     /**
//      * A list of predicted places from the api based on the given input
//      */
//     public final List<Place> predictions;
// 
//     public PlacesAutocompleteResponse(final Status status, final String error_message, final List<Place> predictions) {
//         super(status, error_message);
//         this.predictions = predictions;
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/model/PlacesDetailsResponse.java
// public final class PlacesDetailsResponse extends PlacesApiResponse {
// 
//     public final PlaceDetails result;
// 
//     public PlacesDetailsResponse(final Status status, final String error_message, final PlaceDetails result) {
//         super(status, error_message);
//         this.result = result;
//     }
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/network/PlacesHttpClient.java
// public interface PlacesHttpClient {
//     PlacesAutocompleteResponse executeAutocompleteRequest(Uri uri) throws IOException;
// 
//     PlacesDetailsResponse executeDetailsRequest(Uri uri) throws IOException;
// }
// 
// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/util/LocationUtils.java
// public final class LocationUtils {
// 
//     public static String toLatLngString(@NonNull Location location) {
//         return location.getLatitude() + "," + location.getLongitude();
//     }
// 
//     private LocationUtils() {
//     }
// }


// Path: placesautocomplete/src/main/java/com/seatgeek/placesautocomplete/PlacesApi.java
import android.location.Location;
import android.net.Uri;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import com.seatgeek.placesautocomplete.model.AutocompleteResultType;
import com.seatgeek.placesautocomplete.model.PlacesAutocompleteResponse;
import com.seatgeek.placesautocomplete.model.PlacesDetailsResponse;
import com.seatgeek.placesautocomplete.network.PlacesHttpClient;
import com.seatgeek.placesautocomplete.util.LocationUtils;
import java.io.IOException;

package com.seatgeek.placesautocomplete;




/**
 * An Abstraction for the Google Maps Places API. Manages the building of requests to the API and
 * executing them using the provided {@link PlacesHttpClient}
 */
public class PlacesApi {
    public static final AutocompleteResultType DEFAULT_RESULT_TYPE = AutocompleteResultType.ADDRESS;

    private static final String PLACES_API_BASE = "https://maps.googleapis.com/maps/api/place";
    private static final String PATH_AUTOCOMPLETE = "autocomplete";
    private static final String PATH_DETAILS = "details";
    private static final String PATH_JSON = "json";
    private static final String PARAMETER_LOCATION = "location";
    private static final String PARAMETER_RADIUS = "radius";
    private static final String PARAMETER_INPUT = "input";
    private static final String PARAMETER_KEY = "key";
    private static final String PARAMETER_COMPONENT = "components";
    private static final String PARAMETER_TYPE = "types";
    private static final String PARAMETER_PLACE_ID = "placeid";
    private static final String PARAMETER_LANGUAGE = "language";

    private static final Long NO_BIAS_RADIUS = 20000000L;
    private static final Location NO_BIAS_LOCATION;

    static {
        NO_BIAS_LOCATION = new Location("none");
        NO_BIAS_LOCATION.setLatitude(0.0d);
        NO_BIAS_LOCATION.setLongitude(0.0d);
    }

    @NonNull
    private final PlacesHttpClient httpClient;