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

travel.wink.sdk.extranet.api.RecognitionApi Maven / Gradle / Ivy

There is a newer version: 30.2.1
Show newest version
package travel.wink.sdk.extranet.api;

import travel.wink.sdk.extranet.invoker.ApiClient;

import travel.wink.sdk.extranet.model.GenericErrorMessage;
import travel.wink.sdk.extranet.model.HotelViewSupplier;
import travel.wink.sdk.extranet.model.ShowPropertyPolicy400Response;
import travel.wink.sdk.extranet.model.TravelInventoryRecognitionSupplier;
import travel.wink.sdk.extranet.model.UpsertRecognitionSupplier;

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-06-04T22:29:13.908295668+07:00[Asia/Bangkok]")
public class RecognitionApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Create Recognition
     * Create a new request
     * 

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

201 - Created * @param hotelIdentifier Associate new request record with this hotel identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return HotelViewSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createRecognitionRequestCreation(String hotelIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { Object postBody = upsertRecognitionSupplier; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling createRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertRecognitionSupplier' is set if (upsertRecognitionSupplier == null) { throw new WebClientResponseException("Missing the required parameter 'upsertRecognitionSupplier' when calling createRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("hotelIdentifier", hotelIdentifier); 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/hotel/{hotelIdentifier}/inventory/recognition", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create Recognition * Create a new request *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

201 - Created * @param hotelIdentifier Associate new request record with this hotel identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return HotelViewSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createRecognition(String hotelIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createRecognitionRequestCreation(hotelIdentifier, upsertRecognitionSupplier, winkVersion).bodyToMono(localVarReturnType); } /** * Create Recognition * Create a new request *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

201 - Created * @param hotelIdentifier Associate new request record with this hotel identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<HotelViewSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> createRecognitionWithHttpInfo(String hotelIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createRecognitionRequestCreation(hotelIdentifier, upsertRecognitionSupplier, winkVersion).toEntity(localVarReturnType); } /** * Create Recognition * Create a new request *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

201 - Created * @param hotelIdentifier Associate new request record with this hotel identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec createRecognitionWithResponseSpec(String hotelIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { return createRecognitionRequestCreation(hotelIdentifier, upsertRecognitionSupplier, winkVersion); } /** * Delete Recognition * Delete a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

202 - Accepted * @param hotelIdentifier Delete recognition record for property with this hotel identifier * @param recognitionIdentifier Delete recognition with this identifier * @param winkVersion The winkVersion parameter * @return HotelViewSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec removeRecognitionRequestCreation(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling removeRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'recognitionIdentifier' is set if (recognitionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'recognitionIdentifier' when calling removeRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("hotelIdentifier", hotelIdentifier); pathParams.put("recognitionIdentifier", recognitionIdentifier); 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 = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hotel/{hotelIdentifier}/inventory/recognition/{recognitionIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete Recognition * Delete a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

202 - Accepted * @param hotelIdentifier Delete recognition record for property with this hotel identifier * @param recognitionIdentifier Delete recognition with this identifier * @param winkVersion The winkVersion parameter * @return HotelViewSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono removeRecognition(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, winkVersion).bodyToMono(localVarReturnType); } /** * Delete Recognition * Delete a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

202 - Accepted * @param hotelIdentifier Delete recognition record for property with this hotel identifier * @param recognitionIdentifier Delete recognition with this identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<HotelViewSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> removeRecognitionWithHttpInfo(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Delete Recognition * Delete a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

202 - Accepted * @param hotelIdentifier Delete recognition record for property with this hotel identifier * @param recognitionIdentifier Delete recognition with this identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec removeRecognitionWithResponseSpec(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { return removeRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, winkVersion); } /** * Show Recognition * Retrieve a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show recognition belonging to this hotel identifier * @param recognitionIdentifier Show recognition associated with this identifier * @param winkVersion The winkVersion parameter * @return TravelInventoryRecognitionSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showRecognitionRequestCreation(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'recognitionIdentifier' is set if (recognitionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'recognitionIdentifier' when calling showRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("hotelIdentifier", hotelIdentifier); pathParams.put("recognitionIdentifier", recognitionIdentifier); 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 = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hotel/{hotelIdentifier}/inventory/recognition/{recognitionIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Recognition * Retrieve a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show recognition belonging to this hotel identifier * @param recognitionIdentifier Show recognition associated with this identifier * @param winkVersion The winkVersion parameter * @return TravelInventoryRecognitionSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showRecognition(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, winkVersion).bodyToMono(localVarReturnType); } /** * Show Recognition * Retrieve a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show recognition belonging to this hotel identifier * @param recognitionIdentifier Show recognition associated with this identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<TravelInventoryRecognitionSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showRecognitionWithHttpInfo(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Show Recognition * Retrieve a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show recognition belonging to this hotel identifier * @param recognitionIdentifier Show recognition associated with this identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showRecognitionWithResponseSpec(String hotelIdentifier, String recognitionIdentifier, String winkVersion) throws WebClientResponseException { return showRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, winkVersion); } /** * Show Recognitions * Retrieve a list of all recognitions for property *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param winkVersion The winkVersion parameter * @return List<TravelInventoryRecognitionSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showRecognitionsRequestCreation(String hotelIdentifier, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showRecognitions", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("hotelIdentifier", hotelIdentifier); 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 = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hotel/{hotelIdentifier}/inventory/recognition/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Recognitions * Retrieve a list of all recognitions for property *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param winkVersion The winkVersion parameter * @return List<TravelInventoryRecognitionSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showRecognitions(String hotelIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showRecognitionsRequestCreation(hotelIdentifier, winkVersion).bodyToFlux(localVarReturnType); } /** * Show Recognitions * Retrieve a list of all recognitions for property *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<List<TravelInventoryRecognitionSupplier>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showRecognitionsWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showRecognitionsRequestCreation(hotelIdentifier, winkVersion).toEntityList(localVarReturnType); } /** * Show Recognitions * Retrieve a list of all recognitions for property *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showRecognitionsWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException { return showRecognitionsRequestCreation(hotelIdentifier, winkVersion); } /** * Show Recognition by Category * Retrieve list recognitions by category *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param category Filter list of recognitions by category * @param winkVersion The winkVersion parameter * @return List<TravelInventoryRecognitionSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showRecognitionsByCategoryRequestCreation(String hotelIdentifier, String category, String winkVersion) throws WebClientResponseException { Object postBody = null; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling showRecognitionsByCategory", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'category' is set if (category == null) { throw new WebClientResponseException("Missing the required parameter 'category' when calling showRecognitionsByCategory", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("hotelIdentifier", hotelIdentifier); pathParams.put("category", category); 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 = { }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hotel/{hotelIdentifier}/inventory/recognition/{category}/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Recognition by Category * Retrieve list recognitions by category *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param category Filter list of recognitions by category * @param winkVersion The winkVersion parameter * @return List<TravelInventoryRecognitionSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showRecognitionsByCategory(String hotelIdentifier, String category, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showRecognitionsByCategoryRequestCreation(hotelIdentifier, category, winkVersion).bodyToFlux(localVarReturnType); } /** * Show Recognition by Category * Retrieve list recognitions by category *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param category Filter list of recognitions by category * @param winkVersion The winkVersion parameter * @return ResponseEntity<List<TravelInventoryRecognitionSupplier>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showRecognitionsByCategoryWithHttpInfo(String hotelIdentifier, String category, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showRecognitionsByCategoryRequestCreation(hotelIdentifier, category, winkVersion).toEntityList(localVarReturnType); } /** * Show Recognition by Category * Retrieve list recognitions by category *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Show list of recognitions for this hotel identifier * @param category Filter list of recognitions by category * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showRecognitionsByCategoryWithResponseSpec(String hotelIdentifier, String category, String winkVersion) throws WebClientResponseException { return showRecognitionsByCategoryRequestCreation(hotelIdentifier, category, winkVersion); } /** * Update Recognition * Update a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Update recognition record associated with this hotel identifier * @param recognitionIdentifier Update recognition with this identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return HotelViewSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateRecognitionRequestCreation(String hotelIdentifier, String recognitionIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { Object postBody = upsertRecognitionSupplier; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling updateRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'recognitionIdentifier' is set if (recognitionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'recognitionIdentifier' when calling updateRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertRecognitionSupplier' is set if (upsertRecognitionSupplier == null) { throw new WebClientResponseException("Missing the required parameter 'upsertRecognitionSupplier' when calling updateRecognition", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("hotelIdentifier", hotelIdentifier); pathParams.put("recognitionIdentifier", recognitionIdentifier); 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/hotel/{hotelIdentifier}/inventory/recognition/{recognitionIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update Recognition * Update a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Update recognition record associated with this hotel identifier * @param recognitionIdentifier Update recognition with this identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return HotelViewSupplier * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateRecognition(String hotelIdentifier, String recognitionIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, upsertRecognitionSupplier, winkVersion).bodyToMono(localVarReturnType); } /** * Update Recognition * Update a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Update recognition record associated with this hotel identifier * @param recognitionIdentifier Update recognition with this identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<HotelViewSupplier> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> updateRecognitionWithHttpInfo(String hotelIdentifier, String recognitionIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, upsertRecognitionSupplier, winkVersion).toEntity(localVarReturnType); } /** * Update Recognition * Update a recognition by its identifier *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

200 - OK * @param hotelIdentifier Update recognition record associated with this hotel identifier * @param recognitionIdentifier Update recognition with this identifier * @param upsertRecognitionSupplier The upsertRecognitionSupplier parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec updateRecognitionWithResponseSpec(String hotelIdentifier, String recognitionIdentifier, UpsertRecognitionSupplier upsertRecognitionSupplier, String winkVersion) throws WebClientResponseException { return updateRecognitionRequestCreation(hotelIdentifier, recognitionIdentifier, upsertRecognitionSupplier, winkVersion); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy