travel.wink.sdk.analytics.api.AnalyticsApi Maven / Gradle / Ivy
Show all versions of analytics-sdk-java Show documentation
package travel.wink.sdk.analytics.api;
import travel.wink.sdk.analytics.invoker.ApiClient;
import travel.wink.sdk.analytics.model.ChartRequestViewAuthenticatedEntity;
import travel.wink.sdk.analytics.model.GenericErrorMessage;
import travel.wink.sdk.analytics.model.LineChartNonAuthenticatedEntity;
import travel.wink.sdk.analytics.model.PageLineChartNonAuthenticatedEntity;
import travel.wink.sdk.analytics.model.RemoveEntryResponseAuthenticatedEntity;
import travel.wink.sdk.analytics.model.ShowChartRequest400Response;
import travel.wink.sdk.analytics.model.StateNonAuthenticatedEntity;
import travel.wink.sdk.analytics.model.UpsertChartRequestWrapperAuthenticatedEntity;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-15T11:56:41.720133952+07:00[Asia/Bangkok]")
public class AnalyticsApi {
private ApiClient apiClient;
public AnalyticsApi() {
this(new ApiClient());
}
@Autowired
public AnalyticsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Chart
* Creates a new chart request.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ChartRequestViewAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createChartRequestRequestCreation(UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
Object postBody = upsertChartRequestWrapperAuthenticatedEntity;
// verify the required parameter 'upsertChartRequestWrapperAuthenticatedEntity' is set
if (upsertChartRequestWrapperAuthenticatedEntity == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertChartRequestWrapperAuthenticatedEntity' when calling createChartRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/chart", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Chart
* Creates a new chart request.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ChartRequestViewAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createChartRequest(UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createChartRequestRequestCreation(upsertChartRequestWrapperAuthenticatedEntity, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Chart
* Creates a new chart request.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<ChartRequestViewAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createChartRequestWithHttpInfo(UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createChartRequestRequestCreation(upsertChartRequestWrapperAuthenticatedEntity, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Chart
* Creates a new chart request.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createChartRequestWithResponseSpec(UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
return createChartRequestRequestCreation(upsertChartRequestWrapperAuthenticatedEntity, winkVersion);
}
/**
* Remove Chart
* Remove chart request for specific identifier.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeChartRequestRequestCreation(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'chartIdentifier' is set
if (chartIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'chartIdentifier' when calling removeChartRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("chartIdentifier", chartIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/chart/{chartIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Remove Chart
* Remove chart request for specific identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeChartRequest(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeChartRequestRequestCreation(chartIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Remove Chart
* Remove chart request for specific identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RemoveEntryResponseAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeChartRequestWithHttpInfo(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeChartRequestRequestCreation(chartIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Remove Chart
* Remove chart request for specific identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec removeChartRequestWithResponseSpec(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removeChartRequestRequestCreation(chartIdentifier, winkVersion, accept);
}
/**
* Show Analytics Grid
* Show paginated analytics.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateNonAuthenticatedEntity The stateNonAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return PageLineChartNonAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showAnalyticsGridRequestCreation(StateNonAuthenticatedEntity stateNonAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
Object postBody = stateNonAuthenticatedEntity;
// verify the required parameter 'stateNonAuthenticatedEntity' is set
if (stateNonAuthenticatedEntity == null) {
throw new WebClientResponseException("Missing the required parameter 'stateNonAuthenticatedEntity' when calling showAnalyticsGrid", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/grid", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Analytics Grid
* Show paginated analytics.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateNonAuthenticatedEntity The stateNonAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return PageLineChartNonAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showAnalyticsGrid(StateNonAuthenticatedEntity stateNonAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAnalyticsGridRequestCreation(stateNonAuthenticatedEntity, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Show Analytics Grid
* Show paginated analytics.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateNonAuthenticatedEntity The stateNonAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<PageLineChartNonAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showAnalyticsGridWithHttpInfo(StateNonAuthenticatedEntity stateNonAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAnalyticsGridRequestCreation(stateNonAuthenticatedEntity, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Analytics Grid
* Show paginated analytics.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param stateNonAuthenticatedEntity The stateNonAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showAnalyticsGridWithResponseSpec(StateNonAuthenticatedEntity stateNonAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
return showAnalyticsGridRequestCreation(stateNonAuthenticatedEntity, winkVersion);
}
/**
* Show Analytics
* Show analytics.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<LineChartNonAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showAnalyticsListRequestCreation(String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Analytics
* Show analytics.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<LineChartNonAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showAnalyticsList(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAnalyticsListRequestCreation(winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Analytics
* Show analytics.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<LineChartNonAuthenticatedEntity>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showAnalyticsListWithHttpInfo(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showAnalyticsListRequestCreation(winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Analytics
* Show analytics.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showAnalyticsListWithResponseSpec(String winkVersion, String accept) throws WebClientResponseException {
return showAnalyticsListRequestCreation(winkVersion, accept);
}
/**
* Show Chart
* Displays a single chart request by identifier.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ChartRequestViewAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showChartRequestRequestCreation(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'chartIdentifier' is set
if (chartIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'chartIdentifier' when calling showChartRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("chartIdentifier", chartIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/chart/{chartIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Chart
* Displays a single chart request by identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ChartRequestViewAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showChartRequest(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChartRequestRequestCreation(chartIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Chart
* Displays a single chart request by identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<ChartRequestViewAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showChartRequestWithHttpInfo(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChartRequestRequestCreation(chartIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Chart
* Displays a single chart request by identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showChartRequestWithResponseSpec(String chartIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showChartRequestRequestCreation(chartIdentifier, winkVersion, accept);
}
/**
* Show Charts
* Displays all charts for caller.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<ChartRequestViewAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showChartRequestsRequestCreation(String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// create path and map variables
final Map pathParams = new HashMap();
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/chart/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Charts
* Displays all charts for caller.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<ChartRequestViewAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showChartRequests(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChartRequestsRequestCreation(winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Charts
* Displays all charts for caller.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<ChartRequestViewAuthenticatedEntity>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showChartRequestsWithHttpInfo(String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showChartRequestsRequestCreation(winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Charts
* Displays all charts for caller.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showChartRequestsWithResponseSpec(String winkVersion, String accept) throws WebClientResponseException {
return showChartRequestsRequestCreation(winkVersion, accept);
}
/**
* Update Chart
* Updates an existing chart request by identifier.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ChartRequestViewAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateChartRequestRequestCreation(String chartIdentifier, UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
Object postBody = upsertChartRequestWrapperAuthenticatedEntity;
// verify the required parameter 'chartIdentifier' is set
if (chartIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'chartIdentifier' when calling updateChartRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertChartRequestWrapperAuthenticatedEntity' is set
if (upsertChartRequestWrapperAuthenticatedEntity == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertChartRequestWrapperAuthenticatedEntity' when calling updateChartRequest", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map pathParams = new HashMap();
pathParams.put("chartIdentifier", chartIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/analytics/chart/{chartIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Chart
* Updates an existing chart request by identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ChartRequestViewAuthenticatedEntity
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateChartRequest(String chartIdentifier, UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateChartRequestRequestCreation(chartIdentifier, upsertChartRequestWrapperAuthenticatedEntity, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Chart
* Updates an existing chart request by identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<ChartRequestViewAuthenticatedEntity>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateChartRequestWithHttpInfo(String chartIdentifier, UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateChartRequestRequestCreation(chartIdentifier, upsertChartRequestWrapperAuthenticatedEntity, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Chart
* Updates an existing chart request by identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param chartIdentifier Chart identifier
* @param upsertChartRequestWrapperAuthenticatedEntity The upsertChartRequestWrapperAuthenticatedEntity parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateChartRequestWithResponseSpec(String chartIdentifier, UpsertChartRequestWrapperAuthenticatedEntity upsertChartRequestWrapperAuthenticatedEntity, String winkVersion) throws WebClientResponseException {
return updateChartRequestRequestCreation(chartIdentifier, upsertChartRequestWrapperAuthenticatedEntity, winkVersion);
}
}