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

travel.wink.sdk.extranet.api.AttractionApi 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.AttractionView;
import java.io.File;
import travel.wink.sdk.extranet.model.GenericErrorMessage;
import travel.wink.sdk.extranet.model.KeyValuePair;
import travel.wink.sdk.extranet.model.RemoveEntryResponse;
import travel.wink.sdk.extranet.model.ShowPropertyPolicy400Response;
import travel.wink.sdk.extranet.model.UpsertAttractionRequest;

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 AttractionApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

    /**
     * Create Attraction
     * Create a new attraction
     * 

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 Persist attraction owned by this hotel identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec createAttractionRequestCreation(String hotelIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { Object postBody = upsertAttractionRequest; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling createAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertAttractionRequest' is set if (upsertAttractionRequest == null) { throw new WebClientResponseException("Missing the required parameter 'upsertAttractionRequest' when calling createAttraction", 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/attraction", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Create Attraction * Create a new attraction *

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 Persist attraction owned by this hotel identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createAttraction(String hotelIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createAttractionRequestCreation(hotelIdentifier, upsertAttractionRequest, winkVersion).bodyToMono(localVarReturnType); } /** * Create Attraction * Create a new attraction *

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 Persist attraction owned by this hotel identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> createAttractionWithHttpInfo(String hotelIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createAttractionRequestCreation(hotelIdentifier, upsertAttractionRequest, winkVersion).toEntity(localVarReturnType); } /** * Create Attraction * Create a new attraction *

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 Persist attraction owned by this hotel identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec createAttractionWithResponseSpec(String hotelIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { return createAttractionRequestCreation(hotelIdentifier, upsertAttractionRequest, winkVersion); } /** * Delete attraction * Delete an attraction 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 attraction owned by this hotel identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec removeAttractionRequestCreation(String hotelIdentifier, String attractionIdentifier, 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 removeAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling removeAttraction", 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("attractionIdentifier", attractionIdentifier); 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/attraction/{attractionIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete attraction * Delete an attraction 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 attraction owned by this hotel identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono removeAttraction(String hotelIdentifier, String attractionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeAttractionRequestCreation(hotelIdentifier, attractionIdentifier, winkVersion).bodyToMono(localVarReturnType); } /** * Delete attraction * Delete an attraction 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 attraction owned by this hotel identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<RemoveEntryResponse> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> removeAttractionWithHttpInfo(String hotelIdentifier, String attractionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeAttractionRequestCreation(hotelIdentifier, attractionIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Delete attraction * Delete an attraction 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 attraction owned by this hotel identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec removeAttractionWithResponseSpec(String hotelIdentifier, String attractionIdentifier, String winkVersion) throws WebClientResponseException { return removeAttractionRequestCreation(hotelIdentifier, attractionIdentifier, winkVersion); } /** * Show Attraction * Retrieve an attraction by 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 attraction owned by this hotel identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showAttractionRequestCreation(String hotelIdentifier, String attractionIdentifier, 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 showAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling showAttraction", 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("attractionIdentifier", attractionIdentifier); 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/attraction/{attractionIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Attraction * Retrieve an attraction by 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 attraction owned by this hotel identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showAttraction(String hotelIdentifier, String attractionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionRequestCreation(hotelIdentifier, attractionIdentifier, winkVersion).bodyToMono(localVarReturnType); } /** * Show Attraction * Retrieve an attraction by 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 attraction owned by this hotel identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showAttractionWithHttpInfo(String hotelIdentifier, String attractionIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionRequestCreation(hotelIdentifier, attractionIdentifier, winkVersion).toEntity(localVarReturnType); } /** * Show Attraction * Retrieve an attraction by 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 attraction owned by this hotel identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showAttractionWithResponseSpec(String hotelIdentifier, String attractionIdentifier, String winkVersion) throws WebClientResponseException { return showAttractionRequestCreation(hotelIdentifier, attractionIdentifier, winkVersion); } /** * Show Attractions as Pairs * Retrieve list of key value pairs (identifier, name) *

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 attraction key/value pairs associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return List<KeyValuePair> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showAttractionPairsRequestCreation(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 showAttractionPairs", 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/attraction/list/pair", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Attractions as Pairs * Retrieve list of key value pairs (identifier, name) *

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 attraction key/value pairs associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return List<KeyValuePair> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showAttractionPairs(String hotelIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionPairsRequestCreation(hotelIdentifier, winkVersion).bodyToFlux(localVarReturnType); } /** * Show Attractions as Pairs * Retrieve list of key value pairs (identifier, name) *

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 attraction key/value pairs associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<List<KeyValuePair>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showAttractionPairsWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionPairsRequestCreation(hotelIdentifier, winkVersion).toEntityList(localVarReturnType); } /** * Show Attractions as Pairs * Retrieve list of key value pairs (identifier, name) *

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 attraction key/value pairs associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showAttractionPairsWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException { return showAttractionPairsRequestCreation(hotelIdentifier, winkVersion); } /** * Show Attractions * Retrieve list of attractions *

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 attractions associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return List<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showAttractionsRequestCreation(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 showAttractions", 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/attraction/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Attractions * Retrieve list of attractions *

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 attractions associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return List<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Flux showAttractions(String hotelIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionsRequestCreation(hotelIdentifier, winkVersion).bodyToFlux(localVarReturnType); } /** * Show Attractions * Retrieve list of attractions *

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 attractions associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return ResponseEntity<List<AttractionView>> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono>> showAttractionsWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionsRequestCreation(hotelIdentifier, winkVersion).toEntityList(localVarReturnType); } /** * Show Attractions * Retrieve list of attractions *

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 attractions associated with this hotel identifier * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec showAttractionsWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException { return showAttractionsRequestCreation(hotelIdentifier, winkVersion); } /** * Update Attraction * Update an attraction 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 existing attraction record owned by this hotel identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateAttractionRequestCreation(String hotelIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { Object postBody = upsertAttractionRequest; // verify the required parameter 'hotelIdentifier' is set if (hotelIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling updateAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling updateAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertAttractionRequest' is set if (upsertAttractionRequest == null) { throw new WebClientResponseException("Missing the required parameter 'upsertAttractionRequest' when calling updateAttraction", 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("attractionIdentifier", attractionIdentifier); 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/attraction/{attractionIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update Attraction * Update an attraction 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 existing attraction record owned by this hotel identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateAttraction(String hotelIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateAttractionRequestCreation(hotelIdentifier, attractionIdentifier, upsertAttractionRequest, winkVersion).bodyToMono(localVarReturnType); } /** * Update Attraction * Update an attraction 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 existing attraction record owned by this hotel identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> updateAttractionWithHttpInfo(String hotelIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateAttractionRequestCreation(hotelIdentifier, attractionIdentifier, upsertAttractionRequest, winkVersion).toEntity(localVarReturnType); } /** * Update Attraction * Update an attraction 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 existing attraction record owned by this hotel identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec updateAttractionWithResponseSpec(String hotelIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { return updateAttractionRequestCreation(hotelIdentifier, attractionIdentifier, upsertAttractionRequest, winkVersion); } /** * Upload Binary Multimedia * Upload binary videos and/or images to an attraction identified by its identifier. Valid file types: .gif, .jpg, .jpeg, .png, .bmp, .tif, .tiff, .avi, .mpeg, .mov, .mp4, .mkv. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

207 - Multi-Status * @param hotelIdentifier Upload multipart media for attraction owned by this hotel identifier * @param attractionIdentifier Associate multipart media with attraction identified by this identifier * @param files The files parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec uploadAttractionMediaRequestCreation(String hotelIdentifier, String attractionIdentifier, List files) 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 uploadAttractionMedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling uploadAttractionMedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'files' is set if (files == null) { throw new WebClientResponseException("Missing the required parameter 'files' when calling uploadAttractionMedia", 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("attractionIdentifier", attractionIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (files != null) formParams.addAll("files", files.stream().map(FileSystemResource::new).collect(Collectors.toList())); final String[] localVarAccepts = { "*/*", "application/json", "application/xml", "text/xml", "text/plain" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "multipart/form-data" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/hotel/{hotelIdentifier}/inventory/attraction/{attractionIdentifier}/multimedia", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Upload Binary Multimedia * Upload binary videos and/or images to an attraction identified by its identifier. Valid file types: .gif, .jpg, .jpeg, .png, .bmp, .tif, .tiff, .avi, .mpeg, .mov, .mp4, .mkv. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

207 - Multi-Status * @param hotelIdentifier Upload multipart media for attraction owned by this hotel identifier * @param attractionIdentifier Associate multipart media with attraction identified by this identifier * @param files The files parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono uploadAttractionMedia(String hotelIdentifier, String attractionIdentifier, List files) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return uploadAttractionMediaRequestCreation(hotelIdentifier, attractionIdentifier, files).bodyToMono(localVarReturnType); } /** * Upload Binary Multimedia * Upload binary videos and/or images to an attraction identified by its identifier. Valid file types: .gif, .jpg, .jpeg, .png, .bmp, .tif, .tiff, .avi, .mpeg, .mov, .mp4, .mkv. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

207 - Multi-Status * @param hotelIdentifier Upload multipart media for attraction owned by this hotel identifier * @param attractionIdentifier Associate multipart media with attraction identified by this identifier * @param files The files parameter * @return ResponseEntity<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> uploadAttractionMediaWithHttpInfo(String hotelIdentifier, String attractionIdentifier, List files) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return uploadAttractionMediaRequestCreation(hotelIdentifier, attractionIdentifier, files).toEntity(localVarReturnType); } /** * Upload Binary Multimedia * Upload binary videos and/or images to an attraction identified by its identifier. Valid file types: .gif, .jpg, .jpeg, .png, .bmp, .tif, .tiff, .avi, .mpeg, .mov, .mp4, .mkv. *

503 - Service Unavailable *

400 - Bad Request *

405 - Method Not Allowed *

415 - Unsupported Media Type *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

207 - Multi-Status * @param hotelIdentifier Upload multipart media for attraction owned by this hotel identifier * @param attractionIdentifier Associate multipart media with attraction identified by this identifier * @param files The files parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec uploadAttractionMediaWithResponseSpec(String hotelIdentifier, String attractionIdentifier, List files) throws WebClientResponseException { return uploadAttractionMediaRequestCreation(hotelIdentifier, attractionIdentifier, files); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy