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

travel.wink.sdk.extranet.experiences.api.AttractionApi Maven / Gradle / Ivy

There is a newer version: 30.5.15
Show newest version
package travel.wink.sdk.extranet.experiences.api;

import travel.wink.sdk.extranet.experiences.invoker.ApiClient;

import travel.wink.sdk.extranet.experiences.model.AttractionView;
import java.io.File;
import travel.wink.sdk.extranet.experiences.model.GenericErrorMessage;
import travel.wink.sdk.extranet.experiences.model.KeyValuePair;
import travel.wink.sdk.extranet.experiences.model.RemoveEntryResponse;
import travel.wink.sdk.extranet.experiences.model.ShowPlace400Response;
import travel.wink.sdk.extranet.experiences.model.UpsertAttractionRequest;

import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.web.reactive.function.client.WebClient.ResponseSpec;
import org.springframework.web.reactive.function.client.WebClientResponseException;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import reactor.core.publisher.Mono;
import reactor.core.publisher.Flux;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-09-15T11:58:25.818180251+07:00[Asia/Bangkok]")
public class AttractionApi {
    private ApiClient apiClient;

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

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

    public ApiClient getApiClient() {
        return apiClient;
    }

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

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param propertyIdentifier Persist attraction owned by this property identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono createAttraction(String propertyIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return createAttractionRequestCreation(propertyIdentifier, upsertAttractionRequest, winkVersion).bodyToMono(localVarReturnType); } /** * Create Attraction * Create a new attraction *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

201 - Created * @param propertyIdentifier Persist attraction owned by this property identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec createAttractionWithResponseSpec(String propertyIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { return createAttractionRequestCreation(propertyIdentifier, upsertAttractionRequest, winkVersion); } /** * Delete attraction * Delete an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Delete attraction owned by this property identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec removeAttractionRequestCreation(String propertyIdentifier, String attractionIdentifier, 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 removeAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling removeAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("propertyIdentifier", propertyIdentifier); pathParams.put("attractionIdentifier", attractionIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); 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/attraction/{attractionIdentifier}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Delete attraction * Delete an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Delete attraction owned by this property identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return RemoveEntryResponse * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono removeAttraction(String propertyIdentifier, String attractionIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeAttractionRequestCreation(propertyIdentifier, attractionIdentifier, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Delete attraction * Delete an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Delete attraction owned by this property identifier * @param attractionIdentifier Delete attraction identified by this identifier * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<RemoveEntryResponse> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> removeAttractionWithHttpInfo(String propertyIdentifier, String attractionIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return removeAttractionRequestCreation(propertyIdentifier, attractionIdentifier, winkVersion, accept).toEntity(localVarReturnType); } /** * Delete attraction * Delete an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Delete attraction owned by this property identifier * @param attractionIdentifier Delete attraction 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 removeAttractionWithResponseSpec(String propertyIdentifier, String attractionIdentifier, String winkVersion, String accept) throws WebClientResponseException { return removeAttractionRequestCreation(propertyIdentifier, attractionIdentifier, winkVersion, accept); } /** * Show Attraction * Retrieve an attraction by identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Show attraction owned by this property identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec showAttractionRequestCreation(String propertyIdentifier, String attractionIdentifier, 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 showAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling showAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("propertyIdentifier", propertyIdentifier); pathParams.put("attractionIdentifier", attractionIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); 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/attraction/{attractionIdentifier}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Show Attraction * Retrieve an attraction by identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Show attraction owned by this property identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono showAttraction(String propertyIdentifier, String attractionIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionRequestCreation(propertyIdentifier, attractionIdentifier, winkVersion, accept).bodyToMono(localVarReturnType); } /** * Show Attraction * Retrieve an attraction by identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Show attraction owned by this property identifier * @param attractionIdentifier Show attraction for identifier * @param winkVersion The winkVersion parameter * @param accept The accept parameter * @return ResponseEntity<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> showAttractionWithHttpInfo(String propertyIdentifier, String attractionIdentifier, String winkVersion, String accept) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return showAttractionRequestCreation(propertyIdentifier, attractionIdentifier, winkVersion, accept).toEntity(localVarReturnType); } /** * Show Attraction * Retrieve an attraction by identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Show attraction owned by this property identifier * @param attractionIdentifier Show attraction for 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 showAttractionWithResponseSpec(String propertyIdentifier, String attractionIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showAttractionRequestCreation(propertyIdentifier, attractionIdentifier, winkVersion, accept); } /** * Show Attractions as Pairs * Retrieve list of key value pairs (identifier, name) *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Show attraction key/value pairs associated with 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 showAttractionPairsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showAttractionPairsRequestCreation(propertyIdentifier, winkVersion, accept); } /** * Show Attractions * Retrieve list of attractions *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Show attractions associated with 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 showAttractionsWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException { return showAttractionsRequestCreation(propertyIdentifier, winkVersion, accept); } /** * Update Attraction * Update an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Update existing attraction record owned by this property identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ private ResponseSpec updateAttractionRequestCreation(String propertyIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { Object postBody = upsertAttractionRequest; // verify the required parameter 'propertyIdentifier' is set if (propertyIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'propertyIdentifier' when calling updateAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'attractionIdentifier' is set if (attractionIdentifier == null) { throw new WebClientResponseException("Missing the required parameter 'attractionIdentifier' when calling updateAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // verify the required parameter 'upsertAttractionRequest' is set if (upsertAttractionRequest == null) { throw new WebClientResponseException("Missing the required parameter 'upsertAttractionRequest' when calling updateAttraction", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null); } // create path and map variables final Map pathParams = new HashMap(); pathParams.put("propertyIdentifier", propertyIdentifier); pathParams.put("attractionIdentifier", attractionIdentifier); final MultiValueMap queryParams = new LinkedMultiValueMap(); final HttpHeaders headerParams = new HttpHeaders(); final MultiValueMap cookieParams = new LinkedMultiValueMap(); final MultiValueMap formParams = new LinkedMultiValueMap(); if (winkVersion != null) headerParams.add("Wink-Version", apiClient.parameterToString(winkVersion)); final String[] localVarAccepts = { "application/json", "application/xml", "text/xml", "text/plain", "*/*" }; final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" }; ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/api/property/{propertyIdentifier}/experience/attraction/{attractionIdentifier}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Update Attraction * Update an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Update existing attraction record owned by this property identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return AttractionView * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono updateAttraction(String propertyIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateAttractionRequestCreation(propertyIdentifier, attractionIdentifier, upsertAttractionRequest, winkVersion).bodyToMono(localVarReturnType); } /** * Update Attraction * Update an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Update existing attraction record owned by this property identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseEntity<AttractionView> * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public Mono> updateAttractionWithHttpInfo(String propertyIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {}; return updateAttractionRequestCreation(propertyIdentifier, attractionIdentifier, upsertAttractionRequest, winkVersion).toEntity(localVarReturnType); } /** * Update Attraction * Update an attraction by its identifier *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

200 - OK * @param propertyIdentifier Update existing attraction record owned by this property identifier * @param attractionIdentifier Update attraction record with this identifier * @param upsertAttractionRequest The upsertAttractionRequest parameter * @param winkVersion The winkVersion parameter * @return ResponseSpec * @throws WebClientResponseException if an error occurs while attempting to invoke the API */ public ResponseSpec updateAttractionWithResponseSpec(String propertyIdentifier, String attractionIdentifier, UpsertAttractionRequest upsertAttractionRequest, String winkVersion) throws WebClientResponseException { return updateAttractionRequestCreation(propertyIdentifier, attractionIdentifier, upsertAttractionRequest, winkVersion); } /** * Upload Binary Multimedia * Upload binary videos and/or images to an attraction identified by its identifier. Valid file types: .gif, .jpg, .jpeg, .png, .bmp, .tif, .tiff, .avi, .mpeg, .mov, .mp4, .mkv. *

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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

500 - Internal Server Error *

403 - Forbidden *

401 - Unauthorized *

400 - Bad Request *

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





© 2015 - 2024 Weber Informatics LLC | Privacy Policy