travel.wink.sdk.extranet.facilities.api.SpaApi Maven / Gradle / Ivy
Show all versions of extranet-facilities-sdk-java Show documentation
package travel.wink.sdk.extranet.facilities.api;
import travel.wink.sdk.extranet.facilities.invoker.ApiClient;
import java.io.File;
import travel.wink.sdk.extranet.facilities.model.GenericErrorMessage;
import travel.wink.sdk.extranet.facilities.model.KeyValuePairSupplier;
import travel.wink.sdk.extranet.facilities.model.ShowSpa400Response;
import travel.wink.sdk.extranet.facilities.model.SpaViewSupplier;
import travel.wink.sdk.extranet.facilities.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-11-04T20:29:17.911955301+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
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new spa record owned by this property 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 propertyIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSpaRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/facility/spa", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Spa
* Create a new spa
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new spa record owned by this property 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 propertyIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSpaRequestCreation(propertyIdentifier, upsertSpaRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Spa
* Create a new spa
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new spa record owned by this property 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 propertyIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createSpaRequestCreation(propertyIdentifier, upsertSpaRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Spa
* Create a new spa
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new spa record owned by this property 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 propertyIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
return createSpaRequestCreation(propertyIdentifier, upsertSpaRequestSupplier, winkVersion);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing spa owned by this property 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
* @param accept The accept parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec deleteMultimediaRequestCreation(String propertyIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
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));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/property/{propertyIdentifier}/facility/spa/{spaIdentifier}/multimedia/{multimediaIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing spa owned by this property 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
* @param accept The accept parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono deleteMultimedia(String propertyIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return deleteMultimediaRequestCreation(propertyIdentifier, spaIdentifier, multimediaIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing spa owned by this property 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
* @param accept The accept parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> deleteMultimediaWithHttpInfo(String propertyIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return deleteMultimediaRequestCreation(propertyIdentifier, spaIdentifier, multimediaIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing spa.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing spa owned by this property 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
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec deleteMultimediaWithResponseSpec(String propertyIdentifier, String spaIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return deleteMultimediaRequestCreation(propertyIdentifier, spaIdentifier, multimediaIdentifier, winkVersion, accept);
}
/**
* Delete Spa
* Delete a spa by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove spa record owned by this property identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeSpaRequestCreation(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
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));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/property/{propertyIdentifier}/facility/spa/{spaIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Spa
* Delete a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove spa record owned by this property identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeSpa(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSpaRequestCreation(propertyIdentifier, spaIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Spa
* Delete a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove spa record owned by this property identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeSpaWithHttpInfo(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeSpaRequestCreation(propertyIdentifier, spaIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Spa
* Delete a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove spa record owned by this property identifier
* @param spaIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec removeSpaWithResponseSpec(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removeSpaRequestCreation(propertyIdentifier, spaIdentifier, winkVersion, accept);
}
/**
* Show Spa
* Retrieve a spa by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single spa owned by this property identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSpaRequestCreation(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
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));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/property/{propertyIdentifier}/facility/spa/{spaIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Spa
* Retrieve a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single spa owned by this property identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return SpaViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showSpa(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaRequestCreation(propertyIdentifier, spaIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Spa
* Retrieve a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single spa owned by this property identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showSpaWithHttpInfo(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaRequestCreation(propertyIdentifier, spaIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Spa
* Retrieve a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single spa owned by this property identifier
* @param spaIdentifier Show spa record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showSpaWithResponseSpec(String propertyIdentifier, String spaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showSpaRequestCreation(propertyIdentifier, spaIdentifier, winkVersion, accept);
}
/**
* Show Reference Pairs
* Retrieve list of spas as key/value pairs (identifier, name)
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spa pairs owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<KeyValuePairSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSpaPairsRequestCreation(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/property/{propertyIdentifier}/facility/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)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spa pairs owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<KeyValuePairSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSpaPairs(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaPairsRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of spas as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spa pairs owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<KeyValuePairSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showSpaPairsWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpaPairsRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of spas as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spa pairs owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showSpaPairsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showSpaPairsRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Show Spas
* Retrieve list of spas for property.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spas owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showSpasRequestCreation(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
final MultiValueMap queryParams = new LinkedMultiValueMap();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap cookieParams = new LinkedMultiValueMap();
final MultiValueMap formParams = new LinkedMultiValueMap();
if (winkVersion != null)
headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion));
if (accept != null)
headerParams.add("Accept", apiClient.parameterToString(accept));
final String[] localVarAccepts = {
"application/json", "application/xml", "text/xml", "text/plain", "*/*"
};
final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/property/{propertyIdentifier}/facility/spa/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Spas
* Retrieve list of spas for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spas owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<SpaViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showSpas(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpasRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Spas
* Retrieve list of spas for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spas owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<SpaViewSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showSpasWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showSpasRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Spas
* Retrieve list of spas for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show spas owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec showSpasWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showSpasRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Update Spa
* Update a spa by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing spa record owned by this property 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 propertyIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertSpaRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/facility/spa/{spaIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Spa
* Update a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing spa record owned by this property 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 propertyIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSpaRequestCreation(propertyIdentifier, spaIdentifier, upsertSpaRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Spa
* Update a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing spa record owned by this property 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 propertyIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateSpaRequestCreation(propertyIdentifier, spaIdentifier, upsertSpaRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Spa
* Update a spa by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing spa record owned by this property 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 propertyIdentifier, String spaIdentifier, UpsertSpaRequestSupplier upsertSpaRequestSupplier, String winkVersion) throws WebClientResponseException {
return updateSpaRequestCreation(propertyIdentifier, spaIdentifier, upsertSpaRequestSupplier, winkVersion);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
207 - Multi-Status
* @param propertyIdentifier Upload multipart files and associate them with an existing spa owned by this property 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 propertyIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
Object postBody = null;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' 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("propertyIdentifier", propertyIdentifier);
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/property/{propertyIdentifier}/facility/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.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
207 - Multi-Status
* @param propertyIdentifier Upload multipart files and associate them with an existing spa owned by this property 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 propertyIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadSpaMediaRequestCreation(propertyIdentifier, spaIdentifier, files).bodyToMono(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
207 - Multi-Status
* @param propertyIdentifier Upload multipart files and associate them with an existing spa owned by this property 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 propertyIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadSpaMediaRequestCreation(propertyIdentifier, spaIdentifier, files).toEntity(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing spa.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
207 - Multi-Status
* @param propertyIdentifier Upload multipart files and associate them with an existing spa owned by this property 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 propertyIdentifier, String spaIdentifier, List files) throws WebClientResponseException {
return uploadSpaMediaRequestCreation(propertyIdentifier, spaIdentifier, files);
}
}