travel.wink.sdk.extranet.experiences.api.PlaceApi Maven / Gradle / Ivy
Show all versions of extranet-experiences-sdk-java Show documentation
package travel.wink.sdk.extranet.experiences.api;
import travel.wink.sdk.extranet.experiences.invoker.ApiClient;
import java.io.File;
import travel.wink.sdk.extranet.experiences.model.GenericErrorMessage;
import travel.wink.sdk.extranet.experiences.model.KeyValuePairSupplier;
import travel.wink.sdk.extranet.experiences.model.RefPointViewSupplier;
import travel.wink.sdk.extranet.experiences.model.RemoveEntryResponseSupplier;
import travel.wink.sdk.extranet.experiences.model.ShowPlace400Response;
import travel.wink.sdk.extranet.experiences.model.UpsertPlaceRequestSupplier;
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-09-15T11:58:25.818180251+07:00[Asia/Bangkok]")
public class PlaceApi {
private ApiClient apiClient;
public PlaceApi() {
this(new ApiClient());
}
@Autowired
public PlaceApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Place
* Create a new place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new place record owned by this property identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createPlaceRequestCreation(String propertyIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertPlaceRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling createPlace", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertPlaceRequestSupplier' is set
if (upsertPlaceRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertPlaceRequestSupplier' when calling createPlace", 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}/experience/place", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create Place
* Create a new place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new place record owned by this property identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono createPlace(String propertyIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createPlaceRequestCreation(propertyIdentifier, upsertPlaceRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create Place
* Create a new place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new place record owned by this property identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<RefPointViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> createPlaceWithHttpInfo(String propertyIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return createPlaceRequestCreation(propertyIdentifier, upsertPlaceRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Create Place
* Create a new place.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
201 - Created
* @param propertyIdentifier Create a new place record owned by this property identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createPlaceWithResponseSpec(String propertyIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
return createPlaceRequestCreation(propertyIdentifier, upsertPlaceRequestSupplier, winkVersion);
}
/**
* Delete Place
* Delete a place by its identifier.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove place record owned by this property identifier
* @param placeIdentifier Remove place record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec removePlaceRequestCreation(String propertyIdentifier, String placeIdentifier, 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 removePlace", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'placeIdentifier' is set
if (placeIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'placeIdentifier' when calling removePlace", 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("placeIdentifier", placeIdentifier);
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}/experience/place/{placeIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Place
* Delete a place by its identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove place record owned by this property identifier
* @param placeIdentifier Remove place record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RemoveEntryResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono removePlace(String propertyIdentifier, String placeIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removePlaceRequestCreation(propertyIdentifier, placeIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Delete Place
* Delete a place by its identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove place record owned by this property identifier
* @param placeIdentifier Remove place record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RemoveEntryResponseSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> removePlaceWithHttpInfo(String propertyIdentifier, String placeIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return removePlaceRequestCreation(propertyIdentifier, placeIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Delete Place
* Delete a place by its identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Remove place record owned by this property identifier
* @param placeIdentifier Remove place 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 removePlaceWithResponseSpec(String propertyIdentifier, String placeIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return removePlaceRequestCreation(propertyIdentifier, placeIdentifier, winkVersion, accept);
}
/**
* Show Place
* Retrieve a place by its identifier.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single place owned by this property identifier
* @param placeIdentifier Show place record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showPlaceRequestCreation(String propertyIdentifier, String placeIdentifier, 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 showPlace", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'placeIdentifier' is set
if (placeIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'placeIdentifier' when calling showPlace", 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("placeIdentifier", placeIdentifier);
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}/experience/place/{placeIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Place
* Retrieve a place by its identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single place owned by this property identifier
* @param placeIdentifier Show place record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono showPlace(String propertyIdentifier, String placeIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showPlaceRequestCreation(propertyIdentifier, placeIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show Place
* Retrieve a place by its identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single place owned by this property identifier
* @param placeIdentifier Show place record identified by this identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<RefPointViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> showPlaceWithHttpInfo(String propertyIdentifier, String placeIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showPlaceRequestCreation(propertyIdentifier, placeIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show Place
* Retrieve a place by its identifier.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show single place owned by this property identifier
* @param placeIdentifier Show place 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 showPlaceWithResponseSpec(String propertyIdentifier, String placeIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showPlaceRequestCreation(propertyIdentifier, placeIdentifier, winkVersion, accept);
}
/**
* Show Reference Pairs
* Retrieve list of places as key/value pairs (identifier, name)
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show place 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 showPlacePairsRequestCreation(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 showPlacePairs", 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}/experience/place/list/pair", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of places as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show place 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 showPlacePairs(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showPlacePairsRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of places as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show place 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>> showPlacePairsWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showPlacePairsRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Reference Pairs
* Retrieve list of places as key/value pairs (identifier, name)
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show place 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 showPlacePairsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showPlacePairsRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Show Places
* Retrieve list of places for property.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show places owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<RefPointViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec showPlacesRequestCreation(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 showPlaces", 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}/experience/place/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show Places
* Retrieve list of places for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show places owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return List<RefPointViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Flux showPlaces(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showPlacesRequestCreation(propertyIdentifier, winkVersion, accept).bodyToFlux(localVarReturnType);
}
/**
* Show Places
* Retrieve list of places for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show places owned by this property identifier
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<List<RefPointViewSupplier>>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono>> showPlacesWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return showPlacesRequestCreation(propertyIdentifier, winkVersion, accept).toEntityList(localVarReturnType);
}
/**
* Show Places
* Retrieve list of places for property.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Show places 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 showPlacesWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return showPlacesRequestCreation(propertyIdentifier, winkVersion, accept);
}
/**
* Update Place
* Update a place by its identifier
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing place record owned by this property identifier
* @param placeIdentifier Update an existing place record identified by this identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updatePlaceRequestCreation(String propertyIdentifier, String placeIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
Object postBody = upsertPlaceRequestSupplier;
// verify the required parameter 'propertyIdentifier' is set
if (propertyIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling updatePlace", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'placeIdentifier' is set
if (placeIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'placeIdentifier' when calling updatePlace", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'upsertPlaceRequestSupplier' is set
if (upsertPlaceRequestSupplier == null) {
throw new WebClientResponseException("Missing the required parameter 'upsertPlaceRequestSupplier' when calling updatePlace", 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("placeIdentifier", placeIdentifier);
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}/experience/place/{placeIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update Place
* Update a place by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing place record owned by this property identifier
* @param placeIdentifier Update an existing place record identified by this identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono updatePlace(String propertyIdentifier, String placeIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updatePlaceRequestCreation(propertyIdentifier, placeIdentifier, upsertPlaceRequestSupplier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Update Place
* Update a place by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing place record owned by this property identifier
* @param placeIdentifier Update an existing place record identified by this identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<RefPointViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> updatePlaceWithHttpInfo(String propertyIdentifier, String placeIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return updatePlaceRequestCreation(propertyIdentifier, placeIdentifier, upsertPlaceRequestSupplier, winkVersion).toEntity(localVarReturnType);
}
/**
* Update Place
* Update a place by its identifier
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Update an existing place record owned by this property identifier
* @param placeIdentifier Update an existing place record identified by this identifier
* @param upsertPlaceRequestSupplier The upsertPlaceRequestSupplier parameter
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updatePlaceWithResponseSpec(String propertyIdentifier, String placeIdentifier, UpsertPlaceRequestSupplier upsertPlaceRequestSupplier, String winkVersion) throws WebClientResponseException {
return updatePlaceRequestCreation(propertyIdentifier, placeIdentifier, upsertPlaceRequestSupplier, winkVersion);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing place.
*
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 place owned by this property identifier
* @param placeIdentifier Upload multipart files and associate them with an existing place with this identifier
* @param files The files parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec uploadPlaceMediaRequestCreation(String propertyIdentifier, String placeIdentifier, 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 uploadPlaceMedia", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'placeIdentifier' is set
if (placeIdentifier == null) {
throw new WebClientResponseException("Missing the required parameter 'placeIdentifier' when calling uploadPlaceMedia", 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 uploadPlaceMedia", 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("placeIdentifier", placeIdentifier);
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}/experience/place/{placeIdentifier}/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 place.
* 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 place owned by this property identifier
* @param placeIdentifier Upload multipart files and associate them with an existing place with this identifier
* @param files The files parameter
* @return RefPointViewSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono uploadPlaceMedia(String propertyIdentifier, String placeIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadPlaceMediaRequestCreation(propertyIdentifier, placeIdentifier, files).bodyToMono(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing place.
* 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 place owned by this property identifier
* @param placeIdentifier Upload multipart files and associate them with an existing place with this identifier
* @param files The files parameter
* @return ResponseEntity<RefPointViewSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> uploadPlaceMediaWithHttpInfo(String propertyIdentifier, String placeIdentifier, List files) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return uploadPlaceMediaRequestCreation(propertyIdentifier, placeIdentifier, files).toEntity(localVarReturnType);
}
/**
* Upload Binary Multimedia
* Upload a list of binary / multipart videos and/or images to an existing place.
* 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 place owned by this property identifier
* @param placeIdentifier Upload multipart files and associate them with an existing place with this identifier
* @param files The files parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec uploadPlaceMediaWithResponseSpec(String propertyIdentifier, String placeIdentifier, List files) throws WebClientResponseException {
return uploadPlaceMediaRequestCreation(propertyIdentifier, placeIdentifier, files);
}
}