enumValues) {
+ this.description = description;
+ this.defaultValue = defaultValue;
+ this.enumValues = enumValues;
+ }
+}
diff --git a/gen/src/main/java/org/openapitools/client/StringUtil.java b/gen/src/main/java/org/openapitools/client/StringUtil.java
new file mode 100644
index 00000000..5f0da337
--- /dev/null
+++ b/gen/src/main/java/org/openapitools/client/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * Swagger MyHome - OpenAPI 3.0
+ * This is a OpenApi specification for MyHome backend service.
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]")
+public class StringUtil {
+ /**
+ * Check if the given array contains the given value (with case-insensitive comparison).
+ *
+ * @param array The array
+ * @param value The value to search
+ * @return true if the array contains the value
+ */
+ public static boolean containsIgnoreCase(String[] array, String value) {
+ for (String str : array) {
+ if (value == null && str == null) {
+ return true;
+ }
+ if (value != null && value.equalsIgnoreCase(str)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Join an array of strings with the given separator.
+ *
+ * Note: This might be replaced by utility method from commons-lang or guava someday
+ * if one of those libraries is added as dependency.
+ *
+ *
+ * @param array The array of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(String[] array, String separator) {
+ int len = array.length;
+ if (len == 0) {
+ return "";
+ }
+
+ StringBuilder out = new StringBuilder();
+ out.append(array[0]);
+ for (int i = 1; i < len; i++) {
+ out.append(separator).append(array[i]);
+ }
+ return out.toString();
+ }
+
+ /**
+ * Join a list of strings with the given separator.
+ *
+ * @param list The list of strings
+ * @param separator The separator
+ * @return the resulting string
+ */
+ public static String join(Collection list, String separator) {
+ Iterator iterator = list.iterator();
+ StringBuilder out = new StringBuilder();
+ if (iterator.hasNext()) {
+ out.append(iterator.next());
+ }
+ while (iterator.hasNext()) {
+ out.append(separator).append(iterator.next());
+ }
+ return out.toString();
+ }
+}
diff --git a/gen/src/main/java/org/openapitools/client/api/AmenitiesApi.java b/gen/src/main/java/org/openapitools/client/api/AmenitiesApi.java
new file mode 100644
index 00000000..74168347
--- /dev/null
+++ b/gen/src/main/java/org/openapitools/client/api/AmenitiesApi.java
@@ -0,0 +1,646 @@
+/*
+ * Swagger MyHome - OpenAPI 3.0
+ * This is a OpenApi specification for MyHome backend service.
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiCallback;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiResponse;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+import org.openapitools.client.ProgressRequestBody;
+import org.openapitools.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import org.openapitools.client.model.AddAmenityRequest;
+import org.openapitools.client.model.AddAmenityResponse;
+import org.openapitools.client.model.GetAmenityDetailsResponse;
+import java.util.Set;
+import org.openapitools.client.model.UpdateAmenityRequest;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AmenitiesApi {
+ private ApiClient localVarApiClient;
+
+ public AmenitiesApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AmenitiesApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ /**
+ * Build call for addAmenityToCommunity
+ * @param communityId (required)
+ * @param addAmenityRequest (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If amenity add successful | - |
+ | 404 | If community not found | - |
+
+ */
+ public okhttp3.Call addAmenityToCommunityCall(String communityId, AddAmenityRequest addAmenityRequest, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = addAmenityRequest;
+
+ // create path and map variables
+ String localVarPath = "/communities/{communityId}/amenities"
+ .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call addAmenityToCommunityValidateBeforeCall(String communityId, AddAmenityRequest addAmenityRequest, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'communityId' is set
+ if (communityId == null) {
+ throw new ApiException("Missing the required parameter 'communityId' when calling addAmenityToCommunity(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = addAmenityToCommunityCall(communityId, addAmenityRequest, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Adds amenity to community
+ * @param communityId (required)
+ * @param addAmenityRequest (optional)
+ * @return AddAmenityResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If amenity add successful | - |
+ | 404 | If community not found | - |
+
+ */
+ public AddAmenityResponse addAmenityToCommunity(String communityId, AddAmenityRequest addAmenityRequest) throws ApiException {
+ ApiResponse localVarResp = addAmenityToCommunityWithHttpInfo(communityId, addAmenityRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Adds amenity to community
+ * @param communityId (required)
+ * @param addAmenityRequest (optional)
+ * @return ApiResponse<AddAmenityResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If amenity add successful | - |
+ | 404 | If community not found | - |
+
+ */
+ public ApiResponse addAmenityToCommunityWithHttpInfo(String communityId, AddAmenityRequest addAmenityRequest) throws ApiException {
+ okhttp3.Call localVarCall = addAmenityToCommunityValidateBeforeCall(communityId, addAmenityRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Adds amenity to community
+ * @param communityId (required)
+ * @param addAmenityRequest (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If amenity add successful | - |
+ | 404 | If community not found | - |
+
+ */
+ public okhttp3.Call addAmenityToCommunityAsync(String communityId, AddAmenityRequest addAmenityRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = addAmenityToCommunityValidateBeforeCall(communityId, addAmenityRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteAmenity
+ * @param amenityId (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If amenity deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call deleteAmenityCall(String amenityId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/amenities/{amenityId}"
+ .replaceAll("\\{" + "amenityId" + "\\}", localVarApiClient.escapeString(amenityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteAmenityValidateBeforeCall(String amenityId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'amenityId' is set
+ if (amenityId == null) {
+ throw new ApiException("Missing the required parameter 'amenityId' when calling deleteAmenity(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteAmenityCall(amenityId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Remove amenity
+ * @param amenityId (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If amenity deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public void deleteAmenity(String amenityId) throws ApiException {
+ deleteAmenityWithHttpInfo(amenityId);
+ }
+
+ /**
+ *
+ * Remove amenity
+ * @param amenityId (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If amenity deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ApiResponse deleteAmenityWithHttpInfo(String amenityId) throws ApiException {
+ okhttp3.Call localVarCall = deleteAmenityValidateBeforeCall(amenityId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * (asynchronously)
+ * Remove amenity
+ * @param amenityId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If amenity deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call deleteAmenityAsync(String amenityId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteAmenityValidateBeforeCall(amenityId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getAmenityDetails
+ * @param amenityId Id of the amenity to get details (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If details found | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call getAmenityDetailsCall(String amenityId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/amenities/{amenityId}"
+ .replaceAll("\\{" + "amenityId" + "\\}", localVarApiClient.escapeString(amenityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getAmenityDetailsValidateBeforeCall(String amenityId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'amenityId' is set
+ if (amenityId == null) {
+ throw new ApiException("Missing the required parameter 'amenityId' when calling getAmenityDetails(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = getAmenityDetailsCall(amenityId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Get details about the amenity
+ * @param amenityId Id of the amenity to get details (required)
+ * @return GetAmenityDetailsResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If details found | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public GetAmenityDetailsResponse getAmenityDetails(String amenityId) throws ApiException {
+ ApiResponse localVarResp = getAmenityDetailsWithHttpInfo(amenityId);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Get details about the amenity
+ * @param amenityId Id of the amenity to get details (required)
+ * @return ApiResponse<GetAmenityDetailsResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If details found | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ApiResponse getAmenityDetailsWithHttpInfo(String amenityId) throws ApiException {
+ okhttp3.Call localVarCall = getAmenityDetailsValidateBeforeCall(amenityId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Get details about the amenity
+ * @param amenityId Id of the amenity to get details (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If details found | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call getAmenityDetailsAsync(String amenityId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getAmenityDetailsValidateBeforeCall(amenityId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listAllAmenities
+ * @param communityId (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of amenities | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call listAllAmenitiesCall(String communityId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/communities/{communityId}/amenities"
+ .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call listAllAmenitiesValidateBeforeCall(String communityId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'communityId' is set
+ if (communityId == null) {
+ throw new ApiException("Missing the required parameter 'communityId' when calling listAllAmenities(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = listAllAmenitiesCall(communityId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Get all amenities of community
+ * @param communityId (required)
+ * @return Set<GetAmenityDetailsResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of amenities | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public Set listAllAmenities(String communityId) throws ApiException {
+ ApiResponse> localVarResp = listAllAmenitiesWithHttpInfo(communityId);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Get all amenities of community
+ * @param communityId (required)
+ * @return ApiResponse<Set<GetAmenityDetailsResponse>>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of amenities | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ApiResponse> listAllAmenitiesWithHttpInfo(String communityId) throws ApiException {
+ okhttp3.Call localVarCall = listAllAmenitiesValidateBeforeCall(communityId, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Get all amenities of community
+ * @param communityId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of amenities | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call listAllAmenitiesAsync(String communityId, final ApiCallback> _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listAllAmenitiesValidateBeforeCall(communityId, _callback);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for updateAmenity
+ * @param amenityId (required)
+ * @param updateAmenityRequest UpdateAmenityRequest update amenity (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If updated successfully | - |
+ | 400 | If amenity is not found | - |
+
+ */
+ public okhttp3.Call updateAmenityCall(String amenityId, UpdateAmenityRequest updateAmenityRequest, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = updateAmenityRequest;
+
+ // create path and map variables
+ String localVarPath = "/amenities/{amenityId}"
+ .replaceAll("\\{" + "amenityId" + "\\}", localVarApiClient.escapeString(amenityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call updateAmenityValidateBeforeCall(String amenityId, UpdateAmenityRequest updateAmenityRequest, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'amenityId' is set
+ if (amenityId == null) {
+ throw new ApiException("Missing the required parameter 'amenityId' when calling updateAmenity(Async)");
+ }
+
+ // verify the required parameter 'updateAmenityRequest' is set
+ if (updateAmenityRequest == null) {
+ throw new ApiException("Missing the required parameter 'updateAmenityRequest' when calling updateAmenity(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = updateAmenityCall(amenityId, updateAmenityRequest, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Update an amenity
+ * @param amenityId (required)
+ * @param updateAmenityRequest UpdateAmenityRequest update amenity (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If updated successfully | - |
+ | 400 | If amenity is not found | - |
+
+ */
+ public void updateAmenity(String amenityId, UpdateAmenityRequest updateAmenityRequest) throws ApiException {
+ updateAmenityWithHttpInfo(amenityId, updateAmenityRequest);
+ }
+
+ /**
+ *
+ * Update an amenity
+ * @param amenityId (required)
+ * @param updateAmenityRequest UpdateAmenityRequest update amenity (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If updated successfully | - |
+ | 400 | If amenity is not found | - |
+
+ */
+ public ApiResponse updateAmenityWithHttpInfo(String amenityId, UpdateAmenityRequest updateAmenityRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateAmenityValidateBeforeCall(amenityId, updateAmenityRequest, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * (asynchronously)
+ * Update an amenity
+ * @param amenityId (required)
+ * @param updateAmenityRequest UpdateAmenityRequest update amenity (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If updated successfully | - |
+ | 400 | If amenity is not found | - |
+
+ */
+ public okhttp3.Call updateAmenityAsync(String amenityId, UpdateAmenityRequest updateAmenityRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = updateAmenityValidateBeforeCall(amenityId, updateAmenityRequest, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+}
diff --git a/gen/src/main/java/org/openapitools/client/api/AuthenticationApi.java b/gen/src/main/java/org/openapitools/client/api/AuthenticationApi.java
new file mode 100644
index 00000000..9e2f9416
--- /dev/null
+++ b/gen/src/main/java/org/openapitools/client/api/AuthenticationApi.java
@@ -0,0 +1,164 @@
+/*
+ * Swagger MyHome - OpenAPI 3.0
+ * This is a OpenApi specification for MyHome backend service.
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiCallback;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiResponse;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+import org.openapitools.client.ProgressRequestBody;
+import org.openapitools.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import org.openapitools.client.model.LoginRequest;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AuthenticationApi {
+ private ApiClient localVarApiClient;
+
+ public AuthenticationApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public AuthenticationApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ /**
+ * Build call for login
+ * @param loginRequest (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Login successful | - |
+
+ */
+ public okhttp3.Call loginCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = loginRequest;
+
+ // create path and map variables
+ String localVarPath = "/auth/login";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call loginValidateBeforeCall(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'loginRequest' is set
+ if (loginRequest == null) {
+ throw new ApiException("Missing the required parameter 'loginRequest' when calling login(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = loginCall(loginRequest, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Login user to system
+ * @param loginRequest (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Login successful | - |
+
+ */
+ public void login(LoginRequest loginRequest) throws ApiException {
+ loginWithHttpInfo(loginRequest);
+ }
+
+ /**
+ *
+ * Login user to system
+ * @param loginRequest (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Login successful | - |
+
+ */
+ public ApiResponse loginWithHttpInfo(LoginRequest loginRequest) throws ApiException {
+ okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * (asynchronously)
+ * Login user to system
+ * @param loginRequest (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Login successful | - |
+
+ */
+ public okhttp3.Call loginAsync(LoginRequest loginRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = loginValidateBeforeCall(loginRequest, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+}
diff --git a/gen/src/main/java/org/openapitools/client/api/BookingsApi.java b/gen/src/main/java/org/openapitools/client/api/BookingsApi.java
new file mode 100644
index 00000000..a29fe2f6
--- /dev/null
+++ b/gen/src/main/java/org/openapitools/client/api/BookingsApi.java
@@ -0,0 +1,178 @@
+/*
+ * Swagger MyHome - OpenAPI 3.0
+ * This is a OpenApi specification for MyHome backend service.
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiCallback;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiResponse;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+import org.openapitools.client.ProgressRequestBody;
+import org.openapitools.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class BookingsApi {
+ private ApiClient localVarApiClient;
+
+ public BookingsApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public BookingsApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ /**
+ * Build call for deleteBooking
+ * @param amenityId (required)
+ * @param bookingId (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If booking deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call deleteBookingCall(String amenityId, String bookingId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/amenities/{amenityId}/bookings/{bookingId}"
+ .replaceAll("\\{" + "amenityId" + "\\}", localVarApiClient.escapeString(amenityId.toString()))
+ .replaceAll("\\{" + "bookingId" + "\\}", localVarApiClient.escapeString(bookingId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteBookingValidateBeforeCall(String amenityId, String bookingId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'amenityId' is set
+ if (amenityId == null) {
+ throw new ApiException("Missing the required parameter 'amenityId' when calling deleteBooking(Async)");
+ }
+
+ // verify the required parameter 'bookingId' is set
+ if (bookingId == null) {
+ throw new ApiException("Missing the required parameter 'bookingId' when calling deleteBooking(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteBookingCall(amenityId, bookingId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Remove booking
+ * @param amenityId (required)
+ * @param bookingId (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If booking deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public void deleteBooking(String amenityId, String bookingId) throws ApiException {
+ deleteBookingWithHttpInfo(amenityId, bookingId);
+ }
+
+ /**
+ *
+ * Remove booking
+ * @param amenityId (required)
+ * @param bookingId (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If booking deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ApiResponse deleteBookingWithHttpInfo(String amenityId, String bookingId) throws ApiException {
+ okhttp3.Call localVarCall = deleteBookingValidateBeforeCall(amenityId, bookingId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * (asynchronously)
+ * Remove booking
+ * @param amenityId (required)
+ * @param bookingId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If booking deleted | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call deleteBookingAsync(String amenityId, String bookingId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteBookingValidateBeforeCall(amenityId, bookingId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+}
diff --git a/gen/src/main/java/org/openapitools/client/api/CommunitiesApi.java b/gen/src/main/java/org/openapitools/client/api/CommunitiesApi.java
new file mode 100644
index 00000000..5b2b6791
--- /dev/null
+++ b/gen/src/main/java/org/openapitools/client/api/CommunitiesApi.java
@@ -0,0 +1,883 @@
+/*
+ * Swagger MyHome - OpenAPI 3.0
+ * This is a OpenApi specification for MyHome backend service.
+ *
+ * The version of the OpenAPI document: 2.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiCallback;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiResponse;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+import org.openapitools.client.ProgressRequestBody;
+import org.openapitools.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import org.openapitools.client.model.AddCommunityAdminRequest;
+import org.openapitools.client.model.AddCommunityAdminResponse;
+import org.openapitools.client.model.CreateCommunityRequest;
+import org.openapitools.client.model.CreateCommunityResponse;
+import org.openapitools.client.model.GetCommunityDetailsResponse;
+import org.openapitools.client.model.ListCommunityAdminsResponse;
+import org.openapitools.client.model.Pageable;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class CommunitiesApi {
+ private ApiClient localVarApiClient;
+
+ public CommunitiesApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public CommunitiesApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ /**
+ * Build call for addCommunityAdmins
+ * @param communityId (required)
+ * @param addCommunityAdminRequest AddCommunityAdminRequest aggregate fields (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If admins were created | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call addCommunityAdminsCall(String communityId, AddCommunityAdminRequest addCommunityAdminRequest, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = addCommunityAdminRequest;
+
+ // create path and map variables
+ String localVarPath = "/communities/{communityId}/admins"
+ .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call addCommunityAdminsValidateBeforeCall(String communityId, AddCommunityAdminRequest addCommunityAdminRequest, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'communityId' is set
+ if (communityId == null) {
+ throw new ApiException("Missing the required parameter 'communityId' when calling addCommunityAdmins(Async)");
+ }
+
+ // verify the required parameter 'addCommunityAdminRequest' is set
+ if (addCommunityAdminRequest == null) {
+ throw new ApiException("Missing the required parameter 'addCommunityAdminRequest' when calling addCommunityAdmins(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = addCommunityAdminsCall(communityId, addCommunityAdminRequest, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Add a new admin to the community given a community id
+ * @param communityId (required)
+ * @param addCommunityAdminRequest AddCommunityAdminRequest aggregate fields (required)
+ * @return AddCommunityAdminResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If admins were created | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public AddCommunityAdminResponse addCommunityAdmins(String communityId, AddCommunityAdminRequest addCommunityAdminRequest) throws ApiException {
+ ApiResponse localVarResp = addCommunityAdminsWithHttpInfo(communityId, addCommunityAdminRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Add a new admin to the community given a community id
+ * @param communityId (required)
+ * @param addCommunityAdminRequest AddCommunityAdminRequest aggregate fields (required)
+ * @return ApiResponse<AddCommunityAdminResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If admins were created | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ApiResponse addCommunityAdminsWithHttpInfo(String communityId, AddCommunityAdminRequest addCommunityAdminRequest) throws ApiException {
+ okhttp3.Call localVarCall = addCommunityAdminsValidateBeforeCall(communityId, addCommunityAdminRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Add a new admin to the community given a community id
+ * @param communityId (required)
+ * @param addCommunityAdminRequest AddCommunityAdminRequest aggregate fields (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If admins were created | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call addCommunityAdminsAsync(String communityId, AddCommunityAdminRequest addCommunityAdminRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = addCommunityAdminsValidateBeforeCall(communityId, addCommunityAdminRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for createCommunity
+ * @param createCommunityRequest CreateCommunityRequest aggregate fields (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 201 | If community was created | - |
+
+ */
+ public okhttp3.Call createCommunityCall(CreateCommunityRequest createCommunityRequest, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = createCommunityRequest;
+
+ // create path and map variables
+ String localVarPath = "/communities";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json", "application/xml"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createCommunityValidateBeforeCall(CreateCommunityRequest createCommunityRequest, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'createCommunityRequest' is set
+ if (createCommunityRequest == null) {
+ throw new ApiException("Missing the required parameter 'createCommunityRequest' when calling createCommunity(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = createCommunityCall(createCommunityRequest, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Create a new community
+ * @param createCommunityRequest CreateCommunityRequest aggregate fields (required)
+ * @return CreateCommunityResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 201 | If community was created | - |
+
+ */
+ public CreateCommunityResponse createCommunity(CreateCommunityRequest createCommunityRequest) throws ApiException {
+ ApiResponse localVarResp = createCommunityWithHttpInfo(createCommunityRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Create a new community
+ * @param createCommunityRequest CreateCommunityRequest aggregate fields (required)
+ * @return ApiResponse<CreateCommunityResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 201 | If community was created | - |
+
+ */
+ public ApiResponse createCommunityWithHttpInfo(CreateCommunityRequest createCommunityRequest) throws ApiException {
+ okhttp3.Call localVarCall = createCommunityValidateBeforeCall(createCommunityRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Create a new community
+ * @param createCommunityRequest CreateCommunityRequest aggregate fields (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 201 | If community was created | - |
+
+ */
+ public okhttp3.Call createCommunityAsync(CreateCommunityRequest createCommunityRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createCommunityValidateBeforeCall(createCommunityRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteCommunity
+ * @param communityId (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If community was removed | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call deleteCommunityCall(String communityId, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/communities/{communityId}"
+ .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteCommunityValidateBeforeCall(String communityId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'communityId' is set
+ if (communityId == null) {
+ throw new ApiException("Missing the required parameter 'communityId' when calling deleteCommunity(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteCommunityCall(communityId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Deletion community with given community id
+ * @param communityId (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If community was removed | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public void deleteCommunity(String communityId) throws ApiException {
+ deleteCommunityWithHttpInfo(communityId);
+ }
+
+ /**
+ *
+ * Deletion community with given community id
+ * @param communityId (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If community was removed | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ApiResponse deleteCommunityWithHttpInfo(String communityId) throws ApiException {
+ okhttp3.Call localVarCall = deleteCommunityValidateBeforeCall(communityId, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * (asynchronously)
+ * Deletion community with given community id
+ * @param communityId (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 204 | If community was removed | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call deleteCommunityAsync(String communityId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteCommunityValidateBeforeCall(communityId, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listAllCommunity
+ * @param pageable (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of communities | - |
+
+ */
+ public okhttp3.Call listAllCommunityCall(Pageable pageable, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/communities";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (pageable != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageable", pageable));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call listAllCommunityValidateBeforeCall(Pageable pageable, final ApiCallback _callback) throws ApiException {
+
+
+ okhttp3.Call localVarCall = listAllCommunityCall(pageable, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * List all communities which are registered
+ * @param pageable (optional)
+ * @return GetCommunityDetailsResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of communities | - |
+
+ */
+ public GetCommunityDetailsResponse listAllCommunity(Pageable pageable) throws ApiException {
+ ApiResponse localVarResp = listAllCommunityWithHttpInfo(pageable);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * List all communities which are registered
+ * @param pageable (optional)
+ * @return ApiResponse<GetCommunityDetailsResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of communities | - |
+
+ */
+ public ApiResponse listAllCommunityWithHttpInfo(Pageable pageable) throws ApiException {
+ okhttp3.Call localVarCall = listAllCommunityValidateBeforeCall(pageable, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * List all communities which are registered
+ * @param pageable (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | Returns list of communities | - |
+
+ */
+ public okhttp3.Call listAllCommunityAsync(Pageable pageable, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = listAllCommunityValidateBeforeCall(pageable, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for listCommunityAdmins
+ * @param communityId (required)
+ * @param pageable (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If community exists | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public okhttp3.Call listCommunityAdminsCall(String communityId, Pageable pageable, final ApiCallback _callback) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/communities/{communityId}/admins"
+ .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (pageable != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("pageable", pageable));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json", "application/xml"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ String[] localVarAuthNames = new String[] { "bearerAuth" };
+ return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call listCommunityAdminsValidateBeforeCall(String communityId, Pageable pageable, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'communityId' is set
+ if (communityId == null) {
+ throw new ApiException("Missing the required parameter 'communityId' when calling listCommunityAdmins(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = listCommunityAdminsCall(communityId, pageable, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * List all admins of the community given a community id
+ * @param communityId (required)
+ * @param pageable (optional)
+ * @return ListCommunityAdminsResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ | Status Code | Description | Response Headers |
+ | 200 | If community exists | - |
+ | 404 | If params are invalid | - |
+
+ */
+ public ListCommunityAdminsResponse listCommunityAdmins(String communityId, Pageable pageable) throws ApiException {
+ ApiResponse localVarResp = listCommunityAdminsWithHttpInfo(communityId, pageable);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * List all admins of the community given a community id
+ * @param communityId (required)
+ * @param pageable (optional)
+ * @return ApiResponse<ListCommunityAdminsResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+