travel.wink.sdk.extranet.facilities.api.RestaurantApi 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.RestaurantViewSupplier;
import travel.wink.sdk.extranet.facilities.model.ShowSpa400Response;
import travel.wink.sdk.extranet.facilities.model.UpsertRestaurantRequestSupplier;
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 RestaurantApi {
private ApiClient apiClient;
public RestaurantApi() {
this(new ApiClient());
}
@Autowired
public RestaurantApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Restaurant
* Create a new restaurant
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new restaurant record owned by this property identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createRestaurantRequestCreation(String propertyIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertRestaurantRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling createRestaurant", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertRestaurantRequestSupplier' is set
if (upsertRestaurantRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertRestaurantRequestSupplier' when calling createRestaurant", 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/restaurant", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Restaurant
* Create a new restaurant
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new restaurant record owned by this property identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createRestaurant(String propertyIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createRestaurantRequestCreation(propertyIdentifier, upsertRestaurantRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Restaurant
* Create a new restaurant
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new restaurant record owned by this property identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createRestaurantWithHttpInfo(String propertyIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createRestaurantRequestCreation(propertyIdentifier, upsertRestaurantRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Restaurant
* Create a new restaurant
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new restaurant record owned by this property identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createRestaurantWithResponseSpec(String propertyIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
return createRestaurantRequestCreation(propertyIdentifier, upsertRestaurantRequestSupplier, winkVersion);
}
/**
* Delete Multimedia
* Remove media from an existing restaurant.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing restaurant owned by this property identifier.
* @param restaurantIdentifier Remove a media record from an existing restaurant identified by this identifier.
* @param multimediaIdentifier Remove a media record with this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeMultimediaRequestCreation(String propertyIdentifier, String restaurantIdentifier, 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 removeMultimedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'restaurantIdentifier' is set
if (restaurantIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'restaurantIdentifier' when calling removeMultimedia", 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 removeMultimedia", 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("restaurantIdentifier", restaurantIdentifier);
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/restaurant/{restaurantIdentifier}/multimedia/{multimediaIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing restaurant.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing restaurant owned by this property identifier.
* @param restaurantIdentifier Remove a media record from an existing restaurant identified by this identifier.
* @param multimediaIdentifier Remove a media record with this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeMultimedia(String propertyIdentifier, String restaurantIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeMultimediaRequestCreation(propertyIdentifier, restaurantIdentifier, multimediaIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing restaurant.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing restaurant owned by this property identifier.
* @param restaurantIdentifier Remove a media record from an existing restaurant 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<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeMultimediaWithHttpInfo(String propertyIdentifier, String restaurantIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeMultimediaRequestCreation(propertyIdentifier, restaurantIdentifier, multimediaIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Multimedia
* Remove media from an existing restaurant.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove a media record from an existing restaurant owned by this property identifier.
* @param restaurantIdentifier Remove a media record from an existing restaurant 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 removeMultimediaWithResponseSpec(String propertyIdentifier, String restaurantIdentifier, String multimediaIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removeMultimediaRequestCreation(propertyIdentifier, restaurantIdentifier, multimediaIdentifier, winkVersion, accept);
}
/**
* Delete Restaurant
* Remove a restaurant by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove restaurant record owned by this property identifier
* @param restaurantIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removeRestaurantRequestCreation(String propertyIdentifier, String restaurantIdentifier, 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 removeRestaurant", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'restaurantIdentifier' is set
if (restaurantIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'restaurantIdentifier' when calling removeRestaurant", 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("restaurantIdentifier", restaurantIdentifier);
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/restaurant/{restaurantIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Restaurant
* Remove a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove restaurant record owned by this property identifier
* @param restaurantIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removeRestaurant(String propertyIdentifier, String restaurantIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Restaurant
* Remove a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove restaurant record owned by this property identifier
* @param restaurantIdentifier Remove restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removeRestaurantWithHttpInfo(String propertyIdentifier, String restaurantIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removeRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Restaurant
* Remove a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove restaurant record owned by this property identifier
* @param restaurantIdentifier 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 removeRestaurantWithResponseSpec(String propertyIdentifier, String restaurantIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removeRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, winkVersion, accept);
}
/**
* Show Restaurant
* Retrieve a restaurant by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single restaurant owned by this property identifier
* @param restaurantIdentifier Show restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showRestaurantRequestCreation(String propertyIdentifier, String restaurantIdentifier, 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 showRestaurant", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'restaurantIdentifier' is set
if (restaurantIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'restaurantIdentifier' when calling showRestaurant", 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("restaurantIdentifier", restaurantIdentifier);
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/restaurant/{restaurantIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Restaurant
* Retrieve a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single restaurant owned by this property identifier
* @param restaurantIdentifier Show restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showRestaurant(String propertyIdentifier, String restaurantIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Restaurant
* Retrieve a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single restaurant owned by this property identifier
* @param restaurantIdentifier Show restaurant record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showRestaurantWithHttpInfo(String propertyIdentifier, String restaurantIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Restaurant
* Retrieve a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single restaurant owned by this property identifier
* @param restaurantIdentifier Show 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 showRestaurantWithResponseSpec(String propertyIdentifier, String restaurantIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, winkVersion, accept);
}
/**
* Show Reference Pairs
* Retrieve list of restaurants as key/value pairs (identifier, name)
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurant 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 showRestaurantPairsRequestCreation(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 showRestaurantPairs", 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/restaurant/list/pair", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of restaurants as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurant 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 showRestaurantPairs(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showRestaurantPairsRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of restaurants as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurant 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>> showRestaurantPairsWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showRestaurantPairsRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of restaurants as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurant 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 showRestaurantPairsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showRestaurantPairsRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Show Restaurants
* Retrieve list of restaurants for property.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurants owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showRestaurantsRequestCreation(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 showRestaurants", 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/restaurant/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Restaurants
* Retrieve list of restaurants for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurants owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showRestaurants(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showRestaurantsRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Restaurants
* Retrieve list of restaurants for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurants owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<RestaurantViewSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showRestaurantsWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showRestaurantsRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Restaurants
* Retrieve list of restaurants for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show restaurants 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 showRestaurantsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showRestaurantsRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Update Restaurant
* Update a restaurant by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing restaurant record owned by this property identifier
* @param restaurantIdentifier Update an existing restaurant record identified by this identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateRestaurantRequestCreation(String propertyIdentifier, String restaurantIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertRestaurantRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling updateRestaurant", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'restaurantIdentifier' is set
if (restaurantIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'restaurantIdentifier' when calling updateRestaurant", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertRestaurantRequestSupplier' is set
if (upsertRestaurantRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertRestaurantRequestSupplier' when calling updateRestaurant", 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("restaurantIdentifier", restaurantIdentifier);
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/restaurant/{restaurantIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Restaurant
* Update a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing restaurant record owned by this property identifier
* @param restaurantIdentifier Update an existing restaurant record identified by this identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updateRestaurant(String propertyIdentifier, String restaurantIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, upsertRestaurantRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Restaurant
* Update a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing restaurant record owned by this property identifier
* @param restaurantIdentifier Update an existing restaurant record identified by this identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updateRestaurantWithHttpInfo(String propertyIdentifier, String restaurantIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updateRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, upsertRestaurantRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Restaurant
* Update a restaurant by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing restaurant record owned by this property identifier
* @param restaurantIdentifier Update an existing restaurant record identified by this identifier
* @param upsertRestaurantRequestSupplier The upsertRestaurantRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateRestaurantWithResponseSpec(String propertyIdentifier, String restaurantIdentifier, UpsertRestaurantRequestSupplier upsertRestaurantRequestSupplier, String winkVersion) throws WebClientResponseException {
return updateRestaurantRequestCreation(propertyIdentifier, restaurantIdentifier, upsertRestaurantRequestSupplier, winkVersion);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing restaurant.
*
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 restaurant owned by this property identifier
* @param restaurantIdentifier Upload multipart files and associate them with an existing restaurant with this identifier
* @param files The files parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec uploadRestaurantMediaRequestCreation(String propertyIdentifier, String restaurantIdentifier, 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 uploadRestaurantMedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'restaurantIdentifier' is set
if (restaurantIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'restaurantIdentifier' when calling uploadRestaurantMedia", 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 uploadRestaurantMedia", 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("restaurantIdentifier", restaurantIdentifier);
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/restaurant/{restaurantIdentifier}/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 restaurant.
* 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 restaurant owned by this property identifier
* @param restaurantIdentifier Upload multipart files and associate them with an existing restaurant with this identifier
* @param files The files parameter
* @return RestaurantViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono uploadRestaurantMedia(String propertyIdentifier, String restaurantIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadRestaurantMediaRequestCreation(propertyIdentifier, restaurantIdentifier, files).bodyToMono(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing restaurant.
* 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 restaurant owned by this property identifier
* @param restaurantIdentifier Upload multipart files and associate them with an existing restaurant with this identifier
* @param files The files parameter
* @return ResponseEntity<RestaurantViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> uploadRestaurantMediaWithHttpInfo(String propertyIdentifier, String restaurantIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadRestaurantMediaRequestCreation(propertyIdentifier, restaurantIdentifier, files).toEntity(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing restaurant.
* 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 restaurant owned by this property identifier
* @param restaurantIdentifier Upload multipart files and associate them with an existing restaurant with this identifier
* @param files The files parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec uploadRestaurantMediaWithResponseSpec(String propertyIdentifier, String restaurantIdentifier, List files) throws WebClientResponseException {
return uploadRestaurantMediaRequestCreation(propertyIdentifier, restaurantIdentifier, files);
}
}