com.unblu.webapi.jersey.v3.api.SuggestionSourcesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jersey-client-v3 Show documentation
Show all versions of jersey-client-v3 Show documentation
Client implemented using Jersey
package com.unblu.webapi.jersey.v3.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import com.unblu.webapi.jersey.v3.invoker.ApiClient;
import com.unblu.webapi.jersey.v3.invoker.ApiException;
import com.unblu.webapi.jersey.v3.invoker.ApiResponse;
import com.unblu.webapi.jersey.v3.invoker.Configuration;
import com.unblu.webapi.jersey.v3.invoker.Pair;
import com.unblu.webapi.model.v3.OutboundPingResponse;
import com.unblu.webapi.model.v3.SuggestionSourceData;
import com.unblu.webapi.model.v3.SuggestionSourceQuery;
import com.unblu.webapi.model.v3.SuggestionSourceResult;
import com.unblu.webapi.model.v3.SuggestionSourcesPingOutboundEndpointBody;
public class SuggestionSourcesApi {
private ApiClient apiClient;
public SuggestionSourcesApi() {
this(Configuration.getDefaultApiClient());
}
public SuggestionSourcesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* create Creates a new suggestion source<br>
*
* @param suggestionSourceData The suggestion source to create. (required)
* @return SuggestionSourceData
* @throws ApiException if fails to make API call
*/
public SuggestionSourceData suggestionSourcesCreate(SuggestionSourceData suggestionSourceData) throws ApiException {
return suggestionSourcesCreateWithHttpInfo(suggestionSourceData).getData();
}
/**
* create Creates a new suggestion source<br>
*
* @param suggestionSourceData The suggestion source to create. (required)
* @return ApiResponse<SuggestionSourceData>
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesCreateWithHttpInfo(SuggestionSourceData suggestionSourceData) throws ApiException {
Object localVarPostBody = suggestionSourceData;
// verify the required parameter 'suggestionSourceData' is set
if (suggestionSourceData == null) {
throw new ApiException(400, "Missing the required parameter 'suggestionSourceData' when calling suggestionSourcesCreate");
}
// create path and map variables
String localVarPath = "/suggestionsources/create";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* delete Deletes an existing suggestion source<br>
*
* @param id The ID of the suggestion source which should be deleted (optional)
* @throws ApiException if fails to make API call
*/
public void suggestionSourcesDelete(String id) throws ApiException {
suggestionSourcesDeleteWithHttpInfo(id);
}
/**
* delete Deletes an existing suggestion source<br>
*
* @param id The ID of the suggestion source which should be deleted (optional)
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesDeleteWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/suggestionsources/delete";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* getByName Searches for an existing suggestion source with the given name.<br>
*
* @param name Name of the suggestion source. (optional)
* @return SuggestionSourceData
* @throws ApiException if fails to make API call
*/
public SuggestionSourceData suggestionSourcesGetByName(String name) throws ApiException {
return suggestionSourcesGetByNameWithHttpInfo(name).getData();
}
/**
* getByName Searches for an existing suggestion source with the given name.<br>
*
* @param name Name of the suggestion source. (optional)
* @return ApiResponse<SuggestionSourceData>
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesGetByNameWithHttpInfo(String name) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/suggestionsources/getByName";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "name", name));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* pingOutboundEndpoint Emits a `OutboundPingRequest` on the endpoint of the suggestion source. <p> The endpoint is expected to return a
* OutboundPingResponse<br>
*
* @param suggestionSourcesPingOutboundEndpointBody (required)
* @return OutboundPingResponse
* @throws ApiException if fails to make API call
*/
public OutboundPingResponse suggestionSourcesPingOutboundEndpoint(SuggestionSourcesPingOutboundEndpointBody suggestionSourcesPingOutboundEndpointBody) throws ApiException {
return suggestionSourcesPingOutboundEndpointWithHttpInfo(suggestionSourcesPingOutboundEndpointBody).getData();
}
/**
* pingOutboundEndpoint Emits a `OutboundPingRequest` on the endpoint of the suggestion source. <p> The endpoint is expected to return a
* OutboundPingResponse<br>
*
* @param suggestionSourcesPingOutboundEndpointBody (required)
* @return ApiResponse<OutboundPingResponse>
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesPingOutboundEndpointWithHttpInfo(SuggestionSourcesPingOutboundEndpointBody suggestionSourcesPingOutboundEndpointBody) throws ApiException {
Object localVarPostBody = suggestionSourcesPingOutboundEndpointBody;
// verify the required parameter 'suggestionSourcesPingOutboundEndpointBody' is set
if (suggestionSourcesPingOutboundEndpointBody == null) {
throw new ApiException(400, "Missing the required parameter 'suggestionSourcesPingOutboundEndpointBody' when calling suggestionSourcesPingOutboundEndpoint");
}
// create path and map variables
String localVarPath = "/suggestionsources/pingOutboundEndpoint";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* read Reads an existing suggestion source.<br>
*
* @param id The ID of the suggestion source. (optional)
* @return SuggestionSourceData
* @throws ApiException if fails to make API call
*/
public SuggestionSourceData suggestionSourcesRead(String id) throws ApiException {
return suggestionSourcesReadWithHttpInfo(id).getData();
}
/**
* read Reads an existing suggestion source.<br>
*
* @param id The ID of the suggestion source. (optional)
* @return ApiResponse<SuggestionSourceData>
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesReadWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = new HashMap<>();
// create path and map variables
String localVarPath = "/suggestionsources/read";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* search Search for suggestion sources in the current account<br>
*
* @param suggestionSourceQuery (required)
* @return SuggestionSourceResult
* @throws ApiException if fails to make API call
*/
public SuggestionSourceResult suggestionSourcesSearch(SuggestionSourceQuery suggestionSourceQuery) throws ApiException {
return suggestionSourcesSearchWithHttpInfo(suggestionSourceQuery).getData();
}
/**
* search Search for suggestion sources in the current account<br>
*
* @param suggestionSourceQuery (required)
* @return ApiResponse<SuggestionSourceResult>
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesSearchWithHttpInfo(SuggestionSourceQuery suggestionSourceQuery) throws ApiException {
Object localVarPostBody = suggestionSourceQuery;
// verify the required parameter 'suggestionSourceQuery' is set
if (suggestionSourceQuery == null) {
throw new ApiException(400, "Missing the required parameter 'suggestionSourceQuery' when calling suggestionSourcesSearch");
}
// create path and map variables
String localVarPath = "/suggestionsources/search";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* update Updates an existing suggestion source.<br>
*
* @param suggestionSourceData (required)
* @return SuggestionSourceData
* @throws ApiException if fails to make API call
*/
public SuggestionSourceData suggestionSourcesUpdate(SuggestionSourceData suggestionSourceData) throws ApiException {
return suggestionSourcesUpdateWithHttpInfo(suggestionSourceData).getData();
}
/**
* update Updates an existing suggestion source.<br>
*
* @param suggestionSourceData (required)
* @return ApiResponse<SuggestionSourceData>
* @throws ApiException if fails to make API call
*/
public ApiResponse suggestionSourcesUpdateWithHttpInfo(SuggestionSourceData suggestionSourceData) throws ApiException {
Object localVarPostBody = suggestionSourceData;
// verify the required parameter 'suggestionSourceData' is set
if (suggestionSourceData == null) {
throw new ApiException(400, "Missing the required parameter 'suggestionSourceData' when calling suggestionSourcesUpdate");
}
// create path and map variables
String localVarPath = "/suggestionsources/update";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth" };
GenericType localVarReturnType = new GenericType() {
};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}