travel.wink.sdk.extranet.api.SpaApi Maven / Gradle / Ivy
Show all versions of extranet-sdk-java Show documentation
package travel.wink.sdk.extranet.api;
import travel.wink.sdk.extranet.invoker.ApiClient;
import java.io.File;
import travel.wink.sdk.extranet.model.GenericErrorMessage;
import travel.wink.sdk.extranet.model.KeyValuePairSupplier;
import travel.wink.sdk.extranet.model.RemoveEntryResponseSupplier;
import travel.wink.sdk.extranet.model.ShowPropertyPolicy400Response;
import travel.wink.sdk.extranet.model.SpaViewSupplier;
import travel.wink.sdk.extranet.model.UpsertSpaRequestSupplier;
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 SpaApi {
private ApiClient apiClient;
public SpaApi() {
this(new ApiClient());
}
@Autowired
public SpaApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Spa
* Create a new spa
* 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 Create a new spa record owned by this hotel identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createSpaRequestCreation(String hotelIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSpaRequestSupplier;
// verify the required parameter 'hotelIdentifier' is set
if (hotelIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling createSpa", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertSpaRequestSupplier' is set
if (upsertSpaRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSpaRequestSupplier' when calling createSpa", 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/spa", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Spa
* Create a new spa
* 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 Create a new spa record owned by this hotel identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createSpa(String hotelIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSpaRequestCreation(hotelIdentifier, upsertSpaRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Spa
* Create a new spa
* 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 Create a new spa record owned by this hotel identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createSpaWithHttpInfo(String hotelIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSpaRequestCreation(hotelIdentifier, upsertSpaRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Spa
* Create a new spa
* 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 Create a new spa record owned by this hotel identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createSpaWithResponseSpec(String hotelIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
return createSpaRequestCreation(hotelIdentifier, upsertSpaRequestSupplier, winkVersion);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
*
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 Remove a media record from an existing spa owned by this hotel identifier.
* @param spaIdentifier Remove a media record from an existing spa identified by this identifier.
* @param multimediaIdentifier Remove a media record with this identifier
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec deleteMultimediaRequestCreation(String hotelIdentifier, String spaIdentifier, String multimediaIdentifier, 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 deleteMultimedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'spaIdentifier' is set
if (spaIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'spaIdentifier' when calling deleteMultimedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'multimediaIdentifier' is set
if (multimediaIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'multimediaIdentifier' when calling deleteMultimedia", 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("spaIdentifier", spaIdentifier);
pathParams.put("multimediaIdentifier", multimediaIdentifier);
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/spa/{spaIdentifier}/multimedia/{multimediaIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
* 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 Remove a media record from an existing spa owned by this hotel identifier.
* @param spaIdentifier Remove a media record from an existing spa identified by this identifier.
* @param multimediaIdentifier Remove a media record with this identifier
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono deleteMultimedia(String hotelIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return deleteMultimediaRequestCreation(hotelIdentifier, spaIdentifier, multimediaIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
* 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 Remove a media record from an existing spa owned by this hotel identifier.
* @param spaIdentifier Remove a media record from an existing spa identified by this identifier.
* @param multimediaIdentifier Remove a media record with this identifier
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> deleteMultimediaWithHttpInfo(String hotelIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return deleteMultimediaRequestCreation(hotelIdentifier, spaIdentifier, multimediaIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
* 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 Remove a media record from an existing spa owned by this hotel identifier.
* @param spaIdentifier Remove a media record from an existing spa identified by this identifier.
* @param multimediaIdentifier Remove a media record with this identifier
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec deleteMultimediaWithResponseSpec(String hotelIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion) throws WebClientResponseException {
return deleteMultimediaRequestCreation(hotelIdentifier, spaIdentifier, multimediaIdentifier, winkVersion);
}
/**
* Delete Spa
* Delete a spa 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 Remove spa record owned by this hotel identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @return RemoveEntryResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeSpaRequestCreation(String hotelIdentifier, String spaIdentifier, 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 removeSpa", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'spaIdentifier' is set
if (spaIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'spaIdentifier' when calling removeSpa", 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("spaIdentifier", spaIdentifier);
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/spa/{spaIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Spa
* Delete a spa 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 Remove spa record owned by this hotel identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @return RemoveEntryResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeSpa(String hotelIdentifier, String spaIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSpaRequestCreation(hotelIdentifier, spaIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Delete Spa
* Delete a spa 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 Remove spa record owned by this hotel identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<RemoveEntryResponseSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeSpaWithHttpInfo(String hotelIdentifier, String spaIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSpaRequestCreation(hotelIdentifier, spaIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Delete Spa
* Delete a spa 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 Remove spa record owned by this hotel identifier
* @param spaIdentifier Remove restaurant record 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 removeSpaWithResponseSpec(String hotelIdentifier, String spaIdentifier, String winkVersion) throws WebClientResponseException {
return removeSpaRequestCreation(hotelIdentifier, spaIdentifier, winkVersion);
}
/**
* Show Spa
* Retrieve a spa 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 single spa owned by this hotel identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSpaRequestCreation(String hotelIdentifier, String spaIdentifier, 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 showSpa", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'spaIdentifier' is set
if (spaIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'spaIdentifier' when calling showSpa", 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("spaIdentifier", spaIdentifier);
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/spa/{spaIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Spa
* Retrieve a spa 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 single spa owned by this hotel identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showSpa(String hotelIdentifier, String spaIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaRequestCreation(hotelIdentifier, spaIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Show Spa
* Retrieve a spa 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 single spa owned by this hotel identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showSpaWithHttpInfo(String hotelIdentifier, String spaIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaRequestCreation(hotelIdentifier, spaIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Show Spa
* Retrieve a spa 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 single spa owned by this hotel identifier
* @param spaIdentifier Show spa record 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 showSpaWithResponseSpec(String hotelIdentifier, String spaIdentifier, String winkVersion) throws WebClientResponseException {
return showSpaRequestCreation(hotelIdentifier, spaIdentifier, winkVersion);
}
/**
* Show Reference Pairs
* Retrieve list of spas as 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 spa pairs owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSpaPairsRequestCreation(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 showSpaPairs", 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/spa/list/pair", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of spas as 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 spa pairs owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return List<KeyValuePairSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSpaPairs(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaPairsRequestCreation(hotelIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of spas as 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 spa pairs owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<KeyValuePairSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showSpaPairsWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaPairsRequestCreation(hotelIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of spas as 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 spa pairs owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showSpaPairsWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
return showSpaPairsRequestCreation(hotelIdentifier, winkVersion);
}
/**
* Show Spas
* Retrieve list of spas 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 spas owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return List<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSpasRequestCreation(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 showSpas", 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/spa/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Spas
* Retrieve list of spas 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 spas owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return List<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSpas(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpasRequestCreation(hotelIdentifier, winkVersion).bodyToFlux(localVarReturnType);
}
/**
* Show Spas
* Retrieve list of spas 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 spas owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<List<SpaViewSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showSpasWithHttpInfo(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpasRequestCreation(hotelIdentifier, winkVersion).toEntityList(localVarReturnType);
}
/**
* Show Spas
* Retrieve list of spas 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 spas owned by this hotel identifier
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showSpasWithResponseSpec(String hotelIdentifier, String winkVersion) throws WebClientResponseException {
return showSpasRequestCreation(hotelIdentifier, winkVersion);
}
/**
* Update Spa
* Update a spa 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 an existing spa record owned by this hotel identifier
* @param spaIdentifier Update an existing spa record identified by this identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateSpaRequestCreation(String hotelIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSpaRequestSupplier;
// verify the required parameter 'hotelIdentifier' is set
if (hotelIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'hotelIdentifier' when calling updateSpa", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'spaIdentifier' is set
if (spaIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'spaIdentifier' when calling updateSpa", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertSpaRequestSupplier' is set
if (upsertSpaRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertSpaRequestSupplier' when calling updateSpa", 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("spaIdentifier", spaIdentifier);
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/spa/{spaIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Spa
* Update a spa 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 an existing spa record owned by this hotel identifier
* @param spaIdentifier Update an existing spa record identified by this identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateSpa(String hotelIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSpaRequestCreation(hotelIdentifier, spaIdentifier, upsertSpaRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Spa
* Update a spa 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 an existing spa record owned by this hotel identifier
* @param spaIdentifier Update an existing spa record identified by this identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateSpaWithHttpInfo(String hotelIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSpaRequestCreation(hotelIdentifier, spaIdentifier, upsertSpaRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Spa
* Update a spa 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 an existing spa record owned by this hotel identifier
* @param spaIdentifier Update an existing spa record identified by this identifier
* @param upsertSpaRequestSupplier The upsertSpaRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateSpaWithResponseSpec(String hotelIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
return updateSpaRequestCreation(hotelIdentifier, spaIdentifier, upsertSpaRequestSupplier, winkVersion);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
*
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 files and associate them with an existing spa owned by this hotel identifier
* @param spaIdentifier Upload multipart files and associate them with an existing spa with this identifier
* @param files The files parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec uploadSpaMediaRequestCreation(String hotelIdentifier, String spaIdentifier, 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 uploadSpaMedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'spaIdentifier' is set
if (spaIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'spaIdentifier' when calling uploadSpaMedia", 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 uploadSpaMedia", 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("spaIdentifier", spaIdentifier);
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/spa/{spaIdentifier}/multimedia", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
* 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 files and associate them with an existing spa owned by this hotel identifier
* @param spaIdentifier Upload multipart files and associate them with an existing spa with this identifier
* @param files The files parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono uploadSpaMedia(String hotelIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadSpaMediaRequestCreation(hotelIdentifier, spaIdentifier, files).bodyToMono(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
* 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 files and associate them with an existing spa owned by this hotel identifier
* @param spaIdentifier Upload multipart files and associate them with an existing spa with this identifier
* @param files The files parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> uploadSpaMediaWithHttpInfo(String hotelIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadSpaMediaRequestCreation(hotelIdentifier, spaIdentifier, files).toEntity(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
* 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 files and associate them with an existing spa owned by this hotel identifier
* @param spaIdentifier Upload multipart files and associate them with an existing spa with this identifier
* @param files The files parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec uploadSpaMediaWithResponseSpec(String hotelIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
return uploadSpaMediaRequestCreation(hotelIdentifier, spaIdentifier, files);
}
}