Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Precisely APIs
* Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs.
*
* The version of the OpenAPI document: 15.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.precisely.apis;
import com.precisely.ApiCallback;
import com.precisely.ApiClient;
import com.precisely.ApiException;
import com.precisely.ApiResponse;
import com.precisely.Configuration;
import com.precisely.Pair;
import com.precisely.ProgressRequestBody;
import com.precisely.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.precisely.apis.model.ErrorInfo;
import com.precisely.apis.model.GeocodeRequest;
import com.precisely.apis.model.GeocodeServiceResponse;
import com.precisely.apis.model.GeocodeServiceResponseList;
import com.precisely.apis.model.KeyLookupRequest;
import com.precisely.apis.model.PBKeyAddressRequest;
import com.precisely.apis.model.PBKeyResponse;
import com.precisely.apis.model.PBKeyResponseList;
import com.precisely.apis.model.ReverseGeocodeRequest;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class GeocodeServiceApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public GeocodeServiceApi() {
this(Configuration.getDefaultApiClient());
}
public GeocodeServiceApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
/**
* Build call for geocode
* @param datapackBundle datapackBundle (required)
* @param country Country name or ISO code. (optional, default to USA)
* @param mainAddress Single line input, treated as collection of field elements. (optional, default to 4750 Walnut St., Boulder CO, 80301)
* @param matchMode Match modes determine the leniency used to make a match between the input address and the reference data. (optional, default to Standard)
* @param fallbackGeo Specifies whether to attempt to determine a geographic region centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param fallbackPostal Specifies whether to attempt to determine a post code centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param maxCands The maximum number of candidates to return. (optional, default to 1)
* @param streetOffset Indicates the offset distance from the street segments to use in street-level geocoding. (optional, default to 7)
* @param streetOffsetUnits Specifies the unit of measurement for the street offset. (optional, default to METERS)
* @param cornerOffset Specifies the distance to offset the street end points in street-level matching. (optional, default to 7)
* @param cornerOffsetUnits Specifies the unit of measurement for the corner offset. (optional, default to METERS)
* @param removeAccentMarks Specifies whether to Suppress accents and other diacritical marks. (optional, default to false)
* @param findDPV Specifies if Delivery Point Validation is required. Note: This parameter is only applicable for USA addresses. (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call geocodeCall(String datapackBundle, String country, String mainAddress, String matchMode, String fallbackGeo, String fallbackPostal, String maxCands, String streetOffset, String streetOffsetUnits, String cornerOffset, String cornerOffsetUnits, String removeAccentMarks, String findDPV, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/geocode/v1/{datapackBundle}/geocode"
.replaceAll("\\{" + "datapackBundle" + "\\}", localVarApiClient.escapeString(datapackBundle.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
if (mainAddress != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("mainAddress", mainAddress));
}
if (matchMode != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("matchMode", matchMode));
}
if (fallbackGeo != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("fallbackGeo", fallbackGeo));
}
if (fallbackPostal != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("fallbackPostal", fallbackPostal));
}
if (maxCands != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxCands", maxCands));
}
if (streetOffset != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("streetOffset", streetOffset));
}
if (streetOffsetUnits != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("streetOffsetUnits", streetOffsetUnits));
}
if (cornerOffset != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("cornerOffset", cornerOffset));
}
if (cornerOffsetUnits != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("cornerOffsetUnits", cornerOffsetUnits));
}
if (removeAccentMarks != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("removeAccentMarks", removeAccentMarks));
}
if (findDPV != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("findDPV", findDPV));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call geocodeValidateBeforeCall(String datapackBundle, String country, String mainAddress, String matchMode, String fallbackGeo, String fallbackPostal, String maxCands, String streetOffset, String streetOffsetUnits, String cornerOffset, String cornerOffsetUnits, String removeAccentMarks, String findDPV, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'datapackBundle' is set
if (datapackBundle == null) {
throw new ApiException("Missing the required parameter 'datapackBundle' when calling geocode(Async)");
}
okhttp3.Call localVarCall = geocodeCall(datapackBundle, country, mainAddress, matchMode, fallbackGeo, fallbackPostal, maxCands, streetOffset, streetOffsetUnits, cornerOffset, cornerOffsetUnits, removeAccentMarks, findDPV, _callback);
return localVarCall;
}
/**
* Get Forward Geocode(Basic/Premium/Advanced)
* This service accepts an address and returns the location coordinates corresponding to that address. Premium offers the best accuracy and is a high precision geocoder leveraging Master Location Data - geocodes to Street or building level. Advanced offers advanced accuracy and geocodes to Street level.Basic offering will geocode to a Place or Postal level. Good accuracy.
* @param datapackBundle datapackBundle (required)
* @param country Country name or ISO code. (optional, default to USA)
* @param mainAddress Single line input, treated as collection of field elements. (optional, default to 4750 Walnut St., Boulder CO, 80301)
* @param matchMode Match modes determine the leniency used to make a match between the input address and the reference data. (optional, default to Standard)
* @param fallbackGeo Specifies whether to attempt to determine a geographic region centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param fallbackPostal Specifies whether to attempt to determine a post code centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param maxCands The maximum number of candidates to return. (optional, default to 1)
* @param streetOffset Indicates the offset distance from the street segments to use in street-level geocoding. (optional, default to 7)
* @param streetOffsetUnits Specifies the unit of measurement for the street offset. (optional, default to METERS)
* @param cornerOffset Specifies the distance to offset the street end points in street-level matching. (optional, default to 7)
* @param cornerOffsetUnits Specifies the unit of measurement for the corner offset. (optional, default to METERS)
* @param removeAccentMarks Specifies whether to Suppress accents and other diacritical marks. (optional, default to false)
* @param findDPV Specifies if Delivery Point Validation is required. Note: This parameter is only applicable for USA addresses. (optional, default to false)
* @return GeocodeServiceResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public GeocodeServiceResponse geocode(String datapackBundle, String country, String mainAddress, String matchMode, String fallbackGeo, String fallbackPostal, String maxCands, String streetOffset, String streetOffsetUnits, String cornerOffset, String cornerOffsetUnits, String removeAccentMarks, String findDPV) throws ApiException {
ApiResponse localVarResp = geocodeWithHttpInfo(datapackBundle, country, mainAddress, matchMode, fallbackGeo, fallbackPostal, maxCands, streetOffset, streetOffsetUnits, cornerOffset, cornerOffsetUnits, removeAccentMarks, findDPV);
return localVarResp.getData();
}
/**
* Get Forward Geocode(Basic/Premium/Advanced)
* This service accepts an address and returns the location coordinates corresponding to that address. Premium offers the best accuracy and is a high precision geocoder leveraging Master Location Data - geocodes to Street or building level. Advanced offers advanced accuracy and geocodes to Street level.Basic offering will geocode to a Place or Postal level. Good accuracy.
* @param datapackBundle datapackBundle (required)
* @param country Country name or ISO code. (optional, default to USA)
* @param mainAddress Single line input, treated as collection of field elements. (optional, default to 4750 Walnut St., Boulder CO, 80301)
* @param matchMode Match modes determine the leniency used to make a match between the input address and the reference data. (optional, default to Standard)
* @param fallbackGeo Specifies whether to attempt to determine a geographic region centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param fallbackPostal Specifies whether to attempt to determine a post code centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param maxCands The maximum number of candidates to return. (optional, default to 1)
* @param streetOffset Indicates the offset distance from the street segments to use in street-level geocoding. (optional, default to 7)
* @param streetOffsetUnits Specifies the unit of measurement for the street offset. (optional, default to METERS)
* @param cornerOffset Specifies the distance to offset the street end points in street-level matching. (optional, default to 7)
* @param cornerOffsetUnits Specifies the unit of measurement for the corner offset. (optional, default to METERS)
* @param removeAccentMarks Specifies whether to Suppress accents and other diacritical marks. (optional, default to false)
* @param findDPV Specifies if Delivery Point Validation is required. Note: This parameter is only applicable for USA addresses. (optional, default to false)
* @return ApiResponse<GeocodeServiceResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse geocodeWithHttpInfo(String datapackBundle, String country, String mainAddress, String matchMode, String fallbackGeo, String fallbackPostal, String maxCands, String streetOffset, String streetOffsetUnits, String cornerOffset, String cornerOffsetUnits, String removeAccentMarks, String findDPV) throws ApiException {
okhttp3.Call localVarCall = geocodeValidateBeforeCall(datapackBundle, country, mainAddress, matchMode, fallbackGeo, fallbackPostal, maxCands, streetOffset, streetOffsetUnits, cornerOffset, cornerOffsetUnits, removeAccentMarks, findDPV, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Forward Geocode(Basic/Premium/Advanced) (asynchronously)
* This service accepts an address and returns the location coordinates corresponding to that address. Premium offers the best accuracy and is a high precision geocoder leveraging Master Location Data - geocodes to Street or building level. Advanced offers advanced accuracy and geocodes to Street level.Basic offering will geocode to a Place or Postal level. Good accuracy.
* @param datapackBundle datapackBundle (required)
* @param country Country name or ISO code. (optional, default to USA)
* @param mainAddress Single line input, treated as collection of field elements. (optional, default to 4750 Walnut St., Boulder CO, 80301)
* @param matchMode Match modes determine the leniency used to make a match between the input address and the reference data. (optional, default to Standard)
* @param fallbackGeo Specifies whether to attempt to determine a geographic region centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param fallbackPostal Specifies whether to attempt to determine a post code centroid when an address-level geocode cannot be determined. (optional, default to true)
* @param maxCands The maximum number of candidates to return. (optional, default to 1)
* @param streetOffset Indicates the offset distance from the street segments to use in street-level geocoding. (optional, default to 7)
* @param streetOffsetUnits Specifies the unit of measurement for the street offset. (optional, default to METERS)
* @param cornerOffset Specifies the distance to offset the street end points in street-level matching. (optional, default to 7)
* @param cornerOffsetUnits Specifies the unit of measurement for the corner offset. (optional, default to METERS)
* @param removeAccentMarks Specifies whether to Suppress accents and other diacritical marks. (optional, default to false)
* @param findDPV Specifies if Delivery Point Validation is required. Note: This parameter is only applicable for USA addresses. (optional, default to false)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call geocodeAsync(String datapackBundle, String country, String mainAddress, String matchMode, String fallbackGeo, String fallbackPostal, String maxCands, String streetOffset, String streetOffsetUnits, String cornerOffset, String cornerOffsetUnits, String removeAccentMarks, String findDPV, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = geocodeValidateBeforeCall(datapackBundle, country, mainAddress, matchMode, fallbackGeo, fallbackPostal, maxCands, streetOffset, streetOffsetUnits, cornerOffset, cornerOffsetUnits, removeAccentMarks, findDPV, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for geocodeBatch
* @param datapackBundle (required)
* @param geocodeRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call geocodeBatchCall(String datapackBundle, GeocodeRequest geocodeRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = geocodeRequest;
// create path and map variables
String localVarPath = "/geocode/v1/{datapackBundle}/geocode"
.replaceAll("\\{" + "datapackBundle" + "\\}", localVarApiClient.escapeString(datapackBundle.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call geocodeBatchValidateBeforeCall(String datapackBundle, GeocodeRequest geocodeRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'datapackBundle' is set
if (datapackBundle == null) {
throw new ApiException("Missing the required parameter 'datapackBundle' when calling geocodeBatch(Async)");
}
// verify the required parameter 'geocodeRequest' is set
if (geocodeRequest == null) {
throw new ApiException("Missing the required parameter 'geocodeRequest' when calling geocodeBatch(Async)");
}
okhttp3.Call localVarCall = geocodeBatchCall(datapackBundle, geocodeRequest, _callback);
return localVarCall;
}
/**
* Post Forward Geocode
* This is a Batch offering for geocode service. It accepts a single address or a list of addresses and returns location coordinates
* @param datapackBundle (required)
* @param geocodeRequest (required)
* @return GeocodeServiceResponseList
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public GeocodeServiceResponseList geocodeBatch(String datapackBundle, GeocodeRequest geocodeRequest) throws ApiException {
ApiResponse localVarResp = geocodeBatchWithHttpInfo(datapackBundle, geocodeRequest);
return localVarResp.getData();
}
/**
* Post Forward Geocode
* This is a Batch offering for geocode service. It accepts a single address or a list of addresses and returns location coordinates
* @param datapackBundle (required)
* @param geocodeRequest (required)
* @return ApiResponse<GeocodeServiceResponseList>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse geocodeBatchWithHttpInfo(String datapackBundle, GeocodeRequest geocodeRequest) throws ApiException {
okhttp3.Call localVarCall = geocodeBatchValidateBeforeCall(datapackBundle, geocodeRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Forward Geocode (asynchronously)
* This is a Batch offering for geocode service. It accepts a single address or a list of addresses and returns location coordinates
* @param datapackBundle (required)
* @param geocodeRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call geocodeBatchAsync(String datapackBundle, GeocodeRequest geocodeRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = geocodeBatchValidateBeforeCall(datapackBundle, geocodeRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPBKey
* @param address The address to be searched. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPBKeyCall(String address, String country, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/geocode/v1/key/byaddress";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (address != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address));
}
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPBKeyValidateBeforeCall(String address, String country, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'address' is set
if (address == null) {
throw new ApiException("Missing the required parameter 'address' when calling getPBKey(Async)");
}
okhttp3.Call localVarCall = getPBKeyCall(address, country, _callback);
return localVarCall;
}
/**
* Get PreciselyID By Address
* This service accepts an address and returns the corresponding PreciselyID
* @param address The address to be searched. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @return PBKeyResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PBKeyResponse getPBKey(String address, String country) throws ApiException {
ApiResponse localVarResp = getPBKeyWithHttpInfo(address, country);
return localVarResp.getData();
}
/**
* Get PreciselyID By Address
* This service accepts an address and returns the corresponding PreciselyID
* @param address The address to be searched. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @return ApiResponse<PBKeyResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPBKeyWithHttpInfo(String address, String country) throws ApiException {
okhttp3.Call localVarCall = getPBKeyValidateBeforeCall(address, country, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get PreciselyID By Address (asynchronously)
* This service accepts an address and returns the corresponding PreciselyID
* @param address The address to be searched. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPBKeyAsync(String address, String country, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPBKeyValidateBeforeCall(address, country, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPBKeys
* @param pbKeyAddressRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPBKeysCall(PBKeyAddressRequest pbKeyAddressRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = pbKeyAddressRequest;
// create path and map variables
String localVarPath = "/geocode/v1/key/byaddress";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPBKeysValidateBeforeCall(PBKeyAddressRequest pbKeyAddressRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'pbKeyAddressRequest' is set
if (pbKeyAddressRequest == null) {
throw new ApiException("Missing the required parameter 'pbKeyAddressRequest' when calling getPBKeys(Async)");
}
okhttp3.Call localVarCall = getPBKeysCall(pbKeyAddressRequest, _callback);
return localVarCall;
}
/**
* Post PreciselyID By Address
* This is a Batch offering for 'PreciselyID By Address' service. It accepts a single address or a list of addresses and returns the corresponding PreciselyID.
* @param pbKeyAddressRequest (required)
* @return PBKeyResponseList
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public PBKeyResponseList getPBKeys(PBKeyAddressRequest pbKeyAddressRequest) throws ApiException {
ApiResponse localVarResp = getPBKeysWithHttpInfo(pbKeyAddressRequest);
return localVarResp.getData();
}
/**
* Post PreciselyID By Address
* This is a Batch offering for 'PreciselyID By Address' service. It accepts a single address or a list of addresses and returns the corresponding PreciselyID.
* @param pbKeyAddressRequest (required)
* @return ApiResponse<PBKeyResponseList>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse getPBKeysWithHttpInfo(PBKeyAddressRequest pbKeyAddressRequest) throws ApiException {
okhttp3.Call localVarCall = getPBKeysValidateBeforeCall(pbKeyAddressRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post PreciselyID By Address (asynchronously)
* This is a Batch offering for 'PreciselyID By Address' service. It accepts a single address or a list of addresses and returns the corresponding PreciselyID.
* @param pbKeyAddressRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getPBKeysAsync(PBKeyAddressRequest pbKeyAddressRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPBKeysValidateBeforeCall(pbKeyAddressRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for keyLookup
* @param key PreciselyID which maps to a unique address. (required)
* @param type Specifies the key type - PreciselyID and GNAF_PID for Aus. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call keyLookupCall(String key, String type, String country, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/geocode/v1/keylookup";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (key != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("key", key));
}
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call keyLookupValidateBeforeCall(String key, String type, String country, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'key' is set
if (key == null) {
throw new ApiException("Missing the required parameter 'key' when calling keyLookup(Async)");
}
// verify the required parameter 'type' is set
if (type == null) {
throw new ApiException("Missing the required parameter 'type' when calling keyLookup(Async)");
}
okhttp3.Call localVarCall = keyLookupCall(key, type, country, _callback);
return localVarCall;
}
/**
* Get Key Lookup
* This service accepts a PreciselyID and returns the corresponding address associated with that PreciselyID.
* @param key PreciselyID which maps to a unique address. (required)
* @param type Specifies the key type - PreciselyID and GNAF_PID for Aus. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @return GeocodeServiceResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public GeocodeServiceResponse keyLookup(String key, String type, String country) throws ApiException {
ApiResponse localVarResp = keyLookupWithHttpInfo(key, type, country);
return localVarResp.getData();
}
/**
* Get Key Lookup
* This service accepts a PreciselyID and returns the corresponding address associated with that PreciselyID.
* @param key PreciselyID which maps to a unique address. (required)
* @param type Specifies the key type - PreciselyID and GNAF_PID for Aus. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @return ApiResponse<GeocodeServiceResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse keyLookupWithHttpInfo(String key, String type, String country) throws ApiException {
okhttp3.Call localVarCall = keyLookupValidateBeforeCall(key, type, country, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Key Lookup (asynchronously)
* This service accepts a PreciselyID and returns the corresponding address associated with that PreciselyID.
* @param key PreciselyID which maps to a unique address. (required)
* @param type Specifies the key type - PreciselyID and GNAF_PID for Aus. (required)
* @param country 3 letter ISO code of the country to be searched. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call keyLookupAsync(String key, String type, String country, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = keyLookupValidateBeforeCall(key, type, country, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for keyLookupBatch
* @param keyLookupRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call keyLookupBatchCall(KeyLookupRequest keyLookupRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = keyLookupRequest;
// create path and map variables
String localVarPath = "/geocode/v1/keylookup";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call keyLookupBatchValidateBeforeCall(KeyLookupRequest keyLookupRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'keyLookupRequest' is set
if (keyLookupRequest == null) {
throw new ApiException("Missing the required parameter 'keyLookupRequest' when calling keyLookupBatch(Async)");
}
okhttp3.Call localVarCall = keyLookupBatchCall(keyLookupRequest, _callback);
return localVarCall;
}
/**
* Post Key Lookup
* This service accepts batches of PreciselyID's and returns the corresponding address associated with those PreciselyID's.
* @param keyLookupRequest (required)
* @return GeocodeServiceResponseList
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public GeocodeServiceResponseList keyLookupBatch(KeyLookupRequest keyLookupRequest) throws ApiException {
ApiResponse localVarResp = keyLookupBatchWithHttpInfo(keyLookupRequest);
return localVarResp.getData();
}
/**
* Post Key Lookup
* This service accepts batches of PreciselyID's and returns the corresponding address associated with those PreciselyID's.
* @param keyLookupRequest (required)
* @return ApiResponse<GeocodeServiceResponseList>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse keyLookupBatchWithHttpInfo(KeyLookupRequest keyLookupRequest) throws ApiException {
okhttp3.Call localVarCall = keyLookupBatchValidateBeforeCall(keyLookupRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Key Lookup (asynchronously)
* This service accepts batches of PreciselyID's and returns the corresponding address associated with those PreciselyID's.
* @param keyLookupRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call keyLookupBatchAsync(KeyLookupRequest keyLookupRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = keyLookupBatchValidateBeforeCall(keyLookupRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for reverseGeocodBatch
* @param datapackBundle (required)
* @param reverseGeocodeRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call reverseGeocodBatchCall(String datapackBundle, ReverseGeocodeRequest reverseGeocodeRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = reverseGeocodeRequest;
// create path and map variables
String localVarPath = "/geocode/v1/{datapackBundle}/reverseGeocode"
.replaceAll("\\{" + "datapackBundle" + "\\}", localVarApiClient.escapeString(datapackBundle.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call reverseGeocodBatchValidateBeforeCall(String datapackBundle, ReverseGeocodeRequest reverseGeocodeRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'datapackBundle' is set
if (datapackBundle == null) {
throw new ApiException("Missing the required parameter 'datapackBundle' when calling reverseGeocodBatch(Async)");
}
// verify the required parameter 'reverseGeocodeRequest' is set
if (reverseGeocodeRequest == null) {
throw new ApiException("Missing the required parameter 'reverseGeocodeRequest' when calling reverseGeocodBatch(Async)");
}
okhttp3.Call localVarCall = reverseGeocodBatchCall(datapackBundle, reverseGeocodeRequest, _callback);
return localVarCall;
}
/**
* Post Reverse Geocode
* This is a Batch offering for geocode service. It accepts a single address or a list of addresses and returns location coordinates
* @param datapackBundle (required)
* @param reverseGeocodeRequest (required)
* @return GeocodeServiceResponseList
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public GeocodeServiceResponseList reverseGeocodBatch(String datapackBundle, ReverseGeocodeRequest reverseGeocodeRequest) throws ApiException {
ApiResponse localVarResp = reverseGeocodBatchWithHttpInfo(datapackBundle, reverseGeocodeRequest);
return localVarResp.getData();
}
/**
* Post Reverse Geocode
* This is a Batch offering for geocode service. It accepts a single address or a list of addresses and returns location coordinates
* @param datapackBundle (required)
* @param reverseGeocodeRequest (required)
* @return ApiResponse<GeocodeServiceResponseList>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse reverseGeocodBatchWithHttpInfo(String datapackBundle, ReverseGeocodeRequest reverseGeocodeRequest) throws ApiException {
okhttp3.Call localVarCall = reverseGeocodBatchValidateBeforeCall(datapackBundle, reverseGeocodeRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Reverse Geocode (asynchronously)
* This is a Batch offering for geocode service. It accepts a single address or a list of addresses and returns location coordinates
* @param datapackBundle (required)
* @param reverseGeocodeRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call reverseGeocodBatchAsync(String datapackBundle, ReverseGeocodeRequest reverseGeocodeRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = reverseGeocodBatchValidateBeforeCall(datapackBundle, reverseGeocodeRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for reverseGeocode
* @param datapackBundle datapackBundle (required)
* @param x Longitude of the location. (required)
* @param y Latitude of the location. (required)
* @param country Country name or ISO code. (optional)
* @param coordSysName Coordinate system to convert geometry to in format codespace:code. (optional, default to EPSG:4326)
* @param distance Radius in which search is performed. (optional, default to Radius in which search is performed.)
* @param distanceUnits Unit of measurement. (optional, default to METERS)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call reverseGeocodeCall(String datapackBundle, String x, String y, String country, String coordSysName, String distance, String distanceUnits, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/geocode/v1/{datapackBundle}/reverseGeocode"
.replaceAll("\\{" + "datapackBundle" + "\\}", localVarApiClient.escapeString(datapackBundle.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (x != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("x", x));
}
if (y != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("y", y));
}
if (country != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("country", country));
}
if (coordSysName != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("coordSysName", coordSysName));
}
if (distance != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("distance", distance));
}
if (distanceUnits != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("distanceUnits", distanceUnits));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarHeaderParams != null && localVarContentTypes != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "oAuth2Password" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call reverseGeocodeValidateBeforeCall(String datapackBundle, String x, String y, String country, String coordSysName, String distance, String distanceUnits, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'datapackBundle' is set
if (datapackBundle == null) {
throw new ApiException("Missing the required parameter 'datapackBundle' when calling reverseGeocode(Async)");
}
// verify the required parameter 'x' is set
if (x == null) {
throw new ApiException("Missing the required parameter 'x' when calling reverseGeocode(Async)");
}
// verify the required parameter 'y' is set
if (y == null) {
throw new ApiException("Missing the required parameter 'y' when calling reverseGeocode(Async)");
}
okhttp3.Call localVarCall = reverseGeocodeCall(datapackBundle, x, y, country, coordSysName, distance, distanceUnits, _callback);
return localVarCall;
}
/**
* Get Reverse Geocode(Basic/Premium/Advanced)
* This service accepts location coordinate and returns an address.
* @param datapackBundle datapackBundle (required)
* @param x Longitude of the location. (required)
* @param y Latitude of the location. (required)
* @param country Country name or ISO code. (optional)
* @param coordSysName Coordinate system to convert geometry to in format codespace:code. (optional, default to EPSG:4326)
* @param distance Radius in which search is performed. (optional, default to Radius in which search is performed.)
* @param distanceUnits Unit of measurement. (optional, default to METERS)
* @return GeocodeServiceResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public GeocodeServiceResponse reverseGeocode(String datapackBundle, String x, String y, String country, String coordSysName, String distance, String distanceUnits) throws ApiException {
ApiResponse localVarResp = reverseGeocodeWithHttpInfo(datapackBundle, x, y, country, coordSysName, distance, distanceUnits);
return localVarResp.getData();
}
/**
* Get Reverse Geocode(Basic/Premium/Advanced)
* This service accepts location coordinate and returns an address.
* @param datapackBundle datapackBundle (required)
* @param x Longitude of the location. (required)
* @param y Latitude of the location. (required)
* @param country Country name or ISO code. (optional)
* @param coordSysName Coordinate system to convert geometry to in format codespace:code. (optional, default to EPSG:4326)
* @param distance Radius in which search is performed. (optional, default to Radius in which search is performed.)
* @param distanceUnits Unit of measurement. (optional, default to METERS)
* @return ApiResponse<GeocodeServiceResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public ApiResponse reverseGeocodeWithHttpInfo(String datapackBundle, String x, String y, String country, String coordSysName, String distance, String distanceUnits) throws ApiException {
okhttp3.Call localVarCall = reverseGeocodeValidateBeforeCall(datapackBundle, x, y, country, coordSysName, distance, distanceUnits, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Reverse Geocode(Basic/Premium/Advanced) (asynchronously)
* This service accepts location coordinate and returns an address.
* @param datapackBundle datapackBundle (required)
* @param x Longitude of the location. (required)
* @param y Latitude of the location. (required)
* @param country Country name or ISO code. (optional)
* @param coordSysName Coordinate system to convert geometry to in format codespace:code. (optional, default to EPSG:4326)
* @param distance Radius in which search is performed. (optional, default to Radius in which search is performed.)
* @param distanceUnits Unit of measurement. (optional, default to METERS)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call reverseGeocodeAsync(String datapackBundle, String x, String y, String country, String coordSysName, String distance, String distanceUnits, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = reverseGeocodeValidateBeforeCall(datapackBundle, x, y, country, coordSysName, distance, distanceUnits, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}