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

travel.wink.sdk.user.settings.api.ApplicationApi Maven / Gradle / Ivy

There is a newer version: 30.5.15
Show newest version
package travel.wink.sdk.user.settings.api;

import travel.wink.sdk.user.settings.invoker.ApiClient;

import travel.wink.sdk.user.settings.model.Application;
import travel.wink.sdk.user.settings.model.CreateApplicationResponse;
import travel.wink.sdk.user.settings.model.GenericErrorMessage;
import travel.wink.sdk.user.settings.model.ManagingEntity;
import travel.wink.sdk.user.settings.model.RemoveEntryResponse;
import travel.wink.sdk.user.settings.model.RevokeClientIdResponse;
import travel.wink.sdk.user.settings.model.ShowProfile400Response;
import travel.wink.sdk.user.settings.model.UpdateApplicationResponse;
import travel.wink.sdk.user.settings.model.UpsertApplicationRequest;

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-15T12:00:58.775337864+07:00[Asia/Bangkok]")
public class ApplicationApi {
    private ApiClient apiClient;

    public ApplicationApi() {
        this(new ApiClient());
    }

    @Autowired
    public ApplicationApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Create Application
     * Create a new application
     * 

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return CreateApplicationResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createApplicationRequestCreation(UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { Object postBody = upsertApplicationRequest; // verify the required parameter 'upsertApplicationRequest' is set if (upsertApplicationRequest == null) { throw new WebClientResponseException("Missing the required parameter 'upsertApplicationRequest' when calling createApplication", 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/application", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create Application * Create a new application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return CreateApplicationResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createApplication(UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createApplicationRequestCreation(upsertApplicationRequest, winkVersion).bodyToMono(localVarReturnType); } /** * Create Application * Create a new application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<CreateApplicationResponse> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> createApplicationWithHttpInfo(UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createApplicationRequestCreation(upsertApplicationRequest, winkVersion).toEntity(localVarReturnType); } /** * Create Application * Create a new application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec createApplicationWithResponseSpec(UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { return createApplicationRequestCreation(upsertApplicationRequest, winkVersion); } /** * Delete Application * Remove a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec deleteApplicationRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'id' is set if (id == null) { throw new WebClientResponseException("Missing the required parameter 'id' when calling deleteApplication", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("id", id); 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/application/{id}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete Application * Remove a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono deleteApplication(String id, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return deleteApplicationRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Delete Application * Remove a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<RemoveEntryResponse> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> deleteApplicationWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return deleteApplicationRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType); } /** * Delete Application * Remove a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @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 deleteApplicationWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException { return deleteApplicationRequestCreation(id, winkVersion, accept); } /** * Show Application * Show a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return Application * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec loadApplicationRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'id' is set if (id == null) { throw new WebClientResponseException("Missing the required parameter 'id' when calling loadApplication", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("id", id); 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/application/{id}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Application * Show a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return Application * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono loadApplication(String id, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return loadApplicationRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Show Application * Show a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<Application> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> loadApplicationWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return loadApplicationRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType); } /** * Show Application * Show a specific application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @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 loadApplicationWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException { return loadApplicationRequestCreation(id, winkVersion, accept); } /** * Revoke Application Credentials * Refreshes the clientId and secretKey properties. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return RevokeClientIdResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec revokeApplicationRequestCreation(String id, String winkVersion, String accept) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'id' is set if (id == null) { throw new WebClientResponseException("Missing the required parameter 'id' when calling revokeApplication", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("id", id); 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/application/{id}/revoke", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Revoke Application Credentials * Refreshes the clientId and secretKey properties. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return RevokeClientIdResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono revokeApplication(String id, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return revokeApplicationRequestCreation(id, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Revoke Application Credentials * Refreshes the clientId and secretKey properties. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<RevokeClientIdResponse> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> revokeApplicationWithHttpInfo(String id, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return revokeApplicationRequestCreation(id, winkVersion, accept).toEntity(localVarReturnType); } /** * Revoke Application Credentials * Refreshes the clientId and secretKey properties. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @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 revokeApplicationWithResponseSpec(String id, String winkVersion, String accept) throws WebClientResponseException { return revokeApplicationRequestCreation(id, winkVersion, accept); } /** * Show Applications * List all applications owned by creating entity *

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<Application> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showApplicationsRequestCreation(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/application/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Applications * List all applications owned by creating entity *

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<Application> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showApplications(String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showApplicationsRequestCreation(winkVersion, accept).bodyToFlux(localVarReturnType); } /** * Show Applications * List all applications owned by creating entity *

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<Application>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showApplicationsWithHttpInfo(String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showApplicationsRequestCreation(winkVersion, accept).toEntityList(localVarReturnType); } /** * Show Applications * List all applications owned by creating entity *

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 showApplicationsWithResponseSpec(String winkVersion, String accept) throws WebClientResponseException { return showApplicationsRequestCreation(winkVersion, accept); } /** * Show Managing Entities * Lists all entities, including user entity, owned by user. *

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<ManagingEntity> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showManagingEntitiesRequestCreation(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/managing-entity/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Managing Entities * Lists all entities, including user entity, owned by user. *

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<ManagingEntity> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showManagingEntities(String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showManagingEntitiesRequestCreation(winkVersion, accept).bodyToFlux(localVarReturnType); } /** * Show Managing Entities * Lists all entities, including user entity, owned by user. *

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<ManagingEntity>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showManagingEntitiesWithHttpInfo(String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showManagingEntitiesRequestCreation(winkVersion, accept).toEntityList(localVarReturnType); } /** * Show Managing Entities * Lists all entities, including user entity, owned by user. *

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 showManagingEntitiesWithResponseSpec(String winkVersion, String accept) throws WebClientResponseException { return showManagingEntitiesRequestCreation(winkVersion, accept); } /** * Update Application * Update an existing application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return UpdateApplicationResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateApplicationRequestCreation(String id, UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { Object postBody = upsertApplicationRequest; // verify the required parameter 'id' is set if (id == null) { throw new WebClientResponseException("Missing the required parameter 'id' when calling updateApplication", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertApplicationRequest' is set if (upsertApplicationRequest == null) { throw new WebClientResponseException("Missing the required parameter 'upsertApplicationRequest' when calling updateApplication", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("id", id); 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/application/{id}", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update Application * Update an existing application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return UpdateApplicationResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateApplication(String id, UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateApplicationRequestCreation(id, upsertApplicationRequest, winkVersion).bodyToMono(localVarReturnType); } /** * Update Application * Update an existing application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<UpdateApplicationResponse> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> updateApplicationWithHttpInfo(String id, UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateApplicationRequestCreation(id, upsertApplicationRequest, winkVersion).toEntity(localVarReturnType); } /** * Update Application * Update an existing application *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param id The id parameter * @param upsertApplicationRequest The upsertApplicationRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec updateApplicationWithResponseSpec(String id, UpsertApplicationRequest upsertApplicationRequest, String winkVersion) throws WebClientResponseException { return updateApplicationRequestCreation(id, upsertApplicationRequest, winkVersion); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy