All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.precisely.apis.Psap911ServiceApi Maven / Gradle / Ivy

/*
 * 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.AHJPlusPSAPResponse;
import com.precisely.apis.model.ErrorInfo;
import com.precisely.apis.model.PSAPResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Psap911ServiceApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public Psap911ServiceApi() {
        this(Configuration.getDefaultApiClient());
    }

    public Psap911ServiceApi(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 getAHJPlusPSAPByAddress
     * @param address The address to be searched. (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 getAHJPlusPSAPByAddressCall(String address, 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 = "/911/v1/ahj-psap/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)); } 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 getAHJPlusPSAPByAddressValidateBeforeCall(String address, 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 getAHJPlusPSAPByAddress(Async)"); } okhttp3.Call localVarCall = getAHJPlusPSAPByAddressCall(address, _callback); return localVarCall; } /** * AHJ & PSAP By Address. * Accepts addresses as input and Returns contact details for Authorities Having Jurisdiction (AHJ) on-behalf-of local Public Safety Answering Points (PSAP). 911/PSAP accepts an address and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency name, phone number, city name, coverage, contact person's details, site details and mailing addresses for EMS, Fire, and Police PSAP contacts. * @param address The address to be searched. (required) * @return AHJPlusPSAPResponse * @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 AHJPlusPSAPResponse getAHJPlusPSAPByAddress(String address) throws ApiException { ApiResponse localVarResp = getAHJPlusPSAPByAddressWithHttpInfo(address); return localVarResp.getData(); } /** * AHJ & PSAP By Address. * Accepts addresses as input and Returns contact details for Authorities Having Jurisdiction (AHJ) on-behalf-of local Public Safety Answering Points (PSAP). 911/PSAP accepts an address and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency name, phone number, city name, coverage, contact person's details, site details and mailing addresses for EMS, Fire, and Police PSAP contacts. * @param address The address to be searched. (required) * @return ApiResponse<AHJPlusPSAPResponse> * @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 getAHJPlusPSAPByAddressWithHttpInfo(String address) throws ApiException { okhttp3.Call localVarCall = getAHJPlusPSAPByAddressValidateBeforeCall(address, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * AHJ & PSAP By Address. (asynchronously) * Accepts addresses as input and Returns contact details for Authorities Having Jurisdiction (AHJ) on-behalf-of local Public Safety Answering Points (PSAP). 911/PSAP accepts an address and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency name, phone number, city name, coverage, contact person's details, site details and mailing addresses for EMS, Fire, and Police PSAP contacts. * @param address The address to be searched. (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 getAHJPlusPSAPByAddressAsync(String address, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAHJPlusPSAPByAddressValidateBeforeCall(address, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAHJPlusPSAPByLocation * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (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 getAHJPlusPSAPByLocationCall(String longitude, String latitude, 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 = "/911/v1/ahj-psap/bylocation"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (longitude != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude)); } if (latitude != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude)); } 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 getAHJPlusPSAPByLocationValidateBeforeCall(String longitude, String latitude, final ApiCallback _callback) throws ApiException { // verify the required parameter 'longitude' is set if (longitude == null) { throw new ApiException("Missing the required parameter 'longitude' when calling getAHJPlusPSAPByLocation(Async)"); } // verify the required parameter 'latitude' is set if (latitude == null) { throw new ApiException("Missing the required parameter 'latitude' when calling getAHJPlusPSAPByLocation(Async)"); } okhttp3.Call localVarCall = getAHJPlusPSAPByLocationCall(longitude, latitude, _callback); return localVarCall; } /** * AHJ & PSAP By Location * Accepts latitude & longitude as input and Returns contact details for Authorities Having Jurisdiction (AHJ) on-behalf-of local Public Safety Answering Points (PSAP). 911/PSAP accepts a location coordinate and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency name, phone number, city name, coverage, contact person's details, site details and mailing addresses for EMS, Fire, and Police PSAP contacts. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (required) * @return AHJPlusPSAPResponse * @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 AHJPlusPSAPResponse getAHJPlusPSAPByLocation(String longitude, String latitude) throws ApiException { ApiResponse localVarResp = getAHJPlusPSAPByLocationWithHttpInfo(longitude, latitude); return localVarResp.getData(); } /** * AHJ & PSAP By Location * Accepts latitude & longitude as input and Returns contact details for Authorities Having Jurisdiction (AHJ) on-behalf-of local Public Safety Answering Points (PSAP). 911/PSAP accepts a location coordinate and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency name, phone number, city name, coverage, contact person's details, site details and mailing addresses for EMS, Fire, and Police PSAP contacts. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (required) * @return ApiResponse<AHJPlusPSAPResponse> * @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 getAHJPlusPSAPByLocationWithHttpInfo(String longitude, String latitude) throws ApiException { okhttp3.Call localVarCall = getAHJPlusPSAPByLocationValidateBeforeCall(longitude, latitude, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * AHJ & PSAP By Location (asynchronously) * Accepts latitude & longitude as input and Returns contact details for Authorities Having Jurisdiction (AHJ) on-behalf-of local Public Safety Answering Points (PSAP). 911/PSAP accepts a location coordinate and returns PSAP contact data plus contact data for an AHJ to communicate directly with a PSAP. Details include agency name, phone number, city name, coverage, contact person's details, site details and mailing addresses for EMS, Fire, and Police PSAP contacts. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (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 getAHJPlusPSAPByLocationAsync(String longitude, String latitude, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAHJPlusPSAPByLocationValidateBeforeCall(longitude, latitude, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPSAPByAddress * @param address The address to be searched. (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 getPSAPByAddressCall(String address, 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 = "/911/v1/psap/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)); } 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 getPSAPByAddressValidateBeforeCall(String address, 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 getPSAPByAddress(Async)"); } okhttp3.Call localVarCall = getPSAPByAddressCall(address, _callback); return localVarCall; } /** * PSAP By Address. * Accepts addresses as input and Returns contact details for local Public Safety Answering Points (PSAP). 911/PSAP accepts an address as input and returns the relevant PSAP address and contact details including agency name, phone number, county name, coverage, contact person's details, site details and mailing address. * @param address The address to be searched. (required) * @return PSAPResponse * @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 PSAPResponse getPSAPByAddress(String address) throws ApiException { ApiResponse localVarResp = getPSAPByAddressWithHttpInfo(address); return localVarResp.getData(); } /** * PSAP By Address. * Accepts addresses as input and Returns contact details for local Public Safety Answering Points (PSAP). 911/PSAP accepts an address as input and returns the relevant PSAP address and contact details including agency name, phone number, county name, coverage, contact person's details, site details and mailing address. * @param address The address to be searched. (required) * @return ApiResponse<PSAPResponse> * @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 getPSAPByAddressWithHttpInfo(String address) throws ApiException { okhttp3.Call localVarCall = getPSAPByAddressValidateBeforeCall(address, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * PSAP By Address. (asynchronously) * Accepts addresses as input and Returns contact details for local Public Safety Answering Points (PSAP). 911/PSAP accepts an address as input and returns the relevant PSAP address and contact details including agency name, phone number, county name, coverage, contact person's details, site details and mailing address. * @param address The address to be searched. (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 getPSAPByAddressAsync(String address, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPSAPByAddressValidateBeforeCall(address, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getPSAPByLocation * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (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 getPSAPByLocationCall(String longitude, String latitude, 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 = "/911/v1/psap/bylocation"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (longitude != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude)); } if (latitude != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude)); } 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 getPSAPByLocationValidateBeforeCall(String longitude, String latitude, final ApiCallback _callback) throws ApiException { // verify the required parameter 'longitude' is set if (longitude == null) { throw new ApiException("Missing the required parameter 'longitude' when calling getPSAPByLocation(Async)"); } // verify the required parameter 'latitude' is set if (latitude == null) { throw new ApiException("Missing the required parameter 'latitude' when calling getPSAPByLocation(Async)"); } okhttp3.Call localVarCall = getPSAPByLocationCall(longitude, latitude, _callback); return localVarCall; } /** * PSAP By Location. * Accepts latitude & longitude as input and Returns contact details for local Public Safety Answering Points (PSAP). 911/PSAP accepts a location coordinate and returns the relevant PSAP address and contact details including dispatch name, phone number, county name, coverage, contact person's details, site details and mailing address. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (required) * @return PSAPResponse * @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 PSAPResponse getPSAPByLocation(String longitude, String latitude) throws ApiException { ApiResponse localVarResp = getPSAPByLocationWithHttpInfo(longitude, latitude); return localVarResp.getData(); } /** * PSAP By Location. * Accepts latitude & longitude as input and Returns contact details for local Public Safety Answering Points (PSAP). 911/PSAP accepts a location coordinate and returns the relevant PSAP address and contact details including dispatch name, phone number, county name, coverage, contact person's details, site details and mailing address. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (required) * @return ApiResponse<PSAPResponse> * @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 getPSAPByLocationWithHttpInfo(String longitude, String latitude) throws ApiException { okhttp3.Call localVarCall = getPSAPByLocationValidateBeforeCall(longitude, latitude, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * PSAP By Location. (asynchronously) * Accepts latitude & longitude as input and Returns contact details for local Public Safety Answering Points (PSAP). 911/PSAP accepts a location coordinate and returns the relevant PSAP address and contact details including dispatch name, phone number, county name, coverage, contact person's details, site details and mailing address. * @param longitude Longitude of the location. (required) * @param latitude Latitude of the location. (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 getPSAPByLocationAsync(String longitude, String latitude, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getPSAPByLocationValidateBeforeCall(longitude, latitude, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy