travel.wink.sdk.extranet.booking.api.CalendarSyncApi Maven / Gradle / Ivy
package travel.wink.sdk.extranet.booking.api;
import travel.wink.sdk.extranet.booking.invoker.ApiClient;
import travel.wink.sdk.extranet.booking.model.CalDavResponseSupplier;
import travel.wink.sdk.extranet.booking.model.GenericErrorMessage;
import travel.wink.sdk.extranet.booking.model.ShowReview400Response;
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:57:35.099051089+07:00[Asia/Bangkok]")
public class CalendarSyncApi {
private ApiClient apiClient;
public CalendarSyncApi() {
this(new ApiClient());
}
@Autowired
public CalendarSyncApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* CalDAV calendar
* This is the CalDAV URL you can add to your calendar program.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param propertyIdentifier Retrieve booking list in CalDAV for this specified property
* @param winkVersion The winkVersion parameter
* @return String
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec caldavRequestCreation(String propertyIdentifier, String winkVersion) 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 caldav", 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 = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/cal/property/{propertyIdentifier}/booking/list", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* CalDAV calendar
* This is the CalDAV URL you can add to your calendar program.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param propertyIdentifier Retrieve booking list in CalDAV for this specified property
* @param winkVersion The winkVersion parameter
* @return String
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono caldav(String propertyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return caldavRequestCreation(propertyIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* CalDAV calendar
* This is the CalDAV URL you can add to your calendar program.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param propertyIdentifier Retrieve booking list in CalDAV for this specified property
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<String>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> caldavWithHttpInfo(String propertyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return caldavRequestCreation(propertyIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* CalDAV calendar
* This is the CalDAV URL you can add to your calendar program.
* 503 - Service Unavailable
*
400 - Bad Request
*
405 - Method Not Allowed
*
415 - Unsupported Media Type
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
200 - OK
* @param propertyIdentifier Retrieve booking list in CalDAV for this specified property
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec caldavWithResponseSpec(String propertyIdentifier, String winkVersion) throws WebClientResponseException {
return caldavRequestCreation(propertyIdentifier, winkVersion);
}
/**
* Create CalDAV connection
* Generates new CalDav passkey the property can use to authenticate the CalDAV url.
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Regenrate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @return CalDavResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec generateCalDavAuthRequestCreation(String propertyIdentifier, String winkVersion) 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 generateCalDavAuth", 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 = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "oauth2ClientCredentials" };
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return apiClient.invokeAPI("/api/property/{propertyIdentifier}/caldav/auth/regen", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create CalDAV connection
* Generates new CalDav passkey the property can use to authenticate the CalDAV url.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Regenrate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @return CalDavResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono generateCalDavAuth(String propertyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return generateCalDavAuthRequestCreation(propertyIdentifier, winkVersion).bodyToMono(localVarReturnType);
}
/**
* Create CalDAV connection
* Generates new CalDav passkey the property can use to authenticate the CalDAV url.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Regenrate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @return ResponseEntity<CalDavResponseSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> generateCalDavAuthWithHttpInfo(String propertyIdentifier, String winkVersion) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return generateCalDavAuthRequestCreation(propertyIdentifier, winkVersion).toEntity(localVarReturnType);
}
/**
* Create CalDAV connection
* Generates new CalDav passkey the property can use to authenticate the CalDAV url.
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Regenrate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @return ResponseSpec
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec generateCalDavAuthWithResponseSpec(String propertyIdentifier, String winkVersion) throws WebClientResponseException {
return generateCalDavAuthRequestCreation(propertyIdentifier, winkVersion);
}
/**
* Show CalDAV Connection
* Retrieve the CalDAV connection for your property
*
500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Generate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return CalDavResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec retrieveCalDavAuthRequestCreation(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 retrieveCalDavAuth", 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}/caldav/auth", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Show CalDAV Connection
* Retrieve the CalDAV connection for your property
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Generate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return CalDavResponseSupplier
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono retrieveCalDavAuth(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return retrieveCalDavAuthRequestCreation(propertyIdentifier, winkVersion, accept).bodyToMono(localVarReturnType);
}
/**
* Show CalDAV Connection
* Retrieve the CalDAV connection for your property
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Generate CalDAV auth for this specified property
* @param winkVersion The winkVersion parameter
* @param accept The accept parameter
* @return ResponseEntity<CalDavResponseSupplier>
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public Mono> retrieveCalDavAuthWithHttpInfo(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
return retrieveCalDavAuthRequestCreation(propertyIdentifier, winkVersion, accept).toEntity(localVarReturnType);
}
/**
* Show CalDAV Connection
* Retrieve the CalDAV connection for your property
* 500 - Internal Server Error
*
403 - Forbidden
*
401 - Unauthorized
*
400 - Bad Request
*
200 - OK
* @param propertyIdentifier Generate CalDAV auth for this specified property
* @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 retrieveCalDavAuthWithResponseSpec(String propertyIdentifier, String winkVersion, String accept) throws WebClientResponseException {
return retrieveCalDavAuthRequestCreation(propertyIdentifier, winkVersion, accept);
}
}