diff --git a/gen/.gitignore b/gen/.gitignore new file mode 100644 index 00000000..a530464a --- /dev/null +++ b/gen/.gitignore @@ -0,0 +1,21 @@ +*.class + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.ear + +# exclude jar for gradle wrapper +!gradle/wrapper/*.jar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# build files +**/target +target +.gradle +build diff --git a/gen/.openapi-generator-ignore b/gen/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/gen/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/gen/.openapi-generator/FILES b/gen/.openapi-generator/FILES new file mode 100644 index 00000000..376cd7f1 --- /dev/null +++ b/gen/.openapi-generator/FILES @@ -0,0 +1,168 @@ +.gitignore +.openapi-generator-ignore +.travis.yml +README.md +api/openapi.yaml +build.gradle +build.sbt +docs/AddAmenityRequest.md +docs/AddAmenityResponse.md +docs/AddCommunityAdminRequest.md +docs/AddCommunityAdminResponse.md +docs/AddCommunityHouseRequest.md +docs/AddCommunityHouseResponse.md +docs/AddHouseMemberRequest.md +docs/AddHouseMemberResponse.md +docs/AdminPayment.md +docs/AmenitiesApi.md +docs/AmenityDto.md +docs/AuthenticationApi.md +docs/BookingsApi.md +docs/CommunitiesApi.md +docs/CommunityHouseName.md +docs/CreateCommunityRequest.md +docs/CreateCommunityResponse.md +docs/CreateUserRequest.md +docs/CreateUserResponse.md +docs/DocumentsApi.md +docs/ForgotPasswordRequest.md +docs/GetAmenityDetailsResponse.md +docs/GetCommunityDetailsResponse.md +docs/GetCommunityDetailsResponseCommunity.md +docs/GetHouseDetailsResponse.md +docs/GetHouseDetailsResponseCommunityHouse.md +docs/GetUserDetailsResponse.md +docs/GetUserDetailsResponseUser.md +docs/HouseMember.md +docs/HouseMemberDto.md +docs/HousesApi.md +docs/ListAdminPaymentsResponse.md +docs/ListCommunityAdminsResponse.md +docs/ListCommunityAdminsResponseCommunityAdmin.md +docs/ListHouseMembersResponse.md +docs/ListMemberPaymentsResponse.md +docs/LoginRequest.md +docs/MemberPayment.md +docs/PageInfo.md +docs/Pageable.md +docs/PaymentsApi.md +docs/SchedulePaymentRequest.md +docs/SchedulePaymentResponse.md +docs/UpdateAmenityRequest.md +docs/UsersApi.md +git_push.sh +gradle.properties +gradle/wrapper/gradle-wrapper.jar +gradle/wrapper/gradle-wrapper.properties +gradlew +gradlew.bat +pom.xml +settings.gradle +src/main/AndroidManifest.xml +src/main/java/org/openapitools/client/ApiCallback.java +src/main/java/org/openapitools/client/ApiClient.java +src/main/java/org/openapitools/client/ApiException.java +src/main/java/org/openapitools/client/ApiResponse.java +src/main/java/org/openapitools/client/Configuration.java +src/main/java/org/openapitools/client/GzipRequestInterceptor.java +src/main/java/org/openapitools/client/JSON.java +src/main/java/org/openapitools/client/Pair.java +src/main/java/org/openapitools/client/ProgressRequestBody.java +src/main/java/org/openapitools/client/ProgressResponseBody.java +src/main/java/org/openapitools/client/ServerConfiguration.java +src/main/java/org/openapitools/client/ServerVariable.java +src/main/java/org/openapitools/client/StringUtil.java +src/main/java/org/openapitools/client/api/AmenitiesApi.java +src/main/java/org/openapitools/client/api/AuthenticationApi.java +src/main/java/org/openapitools/client/api/BookingsApi.java +src/main/java/org/openapitools/client/api/CommunitiesApi.java +src/main/java/org/openapitools/client/api/DocumentsApi.java +src/main/java/org/openapitools/client/api/HousesApi.java +src/main/java/org/openapitools/client/api/PaymentsApi.java +src/main/java/org/openapitools/client/api/UsersApi.java +src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +src/main/java/org/openapitools/client/auth/Authentication.java +src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +src/main/java/org/openapitools/client/model/AddAmenityRequest.java +src/main/java/org/openapitools/client/model/AddAmenityResponse.java +src/main/java/org/openapitools/client/model/AddCommunityAdminRequest.java +src/main/java/org/openapitools/client/model/AddCommunityAdminResponse.java +src/main/java/org/openapitools/client/model/AddCommunityHouseRequest.java +src/main/java/org/openapitools/client/model/AddCommunityHouseResponse.java +src/main/java/org/openapitools/client/model/AddHouseMemberRequest.java +src/main/java/org/openapitools/client/model/AddHouseMemberResponse.java +src/main/java/org/openapitools/client/model/AdminPayment.java +src/main/java/org/openapitools/client/model/AmenityDto.java +src/main/java/org/openapitools/client/model/CommunityHouseName.java +src/main/java/org/openapitools/client/model/CreateCommunityRequest.java +src/main/java/org/openapitools/client/model/CreateCommunityResponse.java +src/main/java/org/openapitools/client/model/CreateUserRequest.java +src/main/java/org/openapitools/client/model/CreateUserResponse.java +src/main/java/org/openapitools/client/model/ForgotPasswordRequest.java +src/main/java/org/openapitools/client/model/GetAmenityDetailsResponse.java +src/main/java/org/openapitools/client/model/GetCommunityDetailsResponse.java +src/main/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunity.java +src/main/java/org/openapitools/client/model/GetHouseDetailsResponse.java +src/main/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouse.java +src/main/java/org/openapitools/client/model/GetUserDetailsResponse.java +src/main/java/org/openapitools/client/model/GetUserDetailsResponseUser.java +src/main/java/org/openapitools/client/model/HouseMember.java +src/main/java/org/openapitools/client/model/HouseMemberDto.java +src/main/java/org/openapitools/client/model/ListAdminPaymentsResponse.java +src/main/java/org/openapitools/client/model/ListCommunityAdminsResponse.java +src/main/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdmin.java +src/main/java/org/openapitools/client/model/ListHouseMembersResponse.java +src/main/java/org/openapitools/client/model/ListMemberPaymentsResponse.java +src/main/java/org/openapitools/client/model/LoginRequest.java +src/main/java/org/openapitools/client/model/MemberPayment.java +src/main/java/org/openapitools/client/model/PageInfo.java +src/main/java/org/openapitools/client/model/Pageable.java +src/main/java/org/openapitools/client/model/SchedulePaymentRequest.java +src/main/java/org/openapitools/client/model/SchedulePaymentResponse.java +src/main/java/org/openapitools/client/model/UpdateAmenityRequest.java +src/test/java/org/openapitools/client/api/AmenitiesApiTest.java +src/test/java/org/openapitools/client/api/AuthenticationApiTest.java +src/test/java/org/openapitools/client/api/BookingsApiTest.java +src/test/java/org/openapitools/client/api/CommunitiesApiTest.java +src/test/java/org/openapitools/client/api/DocumentsApiTest.java +src/test/java/org/openapitools/client/api/HousesApiTest.java +src/test/java/org/openapitools/client/api/PaymentsApiTest.java +src/test/java/org/openapitools/client/api/UsersApiTest.java +src/test/java/org/openapitools/client/model/AddAmenityRequestTest.java +src/test/java/org/openapitools/client/model/AddAmenityResponseTest.java +src/test/java/org/openapitools/client/model/AddCommunityAdminRequestTest.java +src/test/java/org/openapitools/client/model/AddCommunityAdminResponseTest.java +src/test/java/org/openapitools/client/model/AddCommunityHouseRequestTest.java +src/test/java/org/openapitools/client/model/AddCommunityHouseResponseTest.java +src/test/java/org/openapitools/client/model/AddHouseMemberRequestTest.java +src/test/java/org/openapitools/client/model/AddHouseMemberResponseTest.java +src/test/java/org/openapitools/client/model/AdminPaymentTest.java +src/test/java/org/openapitools/client/model/AmenityDtoTest.java +src/test/java/org/openapitools/client/model/CommunityHouseNameTest.java +src/test/java/org/openapitools/client/model/CreateCommunityRequestTest.java +src/test/java/org/openapitools/client/model/CreateCommunityResponseTest.java +src/test/java/org/openapitools/client/model/CreateUserRequestTest.java +src/test/java/org/openapitools/client/model/CreateUserResponseTest.java +src/test/java/org/openapitools/client/model/ForgotPasswordRequestTest.java +src/test/java/org/openapitools/client/model/GetAmenityDetailsResponseTest.java +src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunityTest.java +src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseTest.java +src/test/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouseTest.java +src/test/java/org/openapitools/client/model/GetHouseDetailsResponseTest.java +src/test/java/org/openapitools/client/model/GetUserDetailsResponseTest.java +src/test/java/org/openapitools/client/model/GetUserDetailsResponseUserTest.java +src/test/java/org/openapitools/client/model/HouseMemberDtoTest.java +src/test/java/org/openapitools/client/model/HouseMemberTest.java +src/test/java/org/openapitools/client/model/ListAdminPaymentsResponseTest.java +src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdminTest.java +src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseTest.java +src/test/java/org/openapitools/client/model/ListHouseMembersResponseTest.java +src/test/java/org/openapitools/client/model/ListMemberPaymentsResponseTest.java +src/test/java/org/openapitools/client/model/LoginRequestTest.java +src/test/java/org/openapitools/client/model/MemberPaymentTest.java +src/test/java/org/openapitools/client/model/PageInfoTest.java +src/test/java/org/openapitools/client/model/PageableTest.java +src/test/java/org/openapitools/client/model/SchedulePaymentRequestTest.java +src/test/java/org/openapitools/client/model/SchedulePaymentResponseTest.java +src/test/java/org/openapitools/client/model/UpdateAmenityRequestTest.java diff --git a/gen/.openapi-generator/VERSION b/gen/.openapi-generator/VERSION new file mode 100644 index 00000000..28cbf7c0 --- /dev/null +++ b/gen/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.0.0 \ No newline at end of file diff --git a/gen/.travis.yml b/gen/.travis.yml new file mode 100644 index 00000000..1b6741c0 --- /dev/null +++ b/gen/.travis.yml @@ -0,0 +1,22 @@ +# +# Generated by OpenAPI Generator: https://openapi-generator.tech +# +# Ref: https://docs.travis-ci.com/user/languages/java/ +# +language: java +jdk: + - openjdk12 + - openjdk11 + - openjdk10 + - openjdk9 + - openjdk8 +before_install: + # ensure gradlew has proper permission + - chmod a+x ./gradlew +script: + # test using maven + #- mvn test + # test using gradle + - gradle test + # test using sbt + # - sbt test diff --git a/gen/README.md b/gen/README.md new file mode 100644 index 00000000..0fa4e18c --- /dev/null +++ b/gen/README.md @@ -0,0 +1,211 @@ +# openapi-java-client + +Swagger MyHome - OpenAPI 3.0 +- API version: 2.0.0 + - Build date: 2022-09-26T12:06:21.393815800+03:00[Asia/Hebron] + +This is a OpenApi specification for MyHome backend service. + + +*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* + + +## Requirements + +Building the API client library requires: +1. Java 1.7+ +2. Maven/Gradle + +## Installation + +To install the API client library to your local Maven repository, simply execute: + +```shell +mvn clean install +``` + +To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: + +```shell +mvn clean deploy +``` + +Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. + +### Maven users + +Add this dependency to your project's POM: + +```xml + + org.openapitools + openapi-java-client + 2.0.0 + compile + +``` + +### Gradle users + +Add this dependency to your project's build file: + +```groovy +compile "org.openapitools:openapi-java-client:2.0.0" +``` + +### Others + +At first generate the JAR by executing: + +```shell +mvn clean package +``` + +Then manually install the following JARs: + +* `target/openapi-java-client-2.0.0.jar` +* `target/lib/*.jar` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following Java code: + +```java + +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AmenitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AmenitiesApi apiInstance = new AmenitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + AddAmenityRequest addAmenityRequest = new AddAmenityRequest(); // AddAmenityRequest | + try { + AddAmenityResponse result = apiInstance.addAmenityToCommunity(communityId, addAmenityRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AmenitiesApi#addAmenityToCommunity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to *http://localhost:8080* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AmenitiesApi* | [**addAmenityToCommunity**](docs/AmenitiesApi.md#addAmenityToCommunity) | **POST** /communities/{communityId}/amenities | +*AmenitiesApi* | [**deleteAmenity**](docs/AmenitiesApi.md#deleteAmenity) | **DELETE** /amenities/{amenityId} | +*AmenitiesApi* | [**getAmenityDetails**](docs/AmenitiesApi.md#getAmenityDetails) | **GET** /amenities/{amenityId} | +*AmenitiesApi* | [**listAllAmenities**](docs/AmenitiesApi.md#listAllAmenities) | **GET** /communities/{communityId}/amenities | +*AmenitiesApi* | [**updateAmenity**](docs/AmenitiesApi.md#updateAmenity) | **PUT** /amenities/{amenityId} | +*AuthenticationApi* | [**login**](docs/AuthenticationApi.md#login) | **POST** /auth/login | +*BookingsApi* | [**deleteBooking**](docs/BookingsApi.md#deleteBooking) | **DELETE** /amenities/{amenityId}/bookings/{bookingId} | +*CommunitiesApi* | [**addCommunityAdmins**](docs/CommunitiesApi.md#addCommunityAdmins) | **POST** /communities/{communityId}/admins | +*CommunitiesApi* | [**createCommunity**](docs/CommunitiesApi.md#createCommunity) | **POST** /communities | +*CommunitiesApi* | [**deleteCommunity**](docs/CommunitiesApi.md#deleteCommunity) | **DELETE** /communities/{communityId} | +*CommunitiesApi* | [**listAllCommunity**](docs/CommunitiesApi.md#listAllCommunity) | **GET** /communities | +*CommunitiesApi* | [**listCommunityAdmins**](docs/CommunitiesApi.md#listCommunityAdmins) | **GET** /communities/{communityId}/admins | +*CommunitiesApi* | [**listCommunityDetails**](docs/CommunitiesApi.md#listCommunityDetails) | **GET** /communities/{communityId} | +*CommunitiesApi* | [**removeAdminFromCommunity**](docs/CommunitiesApi.md#removeAdminFromCommunity) | **DELETE** /communities/{communityId}/admins/{adminId} | +*DocumentsApi* | [**deleteHouseMemberDocument**](docs/DocumentsApi.md#deleteHouseMemberDocument) | **DELETE** /members/{memberId}/documents | +*DocumentsApi* | [**getHouseMemberDocument**](docs/DocumentsApi.md#getHouseMemberDocument) | **GET** /members/{memberId}/documents | +*DocumentsApi* | [**updateHouseMemberDocument**](docs/DocumentsApi.md#updateHouseMemberDocument) | **PUT** /members/{memberId}/documents | +*DocumentsApi* | [**uploadHouseMemberDocument**](docs/DocumentsApi.md#uploadHouseMemberDocument) | **POST** /members/{memberId}/documents | +*HousesApi* | [**addCommunityHouses**](docs/HousesApi.md#addCommunityHouses) | **POST** /communities/{communityId}/houses | +*HousesApi* | [**addHouseMembers**](docs/HousesApi.md#addHouseMembers) | **POST** /houses/{houseId}/members | +*HousesApi* | [**deleteHouseMember**](docs/HousesApi.md#deleteHouseMember) | **DELETE** /houses/{houseId}/members/{memberId} | +*HousesApi* | [**getHouseDetails**](docs/HousesApi.md#getHouseDetails) | **GET** /houses/{houseId} | +*HousesApi* | [**listAllHouses**](docs/HousesApi.md#listAllHouses) | **GET** /houses | +*HousesApi* | [**listAllMembersOfHouse**](docs/HousesApi.md#listAllMembersOfHouse) | **GET** /houses/{houseId}/members | +*HousesApi* | [**listCommunityHouses**](docs/HousesApi.md#listCommunityHouses) | **GET** /communities/{communityId}/houses | +*HousesApi* | [**removeCommunityHouse**](docs/HousesApi.md#removeCommunityHouse) | **DELETE** /communities/{communityId}/houses/{houseId} | +*PaymentsApi* | [**listAllAdminScheduledPayments**](docs/PaymentsApi.md#listAllAdminScheduledPayments) | **GET** /communities/{communityId}/admins/{adminId}/payments | +*PaymentsApi* | [**listAllMemberPayments**](docs/PaymentsApi.md#listAllMemberPayments) | **GET** /members/{memberId}/payments | +*PaymentsApi* | [**listPaymentDetails**](docs/PaymentsApi.md#listPaymentDetails) | **GET** /payments/{paymentId} | +*PaymentsApi* | [**schedulePayment**](docs/PaymentsApi.md#schedulePayment) | **POST** /payments | +*UsersApi* | [**confirmEmail**](docs/UsersApi.md#confirmEmail) | **GET** /users/{userId}/email-confirm/{emailConfirmToken} | +*UsersApi* | [**getUserDetails**](docs/UsersApi.md#getUserDetails) | **GET** /users/{userId} | +*UsersApi* | [**listAllHousemates**](docs/UsersApi.md#listAllHousemates) | **GET** /users/{userId}/housemates | +*UsersApi* | [**listAllUsers**](docs/UsersApi.md#listAllUsers) | **GET** /users | +*UsersApi* | [**resendConfirmEmailMail**](docs/UsersApi.md#resendConfirmEmailMail) | **GET** /users/{userId}/email-confirm-resend | +*UsersApi* | [**signUp**](docs/UsersApi.md#signUp) | **POST** /users | +*UsersApi* | [**usersPasswordPost**](docs/UsersApi.md#usersPasswordPost) | **POST** /users/password | + + +## Documentation for Models + + - [AddAmenityRequest](docs/AddAmenityRequest.md) + - [AddAmenityResponse](docs/AddAmenityResponse.md) + - [AddCommunityAdminRequest](docs/AddCommunityAdminRequest.md) + - [AddCommunityAdminResponse](docs/AddCommunityAdminResponse.md) + - [AddCommunityHouseRequest](docs/AddCommunityHouseRequest.md) + - [AddCommunityHouseResponse](docs/AddCommunityHouseResponse.md) + - [AddHouseMemberRequest](docs/AddHouseMemberRequest.md) + - [AddHouseMemberResponse](docs/AddHouseMemberResponse.md) + - [AdminPayment](docs/AdminPayment.md) + - [AmenityDto](docs/AmenityDto.md) + - [CommunityHouseName](docs/CommunityHouseName.md) + - [CreateCommunityRequest](docs/CreateCommunityRequest.md) + - [CreateCommunityResponse](docs/CreateCommunityResponse.md) + - [CreateUserRequest](docs/CreateUserRequest.md) + - [CreateUserResponse](docs/CreateUserResponse.md) + - [ForgotPasswordRequest](docs/ForgotPasswordRequest.md) + - [GetAmenityDetailsResponse](docs/GetAmenityDetailsResponse.md) + - [GetCommunityDetailsResponse](docs/GetCommunityDetailsResponse.md) + - [GetCommunityDetailsResponseCommunity](docs/GetCommunityDetailsResponseCommunity.md) + - [GetHouseDetailsResponse](docs/GetHouseDetailsResponse.md) + - [GetHouseDetailsResponseCommunityHouse](docs/GetHouseDetailsResponseCommunityHouse.md) + - [GetUserDetailsResponse](docs/GetUserDetailsResponse.md) + - [GetUserDetailsResponseUser](docs/GetUserDetailsResponseUser.md) + - [HouseMember](docs/HouseMember.md) + - [HouseMemberDto](docs/HouseMemberDto.md) + - [ListAdminPaymentsResponse](docs/ListAdminPaymentsResponse.md) + - [ListCommunityAdminsResponse](docs/ListCommunityAdminsResponse.md) + - [ListCommunityAdminsResponseCommunityAdmin](docs/ListCommunityAdminsResponseCommunityAdmin.md) + - [ListHouseMembersResponse](docs/ListHouseMembersResponse.md) + - [ListMemberPaymentsResponse](docs/ListMemberPaymentsResponse.md) + - [LoginRequest](docs/LoginRequest.md) + - [MemberPayment](docs/MemberPayment.md) + - [PageInfo](docs/PageInfo.md) + - [Pageable](docs/Pageable.md) + - [SchedulePaymentRequest](docs/SchedulePaymentRequest.md) + - [SchedulePaymentResponse](docs/SchedulePaymentResponse.md) + - [UpdateAmenityRequest](docs/UpdateAmenityRequest.md) + + +## Documentation for Authorization + +Authentication schemes defined for the API: +### bearerAuth + +- **Type**: HTTP basic authentication + + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + + + diff --git a/gen/api/openapi.yaml b/gen/api/openapi.yaml new file mode 100644 index 00000000..95dbd460 --- /dev/null +++ b/gen/api/openapi.yaml @@ -0,0 +1,1782 @@ +openapi: 3.0.2 +info: + description: This is a OpenApi specification for MyHome backend service. + title: Swagger MyHome - OpenAPI 3.0 + version: 2.0.0 +servers: +- url: http://localhost:8080/ +tags: +- name: Authentication +- name: Users +- name: Documents +- name: Communities +- name: Amenities +- name: Houses +- name: Payments +- name: Members +paths: + /auth/login: + post: + description: Login user to system + operationId: login + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/LoginRequest' + application/xml: + schema: + $ref: '#/components/schemas/LoginRequest' + required: true + responses: + "200": + description: Login successful + tags: + - Authentication + x-contentType: application/json + x-accepts: application/json + /users/password: + post: + description: Request reset password or reset password + parameters: + - description: Acton with user password (forgot or reset) + explode: true + in: query + name: action + required: true + schema: + enum: + - FORGOT + - RESET + type: string + style: form + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ForgotPasswordRequest' + application/xml: + schema: + $ref: '#/components/schemas/ForgotPasswordRequest' + required: true + responses: + "200": + description: If password reset + "400": + description: If wrong password reset token + tags: + - Users + x-contentType: application/json + x-accepts: application/json + /amenities/{amenityId}: + delete: + description: Remove amenity + operationId: deleteAmenity + parameters: + - explode: false + in: path + name: amenityId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If amenity deleted + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Amenities + x-accepts: application/json + get: + description: Get details about the amenity + operationId: getAmenityDetails + parameters: + - description: Id of the amenity to get details + explode: false + in: path + name: amenityId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetAmenityDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetAmenityDetailsResponse' + description: If details found + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Amenities + x-accepts: application/json + put: + description: Update an amenity + operationId: updateAmenity + parameters: + - explode: false + in: path + name: amenityId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAmenityRequest' + application/xml: + schema: + $ref: '#/components/schemas/UpdateAmenityRequest' + description: UpdateAmenityRequest update amenity + required: true + responses: + "204": + description: If updated successfully + "400": + description: If amenity is not found + security: + - bearerAuth: [] + tags: + - Amenities + x-contentType: application/json + x-accepts: application/json + /amenities/{amenityId}/bookings/{bookingId}: + delete: + description: Remove booking + operationId: deleteBooking + parameters: + - explode: false + in: path + name: amenityId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: bookingId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If booking deleted + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Bookings + x-accepts: application/json + /communities/{communityId}/amenities: + get: + description: Get all amenities of community + operationId: listAllAmenities + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + items: + $ref: '#/components/schemas/GetAmenityDetailsResponse' + type: array + uniqueItems: true + application/xml: + schema: + items: + $ref: '#/components/schemas/GetAmenityDetailsResponse' + type: array + uniqueItems: true + description: Returns list of amenities + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Amenities + x-accepts: application/json + post: + description: Adds amenity to community + operationId: addAmenityToCommunity + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddAmenityRequest' + application/xml: + schema: + $ref: '#/components/schemas/AddAmenityRequest' + required: false + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/AddAmenityResponse' + application/xml: + schema: + $ref: '#/components/schemas/AddAmenityResponse' + description: If amenity add successful + "404": + description: If community not found + security: + - bearerAuth: [] + tags: + - Amenities + x-contentType: application/json + x-accepts: application/json + /users: + get: + description: Lists all users + operationId: listAllUsers + parameters: + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetUserDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetUserDetailsResponse' + description: Returns list of users + security: + - bearerAuth: [] + tags: + - Users + x-accepts: application/json + post: + description: Create a new user + operationId: signUp + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserRequest' + application/xml: + schema: + $ref: '#/components/schemas/CreateUserRequest' + description: CreateUserRequest aggregate fields + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateUserResponse' + application/xml: + schema: + $ref: '#/components/schemas/CreateUserResponse' + description: If user created + "409": + description: If user already exists + tags: + - Users + x-contentType: application/json + x-accepts: application/json + /users/{userId}: + get: + description: Get details of a user given userId + operationId: getUserDetails + parameters: + - description: ID of the user to get + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetUserDetailsResponseUser' + application/xml: + schema: + $ref: '#/components/schemas/GetUserDetailsResponseUser' + description: If userId is valid. Response body has the details + "404": + description: If userId is invalid + security: + - bearerAuth: [] + tags: + - Users + x-accepts: application/json + /users/{userId}/email-confirm/{emailConfirmToken}: + get: + description: Confirm user email + operationId: confirmEmail + parameters: + - description: Id of the user for confirm email + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + - description: Tocken from user email + explode: false + in: path + name: emailConfirmToken + required: true + schema: + type: string + style: simple + responses: + "200": + description: Email was successfully confirmed + "400": + description: Email confirmation error + tags: + - Users + x-accepts: application/json + /users/{userId}/email-confirm-resend: + get: + description: Resend email confirm mail + operationId: resendConfirmEmailMail + parameters: + - description: ID of the user for resend confirm email + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + responses: + "200": + description: Email was successfully send + "400": + description: Email send error + tags: + - Users + x-accepts: application/json + /users/{userId}/housemates: + get: + description: Lists all members from all houses of a user + operationId: listAllHousemates + parameters: + - description: ID of the user for which to find housemates + explode: false + in: path + name: userId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListHouseMembersResponse' + application/xml: + schema: + $ref: '#/components/schemas/ListHouseMembersResponse' + description: Returns list of all members from all houses of the specified + user + security: + - bearerAuth: [] + tags: + - Users + x-accepts: application/json + /members/{memberId}/documents: + delete: + description: Delete house member's documents + operationId: deleteHouseMemberDocument + parameters: + - explode: false + in: path + name: memberId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If document deleted + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Documents + x-accepts: application/json + get: + description: Returns house member's documents + operationId: getHouseMemberDocument + parameters: + - explode: false + in: path + name: memberId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + image/jpeg: + schema: + format: byte + type: string + description: If document present + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Documents + x-accepts: image/jpeg + post: + description: Add house member's documents + operationId: uploadHouseMemberDocument + parameters: + - explode: false + in: path + name: memberId + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object_1' + content: + multipart/form-data: + schema: + properties: + memberDocument: + format: binary + type: string + type: object + responses: + "204": + description: If document saved + "409": + description: If document save error + "413": + description: If document file too large + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Documents + x-contentType: multipart/form-data + x-accepts: application/json + put: + description: Update house member's documents + operationId: updateHouseMemberDocument + parameters: + - explode: false + in: path + name: memberId + required: true + schema: + type: string + style: simple + requestBody: + $ref: '#/components/requestBodies/inline_object' + content: + multipart/form-data: + schema: + properties: + memberDocument: + format: binary + type: string + type: object + responses: + "204": + description: If document updated + "409": + description: If document update error + "413": + description: If document file too large + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Documents + x-contentType: multipart/form-data + x-accepts: application/json + /communities: + get: + description: List all communities which are registered + operationId: listAllCommunity + parameters: + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetCommunityDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetCommunityDetailsResponse' + description: Returns list of communities + security: + - bearerAuth: [] + tags: + - Communities + x-accepts: application/json + post: + description: Create a new community + operationId: createCommunity + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCommunityRequest' + application/xml: + schema: + $ref: '#/components/schemas/CreateCommunityRequest' + description: CreateCommunityRequest aggregate fields + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCommunityResponse' + application/xml: + schema: + $ref: '#/components/schemas/CreateCommunityResponse' + description: If community was created + security: + - bearerAuth: [] + tags: + - Communities + x-contentType: application/json + x-accepts: application/json + /communities/{communityId}: + delete: + description: Deletion community with given community id + operationId: deleteCommunity + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If community was removed + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Communities + x-accepts: application/json + get: + description: Get details about the community given a community id + operationId: listCommunityDetails + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetCommunityDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetCommunityDetailsResponse' + description: If community exists + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Communities + x-accepts: application/json + /communities/{communityId}/admins: + get: + description: List all admins of the community given a community id + operationId: listCommunityAdmins + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListCommunityAdminsResponse' + application/xml: + schema: + $ref: '#/components/schemas/ListCommunityAdminsResponse' + description: If community exists + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Communities + x-accepts: application/json + post: + description: Add a new admin to the community given a community id + operationId: addCommunityAdmins + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddCommunityAdminRequest' + application/xml: + schema: + $ref: '#/components/schemas/AddCommunityAdminRequest' + description: AddCommunityAdminRequest aggregate fields + required: true + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/AddCommunityAdminResponse' + application/xml: + schema: + $ref: '#/components/schemas/AddCommunityAdminResponse' + description: If admins were created + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Communities + x-contentType: application/json + x-accepts: application/json + /communities/{communityId}/admins/{adminId}: + delete: + description: Remove of admin associated with a community + operationId: removeAdminFromCommunity + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: adminId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If admin was removed + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Communities + x-accepts: application/json + /communities/{communityId}/houses: + get: + description: List all houses of the community given a community id + operationId: listCommunityHouses + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetHouseDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetHouseDetailsResponse' + description: If community exists + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Houses + x-accepts: application/json + post: + description: Add a new house to the community given a community id + operationId: addCommunityHouses + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddCommunityHouseRequest' + application/xml: + schema: + $ref: '#/components/schemas/AddCommunityHouseRequest' + description: AddCommunityHouseRequest aggregate fields + required: true + responses: + "204": + content: + application/json: + schema: + $ref: '#/components/schemas/AddCommunityHouseResponse' + application/xml: + schema: + $ref: '#/components/schemas/AddCommunityHouseResponse' + description: If houses were added + "400": + description: If params are invalid + tags: + - Houses + x-contentType: application/json + x-accepts: application/json + /communities/{communityId}/houses/{houseId}: + delete: + description: Remove of house from the community given a community id and a house + id + operationId: removeCommunityHouse + parameters: + - explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: houseId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If house was removed + "400": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Houses + x-accepts: application/json + /houses: + get: + description: List all houses of the community given a community id + operationId: listAllHouses + parameters: + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetHouseDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetHouseDetailsResponse' + description: If community exists + security: + - bearerAuth: [] + tags: + - Houses + x-accepts: application/json + /houses/{houseId}: + get: + description: Get house detail by a given ID + operationId: getHouseDetails + parameters: + - description: ID of the house to get + explode: false + in: path + name: houseId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/GetHouseDetailsResponse' + application/xml: + schema: + $ref: '#/components/schemas/GetHouseDetailsResponse' + description: If house present + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Houses + x-accepts: application/json + /houses/{houseId}/members: + get: + description: List all members of the house given a house id + operationId: listAllMembersOfHouse + parameters: + - explode: false + in: path + name: houseId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListHouseMembersResponse' + application/xml: + schema: + $ref: '#/components/schemas/ListHouseMembersResponse' + description: If house present + "404": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Houses + x-accepts: application/json + post: + description: Add new members to the house given a house id. Responds with member + id which were added + operationId: addHouseMembers + parameters: + - explode: false + in: path + name: houseId + required: true + schema: + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/AddHouseMemberRequest' + application/xml: + schema: + $ref: '#/components/schemas/AddHouseMemberRequest' + description: AddHouseMemberRequest aggregate fields + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/AddHouseMemberResponse' + application/xml: + schema: + $ref: '#/components/schemas/AddHouseMemberResponse' + description: If members were added to house + "404": + description: If parameters are invalid + security: + - bearerAuth: [] + tags: + - Houses + x-contentType: application/json + x-accepts: application/json + /houses/{houseId}/members/{memberId}: + delete: + description: Deletion of member associated with a house + operationId: deleteHouseMember + parameters: + - explode: false + in: path + name: houseId + required: true + schema: + type: string + style: simple + - explode: false + in: path + name: memberId + required: true + schema: + type: string + style: simple + responses: + "204": + description: If house member was removed from house + "400": + description: If params are invalid + security: + - bearerAuth: [] + tags: + - Houses + x-accepts: application/json + /payments: + post: + description: Schedule a new payment + operationId: schedulePayment + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/SchedulePaymentRequest' + application/xml: + schema: + $ref: '#/components/schemas/SchedulePaymentRequest' + description: CreateUserRequest aggregate fields + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/SchedulePaymentResponse' + application/xml: + schema: + $ref: '#/components/schemas/SchedulePaymentResponse' + description: If schedule payment is created + security: + - bearerAuth: [] + tags: + - Payments + x-contentType: application/json + x-accepts: application/json + /payments/{paymentId}: + get: + description: Get details about a payment with the given payment id + operationId: listPaymentDetails + parameters: + - description: Payment ID + explode: false + in: path + name: paymentId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SchedulePaymentResponse' + application/xml: + schema: + $ref: '#/components/schemas/SchedulePaymentResponse' + description: If payment is valid. Response body has the details + "404": + description: If paymentId is invalid + security: + - bearerAuth: [] + tags: + - Payments + x-accepts: application/json + /members/{memberId}/payments: + get: + description: Get all payments for the specified member + operationId: listAllMemberPayments + parameters: + - description: Member Id to use for getting all payments + explode: false + in: path + name: memberId + required: true + schema: + type: string + style: simple + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListMemberPaymentsResponse' + application/xml: + schema: + $ref: '#/components/schemas/ListMemberPaymentsResponse' + description: If memberId is valid. Response body has the details + "404": + description: If memberId is invalid + security: + - bearerAuth: [] + tags: + - Payments + x-accepts: application/json + /communities/{communityId}/admins/{adminId}/payments: + get: + description: Get all payments scheduled by the specified admin + operationId: listAllAdminScheduledPayments + parameters: + - description: The id of community + explode: false + in: path + name: communityId + required: true + schema: + type: string + style: simple + - description: The id of admin + explode: false + in: path + name: adminId + required: true + schema: + type: string + style: simple + - explode: true + in: query + name: pageable + required: false + schema: + $ref: '#/components/schemas/Pageable' + style: form + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ListAdminPaymentsResponse' + application/xml: + schema: + $ref: '#/components/schemas/ListAdminPaymentsResponse' + description: If communityId and adminId are valid. Response body has the + details + "404": + description: If communityId or adminId are invalid + security: + - bearerAuth: [] + tags: + - Payments + x-accepts: application/json +components: + requestBodies: + inline_object_1: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object_1' + inline_object: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/inline_object' + schemas: + ForgotPasswordRequest: + example: + newPassword: newPassword + email: email + token: token + properties: + email: + type: string + token: + type: string + newPassword: + type: string + type: object + GetAmenityDetailsResponse: + example: + amenityId: amenityId + description: description + properties: + amenityId: + type: string + description: + type: string + type: object + UpdateAmenityRequest: + example: + price: 0 + name: name + description: description + communityId: communityId + properties: + name: + type: string + description: + type: string + price: + format: int64 + type: integer + communityId: + type: string + type: object + AmenityDto: + example: + amenityId: amenityId + price: 6.027456183070403 + name: name + description: description + id: 0 + communityId: communityId + properties: + id: + format: int64 + type: integer + amenityId: + type: string + name: + type: string + description: + type: string + price: + type: number + communityId: + type: string + type: object + AddAmenityRequest: + example: + amenities: + - amenityId: amenityId + price: 6.027456183070403 + name: name + description: description + id: 0 + communityId: communityId + - amenityId: amenityId + price: 6.027456183070403 + name: name + description: description + id: 0 + communityId: communityId + properties: + amenities: + items: + $ref: '#/components/schemas/AmenityDto' + type: array + uniqueItems: true + type: object + AddAmenityResponse: + example: + amenities: + - amenityId: amenityId + price: 6.027456183070403 + name: name + description: description + id: 0 + communityId: communityId + - amenityId: amenityId + price: 6.027456183070403 + name: name + description: description + id: 0 + communityId: communityId + properties: + amenities: + items: + $ref: '#/components/schemas/AmenityDto' + type: array + type: object + CreateUserRequest: + example: + password: password + name: name + email: email + properties: + name: + type: string + email: + format: email + type: string + password: + maxLength: 80 + minLength: 8 + type: string + required: + - name + type: object + CreateUserResponse: + example: + name: name + userId: userId + email: email + properties: + userId: + type: string + name: + type: string + email: + type: string + type: object + GetUserDetailsResponse: + example: + users: + - name: name + communityIds: + - communityIds + - communityIds + userId: userId + email: email + - name: name + communityIds: + - communityIds + - communityIds + userId: userId + email: email + properties: + users: + items: + $ref: '#/components/schemas/GetUserDetailsResponseUser' + type: array + uniqueItems: true + required: + - users + type: object + GetUserDetailsResponseUser: + example: + name: name + communityIds: + - communityIds + - communityIds + userId: userId + email: email + properties: + userId: + type: string + name: + type: string + email: + type: string + communityIds: + items: + type: string + type: array + uniqueItems: true + type: object + Pageable: + description: Pageable query parameters + properties: + page: + type: integer + size: + type: integer + type: object + PageInfo: + description: Page info + example: + pageLimit: 1 + totalPages: 5 + currentPage: 6 + totalElements: 5 + properties: + currentPage: + type: integer + pageLimit: + type: integer + totalPages: + type: integer + totalElements: + format: int64 + type: integer + type: object + CreateCommunityRequest: + example: + district: district + name: name + properties: + name: + type: string + district: + type: string + required: + - district + - name + type: object + CreateCommunityResponse: + example: + communityId: communityId + properties: + communityId: + type: string + required: + - communityId + type: object + GetCommunityDetailsResponse: + example: + communities: + - district: district + name: name + communityId: communityId + - district: district + name: name + communityId: communityId + properties: + communities: + items: + $ref: '#/components/schemas/GetCommunityDetailsResponseCommunity' + type: array + uniqueItems: true + required: + - communities + type: object + GetCommunityDetailsResponseCommunity: + example: + district: district + name: name + communityId: communityId + properties: + communityId: + type: string + name: + type: string + district: + type: string + type: object + ListCommunityAdminsResponse: + example: + admins: + - adminId: adminId + - adminId: adminId + properties: + admins: + items: + $ref: '#/components/schemas/ListCommunityAdminsResponseCommunityAdmin' + type: array + uniqueItems: true + required: + - admins + type: object + ListCommunityAdminsResponseCommunityAdmin: + example: + adminId: adminId + properties: + adminId: + type: string + type: object + AddCommunityAdminRequest: + example: + admins: + - admins + - admins + properties: + admins: + items: + type: string + type: array + uniqueItems: true + required: + - admins + type: object + AddCommunityAdminResponse: + example: + admins: + - admins + - admins + properties: + admins: + items: + type: string + type: array + uniqueItems: true + required: + - admins + type: object + GetHouseDetailsResponse: + example: + houses: + - houseId: houseId + name: name + - houseId: houseId + name: name + properties: + houses: + items: + $ref: '#/components/schemas/GetHouseDetailsResponseCommunityHouse' + type: array + uniqueItems: true + required: + - houses + type: object + GetHouseDetailsResponseCommunityHouse: + example: + houseId: houseId + name: name + properties: + houseId: + type: string + name: + type: string + type: object + AddCommunityHouseRequest: + example: + houses: + - name: name + - name: name + properties: + houses: + items: + $ref: '#/components/schemas/CommunityHouseName' + type: array + uniqueItems: true + required: + - houses + type: object + CommunityHouseName: + example: + name: name + properties: + name: + type: string + type: object + AddCommunityHouseResponse: + example: + houses: + - houses + - houses + properties: + houses: + items: + type: string + type: array + uniqueItems: true + required: + - houses + type: object + HouseMember: + example: + name: name + memberId: memberId + properties: + memberId: + type: string + name: + type: string + required: + - memberId + - name + type: object + ListHouseMembersResponse: + example: + members: + - name: name + memberId: memberId + - name: name + memberId: memberId + properties: + members: + items: + $ref: '#/components/schemas/HouseMember' + type: array + uniqueItems: true + required: + - members + type: object + HouseMemberDto: + example: + name: name + id: 0 + memberId: memberId + properties: + id: + format: int64 + type: integer + memberId: + type: string + name: + type: string + required: + - memberId + - name + type: object + AddHouseMemberRequest: + example: + members: + - name: name + id: 0 + memberId: memberId + - name: name + id: 0 + memberId: memberId + properties: + members: + items: + $ref: '#/components/schemas/HouseMemberDto' + type: array + uniqueItems: true + required: + - members + type: object + AddHouseMemberResponse: + example: + members: + - name: name + memberId: memberId + - name: name + memberId: memberId + properties: + members: + items: + $ref: '#/components/schemas/HouseMember' + type: array + uniqueItems: true + required: + - members + type: object + SchedulePaymentRequest: + example: + charge: 0.8008281904610115 + recurring: true + dueDate: dueDate + adminId: adminId + description: description + type: type + memberId: memberId + properties: + type: + type: string + description: + maxLength: 300 + minLength: 5 + type: string + recurring: + type: boolean + charge: + type: number + dueDate: + type: string + adminId: + type: string + memberId: + type: string + required: + - description + type: object + SchedulePaymentResponse: + example: + charge: 0.8008281904610115 + paymentId: paymentId + recurring: true + dueDate: dueDate + adminId: adminId + description: description + type: type + memberId: memberId + properties: + paymentId: + type: string + charge: + type: number + type: + type: string + description: + type: string + recurring: + type: boolean + dueDate: + type: string + adminId: + type: string + memberId: + type: string + type: object + MemberPayment: + example: + charge: 0.8008281904610115 + paymentId: paymentId + dueDate: dueDate + memberId: memberId + properties: + memberId: + type: string + paymentId: + type: string + charge: + type: number + dueDate: + type: string + type: object + ListMemberPaymentsResponse: + example: + payments: + - charge: 0.8008281904610115 + paymentId: paymentId + dueDate: dueDate + memberId: memberId + - charge: 0.8008281904610115 + paymentId: paymentId + dueDate: dueDate + memberId: memberId + properties: + payments: + items: + $ref: '#/components/schemas/MemberPayment' + type: array + uniqueItems: true + type: object + AdminPayment: + example: + charge: 0.8008281904610115 + paymentId: paymentId + dueDate: dueDate + adminId: adminId + properties: + adminId: + type: string + paymentId: + type: string + charge: + type: number + dueDate: + type: string + type: object + ListAdminPaymentsResponse: + example: + payments: + - charge: 0.8008281904610115 + paymentId: paymentId + dueDate: dueDate + adminId: adminId + - charge: 0.8008281904610115 + paymentId: paymentId + dueDate: dueDate + adminId: adminId + pageInfo: + pageLimit: 1 + totalPages: 5 + currentPage: 6 + totalElements: 5 + properties: + payments: + items: + $ref: '#/components/schemas/AdminPayment' + type: array + uniqueItems: true + pageInfo: + $ref: '#/components/schemas/PageInfo' + type: object + LoginRequest: + example: + password: password + email: email + properties: + email: + type: string + password: + type: string + type: object + inline_object: + properties: + memberDocument: + format: binary + type: string + type: object + inline_object_1: + properties: + memberDocument: + format: binary + type: string + type: object + securitySchemes: + bearerAuth: + bearerFormat: JWT + scheme: bearer + type: http + diff --git a/gen/build.gradle b/gen/build.gradle new file mode 100644 index 00000000..47db630a --- /dev/null +++ b/gen/build.gradle @@ -0,0 +1,115 @@ +apply plugin: 'idea' +apply plugin: 'eclipse' +apply plugin: 'java' + +group = 'org.openapitools' +version = '2.0.0' + +buildscript { + repositories { + maven { url "https://repo1.maven.org/maven2" } + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:2.3.+' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + } +} + +repositories { + jcenter() +} +sourceSets { + main.java.srcDirs = ['src/main/java'] +} + +if(hasProperty('target') && target == 'android') { + + apply plugin: 'com.android.library' + apply plugin: 'com.github.dcendents.android-maven' + + android { + compileSdkVersion 25 + buildToolsVersion '25.0.2' + defaultConfig { + minSdkVersion 14 + targetSdkVersion 25 + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_7 + targetCompatibility JavaVersion.VERSION_1_7 + } + + // Rename the aar correctly + libraryVariants.all { variant -> + variant.outputs.each { output -> + def outputFile = output.outputFile + if (outputFile != null && outputFile.name.endsWith('.aar')) { + def fileName = "${project.name}-${variant.baseName}-${version}.aar" + output.outputFile = new File(outputFile.parent, fileName) + } + } + } + + dependencies { + provided 'javax.annotation:javax.annotation-api:1.3.2' + } + } + + afterEvaluate { + android.libraryVariants.all { variant -> + def task = project.tasks.create "jar${variant.name.capitalize()}", Jar + task.description = "Create jar artifact for ${variant.name}" + task.dependsOn variant.javaCompile + task.from variant.javaCompile.destinationDir + task.destinationDir = project.file("${project.buildDir}/outputs/jar") + task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" + artifacts.add('archives', task); + } + } + + task sourcesJar(type: Jar) { + from android.sourceSets.main.java.srcDirs + classifier = 'sources' + } + + artifacts { + archives sourcesJar + } + +} else { + + apply plugin: 'java' + apply plugin: 'maven' + + sourceCompatibility = JavaVersion.VERSION_1_7 + targetCompatibility = JavaVersion.VERSION_1_7 + + install { + repositories.mavenInstaller { + pom.artifactId = 'openapi-java-client' + } + } + + task execute(type:JavaExec) { + main = System.getProperty('mainClass') + classpath = sourceSets.main.runtimeClasspath + } +} + +dependencies { + compile 'io.swagger:swagger-annotations:1.5.24' + compile "com.google.code.findbugs:jsr305:3.0.2" + compile 'com.squareup.okhttp3:okhttp:3.14.7' + compile 'com.squareup.okhttp3:logging-interceptor:3.14.7' + compile 'com.google.code.gson:gson:2.8.6' + compile 'io.gsonfire:gson-fire:1.8.4' + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + compile 'org.threeten:threetenbp:1.4.3' + compile 'javax.annotation:javax.annotation-api:1.3.2' + testCompile 'junit:junit:4.13.1' +} + +javadoc { + options.tags = [ "http.response.details:a:Http Response Details" ] +} diff --git a/gen/build.sbt b/gen/build.sbt new file mode 100644 index 00000000..b44307c4 --- /dev/null +++ b/gen/build.sbt @@ -0,0 +1,25 @@ +lazy val root = (project in file(".")). + settings( + organization := "org.openapitools", + name := "openapi-java-client", + version := "2.0.0", + scalaVersion := "2.11.4", + scalacOptions ++= Seq("-feature"), + javacOptions in compile ++= Seq("-Xlint:deprecation"), + publishArtifact in (Compile, packageDoc) := false, + resolvers += Resolver.mavenLocal, + libraryDependencies ++= Seq( + "io.swagger" % "swagger-annotations" % "1.5.24", + "com.squareup.okhttp3" % "okhttp" % "3.14.7", + "com.squareup.okhttp3" % "logging-interceptor" % "3.14.7", + "com.google.code.gson" % "gson" % "2.8.6", + "org.apache.commons" % "commons-lang3" % "3.10", + "org.threeten" % "threetenbp" % "1.4.3" % "compile", + "io.gsonfire" % "gson-fire" % "1.8.3" % "compile", + "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile", + "javax.annotation" % "javax.annotation-api" % "1.3.2" % "compile", + "junit" % "junit" % "4.13.1" % "test", + "com.novocode" % "junit-interface" % "0.10" % "test" + ) + ) diff --git a/gen/docs/AddAmenityRequest.md b/gen/docs/AddAmenityRequest.md new file mode 100644 index 00000000..53df05e4 --- /dev/null +++ b/gen/docs/AddAmenityRequest.md @@ -0,0 +1,12 @@ + + +# AddAmenityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amenities** | [**Set<AmenityDto>**](AmenityDto.md) | | [optional] + + + diff --git a/gen/docs/AddAmenityResponse.md b/gen/docs/AddAmenityResponse.md new file mode 100644 index 00000000..19ceea22 --- /dev/null +++ b/gen/docs/AddAmenityResponse.md @@ -0,0 +1,12 @@ + + +# AddAmenityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amenities** | [**List<AmenityDto>**](AmenityDto.md) | | [optional] + + + diff --git a/gen/docs/AddCommunityAdminRequest.md b/gen/docs/AddCommunityAdminRequest.md new file mode 100644 index 00000000..f55f2995 --- /dev/null +++ b/gen/docs/AddCommunityAdminRequest.md @@ -0,0 +1,12 @@ + + +# AddCommunityAdminRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admins** | **Set<String>** | | + + + diff --git a/gen/docs/AddCommunityAdminResponse.md b/gen/docs/AddCommunityAdminResponse.md new file mode 100644 index 00000000..737fd96e --- /dev/null +++ b/gen/docs/AddCommunityAdminResponse.md @@ -0,0 +1,12 @@ + + +# AddCommunityAdminResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admins** | **Set<String>** | | + + + diff --git a/gen/docs/AddCommunityHouseRequest.md b/gen/docs/AddCommunityHouseRequest.md new file mode 100644 index 00000000..e93d368d --- /dev/null +++ b/gen/docs/AddCommunityHouseRequest.md @@ -0,0 +1,12 @@ + + +# AddCommunityHouseRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**houses** | [**Set<CommunityHouseName>**](CommunityHouseName.md) | | + + + diff --git a/gen/docs/AddCommunityHouseResponse.md b/gen/docs/AddCommunityHouseResponse.md new file mode 100644 index 00000000..469ab3c4 --- /dev/null +++ b/gen/docs/AddCommunityHouseResponse.md @@ -0,0 +1,12 @@ + + +# AddCommunityHouseResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**houses** | **Set<String>** | | + + + diff --git a/gen/docs/AddHouseMemberRequest.md b/gen/docs/AddHouseMemberRequest.md new file mode 100644 index 00000000..54bdf7a0 --- /dev/null +++ b/gen/docs/AddHouseMemberRequest.md @@ -0,0 +1,12 @@ + + +# AddHouseMemberRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**Set<HouseMemberDto>**](HouseMemberDto.md) | | + + + diff --git a/gen/docs/AddHouseMemberResponse.md b/gen/docs/AddHouseMemberResponse.md new file mode 100644 index 00000000..f2878f3b --- /dev/null +++ b/gen/docs/AddHouseMemberResponse.md @@ -0,0 +1,12 @@ + + +# AddHouseMemberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**Set<HouseMember>**](HouseMember.md) | | + + + diff --git a/gen/docs/AdminPayment.md b/gen/docs/AdminPayment.md new file mode 100644 index 00000000..b025eeda --- /dev/null +++ b/gen/docs/AdminPayment.md @@ -0,0 +1,15 @@ + + +# AdminPayment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**adminId** | **String** | | [optional] +**paymentId** | **String** | | [optional] +**charge** | **BigDecimal** | | [optional] +**dueDate** | **String** | | [optional] + + + diff --git a/gen/docs/AmenitiesApi.md b/gen/docs/AmenitiesApi.md new file mode 100644 index 00000000..767d1f96 --- /dev/null +++ b/gen/docs/AmenitiesApi.md @@ -0,0 +1,355 @@ +# AmenitiesApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addAmenityToCommunity**](AmenitiesApi.md#addAmenityToCommunity) | **POST** /communities/{communityId}/amenities | +[**deleteAmenity**](AmenitiesApi.md#deleteAmenity) | **DELETE** /amenities/{amenityId} | +[**getAmenityDetails**](AmenitiesApi.md#getAmenityDetails) | **GET** /amenities/{amenityId} | +[**listAllAmenities**](AmenitiesApi.md#listAllAmenities) | **GET** /communities/{communityId}/amenities | +[**updateAmenity**](AmenitiesApi.md#updateAmenity) | **PUT** /amenities/{amenityId} | + + + +# **addAmenityToCommunity** +> AddAmenityResponse addAmenityToCommunity(communityId, addAmenityRequest) + + + +Adds amenity to community + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AmenitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AmenitiesApi apiInstance = new AmenitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + AddAmenityRequest addAmenityRequest = new AddAmenityRequest(); // AddAmenityRequest | + try { + AddAmenityResponse result = apiInstance.addAmenityToCommunity(communityId, addAmenityRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AmenitiesApi#addAmenityToCommunity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **addAmenityRequest** | [**AddAmenityRequest**](AddAmenityRequest.md)| | [optional] + +### Return type + +[**AddAmenityResponse**](AddAmenityResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If amenity add successful | - | +**404** | If community not found | - | + + +# **deleteAmenity** +> deleteAmenity(amenityId) + + + +Remove amenity + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AmenitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AmenitiesApi apiInstance = new AmenitiesApi(defaultClient); + String amenityId = "amenityId_example"; // String | + try { + apiInstance.deleteAmenity(amenityId); + } catch (ApiException e) { + System.err.println("Exception when calling AmenitiesApi#deleteAmenity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amenityId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If amenity deleted | - | +**404** | If params are invalid | - | + + +# **getAmenityDetails** +> GetAmenityDetailsResponse getAmenityDetails(amenityId) + + + +Get details about the amenity + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AmenitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AmenitiesApi apiInstance = new AmenitiesApi(defaultClient); + String amenityId = "amenityId_example"; // String | Id of the amenity to get details + try { + GetAmenityDetailsResponse result = apiInstance.getAmenityDetails(amenityId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AmenitiesApi#getAmenityDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amenityId** | **String**| Id of the amenity to get details | + +### Return type + +[**GetAmenityDetailsResponse**](GetAmenityDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If details found | - | +**404** | If params are invalid | - | + + +# **listAllAmenities** +> Set<GetAmenityDetailsResponse> listAllAmenities(communityId) + + + +Get all amenities of community + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AmenitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AmenitiesApi apiInstance = new AmenitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + try { + Set result = apiInstance.listAllAmenities(communityId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AmenitiesApi#listAllAmenities"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + +### Return type + +[**Set<GetAmenityDetailsResponse>**](GetAmenityDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns list of amenities | - | +**404** | If params are invalid | - | + + +# **updateAmenity** +> updateAmenity(amenityId, updateAmenityRequest) + + + +Update an amenity + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AmenitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + AmenitiesApi apiInstance = new AmenitiesApi(defaultClient); + String amenityId = "amenityId_example"; // String | + UpdateAmenityRequest updateAmenityRequest = new UpdateAmenityRequest(); // UpdateAmenityRequest | UpdateAmenityRequest update amenity + try { + apiInstance.updateAmenity(amenityId, updateAmenityRequest); + } catch (ApiException e) { + System.err.println("Exception when calling AmenitiesApi#updateAmenity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amenityId** | **String**| | + **updateAmenityRequest** | [**UpdateAmenityRequest**](UpdateAmenityRequest.md)| UpdateAmenityRequest update amenity | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If updated successfully | - | +**400** | If amenity is not found | - | + diff --git a/gen/docs/AmenityDto.md b/gen/docs/AmenityDto.md new file mode 100644 index 00000000..de22bda5 --- /dev/null +++ b/gen/docs/AmenityDto.md @@ -0,0 +1,17 @@ + + +# AmenityDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**amenityId** | **String** | | [optional] +**name** | **String** | | [optional] +**description** | **String** | | [optional] +**price** | **BigDecimal** | | [optional] +**communityId** | **String** | | [optional] + + + diff --git a/gen/docs/AuthenticationApi.md b/gen/docs/AuthenticationApi.md new file mode 100644 index 00000000..4a8f3efe --- /dev/null +++ b/gen/docs/AuthenticationApi.md @@ -0,0 +1,70 @@ +# AuthenticationApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**login**](AuthenticationApi.md#login) | **POST** /auth/login | + + + +# **login** +> login(loginRequest) + + + +Login user to system + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthenticationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + AuthenticationApi apiInstance = new AuthenticationApi(defaultClient); + LoginRequest loginRequest = new LoginRequest(); // LoginRequest | + try { + apiInstance.login(loginRequest); + } catch (ApiException e) { + System.err.println("Exception when calling AuthenticationApi#login"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loginRequest** | [**LoginRequest**](LoginRequest.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Login successful | - | + diff --git a/gen/docs/BookingsApi.md b/gen/docs/BookingsApi.md new file mode 100644 index 00000000..43cba7df --- /dev/null +++ b/gen/docs/BookingsApi.md @@ -0,0 +1,78 @@ +# BookingsApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteBooking**](BookingsApi.md#deleteBooking) | **DELETE** /amenities/{amenityId}/bookings/{bookingId} | + + + +# **deleteBooking** +> deleteBooking(amenityId, bookingId) + + + +Remove booking + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BookingsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + BookingsApi apiInstance = new BookingsApi(defaultClient); + String amenityId = "amenityId_example"; // String | + String bookingId = "bookingId_example"; // String | + try { + apiInstance.deleteBooking(amenityId, bookingId); + } catch (ApiException e) { + System.err.println("Exception when calling BookingsApi#deleteBooking"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **amenityId** | **String**| | + **bookingId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If booking deleted | - | +**404** | If params are invalid | - | + diff --git a/gen/docs/CommunitiesApi.md b/gen/docs/CommunitiesApi.md new file mode 100644 index 00000000..d08b94c3 --- /dev/null +++ b/gen/docs/CommunitiesApi.md @@ -0,0 +1,493 @@ +# CommunitiesApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addCommunityAdmins**](CommunitiesApi.md#addCommunityAdmins) | **POST** /communities/{communityId}/admins | +[**createCommunity**](CommunitiesApi.md#createCommunity) | **POST** /communities | +[**deleteCommunity**](CommunitiesApi.md#deleteCommunity) | **DELETE** /communities/{communityId} | +[**listAllCommunity**](CommunitiesApi.md#listAllCommunity) | **GET** /communities | +[**listCommunityAdmins**](CommunitiesApi.md#listCommunityAdmins) | **GET** /communities/{communityId}/admins | +[**listCommunityDetails**](CommunitiesApi.md#listCommunityDetails) | **GET** /communities/{communityId} | +[**removeAdminFromCommunity**](CommunitiesApi.md#removeAdminFromCommunity) | **DELETE** /communities/{communityId}/admins/{adminId} | + + + +# **addCommunityAdmins** +> AddCommunityAdminResponse addCommunityAdmins(communityId, addCommunityAdminRequest) + + + +Add a new admin to the community given a community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + AddCommunityAdminRequest addCommunityAdminRequest = new AddCommunityAdminRequest(); // AddCommunityAdminRequest | AddCommunityAdminRequest aggregate fields + try { + AddCommunityAdminResponse result = apiInstance.addCommunityAdmins(communityId, addCommunityAdminRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#addCommunityAdmins"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **addCommunityAdminRequest** | [**AddCommunityAdminRequest**](AddCommunityAdminRequest.md)| AddCommunityAdminRequest aggregate fields | + +### Return type + +[**AddCommunityAdminResponse**](AddCommunityAdminResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If admins were created | - | +**404** | If params are invalid | - | + + +# **createCommunity** +> CreateCommunityResponse createCommunity(createCommunityRequest) + + + +Create a new community + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + CreateCommunityRequest createCommunityRequest = new CreateCommunityRequest(); // CreateCommunityRequest | CreateCommunityRequest aggregate fields + try { + CreateCommunityResponse result = apiInstance.createCommunity(createCommunityRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#createCommunity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createCommunityRequest** | [**CreateCommunityRequest**](CreateCommunityRequest.md)| CreateCommunityRequest aggregate fields | + +### Return type + +[**CreateCommunityResponse**](CreateCommunityResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | If community was created | - | + + +# **deleteCommunity** +> deleteCommunity(communityId) + + + +Deletion community with given community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + try { + apiInstance.deleteCommunity(communityId); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#deleteCommunity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If community was removed | - | +**404** | If params are invalid | - | + + +# **listAllCommunity** +> GetCommunityDetailsResponse listAllCommunity(pageable) + + + +List all communities which are registered + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + Pageable pageable = new Pageable(); // Pageable | + try { + GetCommunityDetailsResponse result = apiInstance.listAllCommunity(pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#listAllCommunity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**GetCommunityDetailsResponse**](GetCommunityDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns list of communities | - | + + +# **listCommunityAdmins** +> ListCommunityAdminsResponse listCommunityAdmins(communityId, pageable) + + + +List all admins of the community given a community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + Pageable pageable = new Pageable(); // Pageable | + try { + ListCommunityAdminsResponse result = apiInstance.listCommunityAdmins(communityId, pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#listCommunityAdmins"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**ListCommunityAdminsResponse**](ListCommunityAdminsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If community exists | - | +**404** | If params are invalid | - | + + +# **listCommunityDetails** +> GetCommunityDetailsResponse listCommunityDetails(communityId) + + + +Get details about the community given a community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + try { + GetCommunityDetailsResponse result = apiInstance.listCommunityDetails(communityId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#listCommunityDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + +### Return type + +[**GetCommunityDetailsResponse**](GetCommunityDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If community exists | - | +**404** | If params are invalid | - | + + +# **removeAdminFromCommunity** +> removeAdminFromCommunity(communityId, adminId) + + + +Remove of admin associated with a community + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.CommunitiesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + CommunitiesApi apiInstance = new CommunitiesApi(defaultClient); + String communityId = "communityId_example"; // String | + String adminId = "adminId_example"; // String | + try { + apiInstance.removeAdminFromCommunity(communityId, adminId); + } catch (ApiException e) { + System.err.println("Exception when calling CommunitiesApi#removeAdminFromCommunity"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **adminId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If admin was removed | - | +**404** | If params are invalid | - | + diff --git a/gen/docs/CommunityHouseName.md b/gen/docs/CommunityHouseName.md new file mode 100644 index 00000000..2d4f793d --- /dev/null +++ b/gen/docs/CommunityHouseName.md @@ -0,0 +1,12 @@ + + +# CommunityHouseName + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] + + + diff --git a/gen/docs/CreateCommunityRequest.md b/gen/docs/CreateCommunityRequest.md new file mode 100644 index 00000000..043200a0 --- /dev/null +++ b/gen/docs/CreateCommunityRequest.md @@ -0,0 +1,13 @@ + + +# CreateCommunityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**district** | **String** | | + + + diff --git a/gen/docs/CreateCommunityResponse.md b/gen/docs/CreateCommunityResponse.md new file mode 100644 index 00000000..965eb686 --- /dev/null +++ b/gen/docs/CreateCommunityResponse.md @@ -0,0 +1,12 @@ + + +# CreateCommunityResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**communityId** | **String** | | + + + diff --git a/gen/docs/CreateUserRequest.md b/gen/docs/CreateUserRequest.md new file mode 100644 index 00000000..07e53220 --- /dev/null +++ b/gen/docs/CreateUserRequest.md @@ -0,0 +1,14 @@ + + +# CreateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**email** | **String** | | [optional] +**password** | **String** | | [optional] + + + diff --git a/gen/docs/CreateUserResponse.md b/gen/docs/CreateUserResponse.md new file mode 100644 index 00000000..70a7f9ef --- /dev/null +++ b/gen/docs/CreateUserResponse.md @@ -0,0 +1,14 @@ + + +# CreateUserResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | **String** | | [optional] +**name** | **String** | | [optional] +**email** | **String** | | [optional] + + + diff --git a/gen/docs/DocumentsApi.md b/gen/docs/DocumentsApi.md new file mode 100644 index 00000000..fc6385ff --- /dev/null +++ b/gen/docs/DocumentsApi.md @@ -0,0 +1,289 @@ +# DocumentsApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**deleteHouseMemberDocument**](DocumentsApi.md#deleteHouseMemberDocument) | **DELETE** /members/{memberId}/documents | +[**getHouseMemberDocument**](DocumentsApi.md#getHouseMemberDocument) | **GET** /members/{memberId}/documents | +[**updateHouseMemberDocument**](DocumentsApi.md#updateHouseMemberDocument) | **PUT** /members/{memberId}/documents | +[**uploadHouseMemberDocument**](DocumentsApi.md#uploadHouseMemberDocument) | **POST** /members/{memberId}/documents | + + + +# **deleteHouseMemberDocument** +> deleteHouseMemberDocument(memberId) + + + +Delete house member's documents + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DocumentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DocumentsApi apiInstance = new DocumentsApi(defaultClient); + String memberId = "memberId_example"; // String | + try { + apiInstance.deleteHouseMemberDocument(memberId); + } catch (ApiException e) { + System.err.println("Exception when calling DocumentsApi#deleteHouseMemberDocument"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If document deleted | - | +**404** | If params are invalid | - | + + +# **getHouseMemberDocument** +> byte[] getHouseMemberDocument(memberId) + + + +Returns house member's documents + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DocumentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DocumentsApi apiInstance = new DocumentsApi(defaultClient); + String memberId = "memberId_example"; // String | + try { + byte[] result = apiInstance.getHouseMemberDocument(memberId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling DocumentsApi#getHouseMemberDocument"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberId** | **String**| | + +### Return type + +**byte[]** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: image/jpeg + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If document present | - | +**404** | If params are invalid | - | + + +# **updateHouseMemberDocument** +> updateHouseMemberDocument(memberId, memberDocument) + + + +Update house member's documents + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DocumentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DocumentsApi apiInstance = new DocumentsApi(defaultClient); + String memberId = "memberId_example"; // String | + File memberDocument = new File("/path/to/file"); // File | + try { + apiInstance.updateHouseMemberDocument(memberId, memberDocument); + } catch (ApiException e) { + System.err.println("Exception when calling DocumentsApi#updateHouseMemberDocument"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberId** | **String**| | + **memberDocument** | **File**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If document updated | - | +**409** | If document update error | - | +**413** | If document file too large | - | +**404** | If params are invalid | - | + + +# **uploadHouseMemberDocument** +> uploadHouseMemberDocument(memberId, memberDocument) + + + +Add house member's documents + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.DocumentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + DocumentsApi apiInstance = new DocumentsApi(defaultClient); + String memberId = "memberId_example"; // String | + File memberDocument = new File("/path/to/file"); // File | + try { + apiInstance.uploadHouseMemberDocument(memberId, memberDocument); + } catch (ApiException e) { + System.err.println("Exception when calling DocumentsApi#uploadHouseMemberDocument"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberId** | **String**| | + **memberDocument** | **File**| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If document saved | - | +**409** | If document save error | - | +**413** | If document file too large | - | +**404** | If params are invalid | - | + diff --git a/gen/docs/ForgotPasswordRequest.md b/gen/docs/ForgotPasswordRequest.md new file mode 100644 index 00000000..332ac169 --- /dev/null +++ b/gen/docs/ForgotPasswordRequest.md @@ -0,0 +1,14 @@ + + +# ForgotPasswordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**token** | **String** | | [optional] +**newPassword** | **String** | | [optional] + + + diff --git a/gen/docs/GetAmenityDetailsResponse.md b/gen/docs/GetAmenityDetailsResponse.md new file mode 100644 index 00000000..c0645a8d --- /dev/null +++ b/gen/docs/GetAmenityDetailsResponse.md @@ -0,0 +1,13 @@ + + +# GetAmenityDetailsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amenityId** | **String** | | [optional] +**description** | **String** | | [optional] + + + diff --git a/gen/docs/GetCommunityDetailsResponse.md b/gen/docs/GetCommunityDetailsResponse.md new file mode 100644 index 00000000..88515f31 --- /dev/null +++ b/gen/docs/GetCommunityDetailsResponse.md @@ -0,0 +1,12 @@ + + +# GetCommunityDetailsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**communities** | [**Set<GetCommunityDetailsResponseCommunity>**](GetCommunityDetailsResponseCommunity.md) | | + + + diff --git a/gen/docs/GetCommunityDetailsResponseCommunity.md b/gen/docs/GetCommunityDetailsResponseCommunity.md new file mode 100644 index 00000000..4b17ac0b --- /dev/null +++ b/gen/docs/GetCommunityDetailsResponseCommunity.md @@ -0,0 +1,14 @@ + + +# GetCommunityDetailsResponseCommunity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**communityId** | **String** | | [optional] +**name** | **String** | | [optional] +**district** | **String** | | [optional] + + + diff --git a/gen/docs/GetHouseDetailsResponse.md b/gen/docs/GetHouseDetailsResponse.md new file mode 100644 index 00000000..f1c64cde --- /dev/null +++ b/gen/docs/GetHouseDetailsResponse.md @@ -0,0 +1,12 @@ + + +# GetHouseDetailsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**houses** | [**Set<GetHouseDetailsResponseCommunityHouse>**](GetHouseDetailsResponseCommunityHouse.md) | | + + + diff --git a/gen/docs/GetHouseDetailsResponseCommunityHouse.md b/gen/docs/GetHouseDetailsResponseCommunityHouse.md new file mode 100644 index 00000000..20c83009 --- /dev/null +++ b/gen/docs/GetHouseDetailsResponseCommunityHouse.md @@ -0,0 +1,13 @@ + + +# GetHouseDetailsResponseCommunityHouse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**houseId** | **String** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/gen/docs/GetUserDetailsResponse.md b/gen/docs/GetUserDetailsResponse.md new file mode 100644 index 00000000..7668edfc --- /dev/null +++ b/gen/docs/GetUserDetailsResponse.md @@ -0,0 +1,12 @@ + + +# GetUserDetailsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**users** | [**Set<GetUserDetailsResponseUser>**](GetUserDetailsResponseUser.md) | | + + + diff --git a/gen/docs/GetUserDetailsResponseUser.md b/gen/docs/GetUserDetailsResponseUser.md new file mode 100644 index 00000000..d60279de --- /dev/null +++ b/gen/docs/GetUserDetailsResponseUser.md @@ -0,0 +1,15 @@ + + +# GetUserDetailsResponseUser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**userId** | **String** | | [optional] +**name** | **String** | | [optional] +**email** | **String** | | [optional] +**communityIds** | **Set<String>** | | [optional] + + + diff --git a/gen/docs/HouseMember.md b/gen/docs/HouseMember.md new file mode 100644 index 00000000..8fdeb762 --- /dev/null +++ b/gen/docs/HouseMember.md @@ -0,0 +1,13 @@ + + +# HouseMember + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memberId** | **String** | | +**name** | **String** | | + + + diff --git a/gen/docs/HouseMemberDto.md b/gen/docs/HouseMemberDto.md new file mode 100644 index 00000000..961f7c04 --- /dev/null +++ b/gen/docs/HouseMemberDto.md @@ -0,0 +1,14 @@ + + +# HouseMemberDto + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Long** | | [optional] +**memberId** | **String** | | +**name** | **String** | | + + + diff --git a/gen/docs/HousesApi.md b/gen/docs/HousesApi.md new file mode 100644 index 00000000..a5911c73 --- /dev/null +++ b/gen/docs/HousesApi.md @@ -0,0 +1,564 @@ +# HousesApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**addCommunityHouses**](HousesApi.md#addCommunityHouses) | **POST** /communities/{communityId}/houses | +[**addHouseMembers**](HousesApi.md#addHouseMembers) | **POST** /houses/{houseId}/members | +[**deleteHouseMember**](HousesApi.md#deleteHouseMember) | **DELETE** /houses/{houseId}/members/{memberId} | +[**getHouseDetails**](HousesApi.md#getHouseDetails) | **GET** /houses/{houseId} | +[**listAllHouses**](HousesApi.md#listAllHouses) | **GET** /houses | +[**listAllMembersOfHouse**](HousesApi.md#listAllMembersOfHouse) | **GET** /houses/{houseId}/members | +[**listCommunityHouses**](HousesApi.md#listCommunityHouses) | **GET** /communities/{communityId}/houses | +[**removeCommunityHouse**](HousesApi.md#removeCommunityHouse) | **DELETE** /communities/{communityId}/houses/{houseId} | + + + +# **addCommunityHouses** +> AddCommunityHouseResponse addCommunityHouses(communityId, addCommunityHouseRequest) + + + +Add a new house to the community given a community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String communityId = "communityId_example"; // String | + AddCommunityHouseRequest addCommunityHouseRequest = new AddCommunityHouseRequest(); // AddCommunityHouseRequest | AddCommunityHouseRequest aggregate fields + try { + AddCommunityHouseResponse result = apiInstance.addCommunityHouses(communityId, addCommunityHouseRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#addCommunityHouses"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **addCommunityHouseRequest** | [**AddCommunityHouseRequest**](AddCommunityHouseRequest.md)| AddCommunityHouseRequest aggregate fields | + +### Return type + +[**AddCommunityHouseResponse**](AddCommunityHouseResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If houses were added | - | +**400** | If params are invalid | - | + + +# **addHouseMembers** +> AddHouseMemberResponse addHouseMembers(houseId, addHouseMemberRequest) + + + +Add new members to the house given a house id. Responds with member id which were added + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String houseId = "houseId_example"; // String | + AddHouseMemberRequest addHouseMemberRequest = new AddHouseMemberRequest(); // AddHouseMemberRequest | AddHouseMemberRequest aggregate fields + try { + AddHouseMemberResponse result = apiInstance.addHouseMembers(houseId, addHouseMemberRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#addHouseMembers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **houseId** | **String**| | + **addHouseMemberRequest** | [**AddHouseMemberRequest**](AddHouseMemberRequest.md)| AddHouseMemberRequest aggregate fields | + +### Return type + +[**AddHouseMemberResponse**](AddHouseMemberResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | If members were added to house | - | +**404** | If parameters are invalid | - | + + +# **deleteHouseMember** +> deleteHouseMember(houseId, memberId) + + + +Deletion of member associated with a house + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String houseId = "houseId_example"; // String | + String memberId = "memberId_example"; // String | + try { + apiInstance.deleteHouseMember(houseId, memberId); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#deleteHouseMember"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **houseId** | **String**| | + **memberId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If house member was removed from house | - | +**400** | If params are invalid | - | + + +# **getHouseDetails** +> GetHouseDetailsResponse getHouseDetails(houseId) + + + +Get house detail by a given ID + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String houseId = "houseId_example"; // String | ID of the house to get + try { + GetHouseDetailsResponse result = apiInstance.getHouseDetails(houseId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#getHouseDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **houseId** | **String**| ID of the house to get | + +### Return type + +[**GetHouseDetailsResponse**](GetHouseDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If house present | - | +**404** | If params are invalid | - | + + +# **listAllHouses** +> GetHouseDetailsResponse listAllHouses(pageable) + + + +List all houses of the community given a community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + Pageable pageable = new Pageable(); // Pageable | + try { + GetHouseDetailsResponse result = apiInstance.listAllHouses(pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#listAllHouses"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**GetHouseDetailsResponse**](GetHouseDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If community exists | - | + + +# **listAllMembersOfHouse** +> ListHouseMembersResponse listAllMembersOfHouse(houseId, pageable) + + + +List all members of the house given a house id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String houseId = "houseId_example"; // String | + Pageable pageable = new Pageable(); // Pageable | + try { + ListHouseMembersResponse result = apiInstance.listAllMembersOfHouse(houseId, pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#listAllMembersOfHouse"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **houseId** | **String**| | + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**ListHouseMembersResponse**](ListHouseMembersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If house present | - | +**404** | If params are invalid | - | + + +# **listCommunityHouses** +> GetHouseDetailsResponse listCommunityHouses(communityId, pageable) + + + +List all houses of the community given a community id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String communityId = "communityId_example"; // String | + Pageable pageable = new Pageable(); // Pageable | + try { + GetHouseDetailsResponse result = apiInstance.listCommunityHouses(communityId, pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#listCommunityHouses"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**GetHouseDetailsResponse**](GetHouseDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If community exists | - | +**404** | If params are invalid | - | + + +# **removeCommunityHouse** +> removeCommunityHouse(communityId, houseId) + + + +Remove of house from the community given a community id and a house id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HousesApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + HousesApi apiInstance = new HousesApi(defaultClient); + String communityId = "communityId_example"; // String | + String houseId = "houseId_example"; // String | + try { + apiInstance.removeCommunityHouse(communityId, houseId); + } catch (ApiException e) { + System.err.println("Exception when calling HousesApi#removeCommunityHouse"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| | + **houseId** | **String**| | + +### Return type + +null (empty response body) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | If house was removed | - | +**400** | If params are invalid | - | + diff --git a/gen/docs/ListAdminPaymentsResponse.md b/gen/docs/ListAdminPaymentsResponse.md new file mode 100644 index 00000000..81cf5302 --- /dev/null +++ b/gen/docs/ListAdminPaymentsResponse.md @@ -0,0 +1,13 @@ + + +# ListAdminPaymentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payments** | [**Set<AdminPayment>**](AdminPayment.md) | | [optional] +**pageInfo** | [**PageInfo**](PageInfo.md) | | [optional] + + + diff --git a/gen/docs/ListCommunityAdminsResponse.md b/gen/docs/ListCommunityAdminsResponse.md new file mode 100644 index 00000000..47b76a88 --- /dev/null +++ b/gen/docs/ListCommunityAdminsResponse.md @@ -0,0 +1,12 @@ + + +# ListCommunityAdminsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admins** | [**Set<ListCommunityAdminsResponseCommunityAdmin>**](ListCommunityAdminsResponseCommunityAdmin.md) | | + + + diff --git a/gen/docs/ListCommunityAdminsResponseCommunityAdmin.md b/gen/docs/ListCommunityAdminsResponseCommunityAdmin.md new file mode 100644 index 00000000..b6e4a53f --- /dev/null +++ b/gen/docs/ListCommunityAdminsResponseCommunityAdmin.md @@ -0,0 +1,12 @@ + + +# ListCommunityAdminsResponseCommunityAdmin + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**adminId** | **String** | | [optional] + + + diff --git a/gen/docs/ListHouseMembersResponse.md b/gen/docs/ListHouseMembersResponse.md new file mode 100644 index 00000000..23c24f84 --- /dev/null +++ b/gen/docs/ListHouseMembersResponse.md @@ -0,0 +1,12 @@ + + +# ListHouseMembersResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**members** | [**Set<HouseMember>**](HouseMember.md) | | + + + diff --git a/gen/docs/ListMemberPaymentsResponse.md b/gen/docs/ListMemberPaymentsResponse.md new file mode 100644 index 00000000..ac4ea3de --- /dev/null +++ b/gen/docs/ListMemberPaymentsResponse.md @@ -0,0 +1,12 @@ + + +# ListMemberPaymentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payments** | [**Set<MemberPayment>**](MemberPayment.md) | | [optional] + + + diff --git a/gen/docs/LoginRequest.md b/gen/docs/LoginRequest.md new file mode 100644 index 00000000..a3539572 --- /dev/null +++ b/gen/docs/LoginRequest.md @@ -0,0 +1,13 @@ + + +# LoginRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**password** | **String** | | [optional] + + + diff --git a/gen/docs/MemberPayment.md b/gen/docs/MemberPayment.md new file mode 100644 index 00000000..6a99bf0f --- /dev/null +++ b/gen/docs/MemberPayment.md @@ -0,0 +1,15 @@ + + +# MemberPayment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**memberId** | **String** | | [optional] +**paymentId** | **String** | | [optional] +**charge** | **BigDecimal** | | [optional] +**dueDate** | **String** | | [optional] + + + diff --git a/gen/docs/PageInfo.md b/gen/docs/PageInfo.md new file mode 100644 index 00000000..51bc559b --- /dev/null +++ b/gen/docs/PageInfo.md @@ -0,0 +1,16 @@ + + +# PageInfo + +Page info +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**currentPage** | **Integer** | | [optional] +**pageLimit** | **Integer** | | [optional] +**totalPages** | **Integer** | | [optional] +**totalElements** | **Long** | | [optional] + + + diff --git a/gen/docs/Pageable.md b/gen/docs/Pageable.md new file mode 100644 index 00000000..f3219c8b --- /dev/null +++ b/gen/docs/Pageable.md @@ -0,0 +1,14 @@ + + +# Pageable + +Pageable query parameters +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **Integer** | | [optional] +**size** | **Integer** | | [optional] + + + diff --git a/gen/docs/PaymentsApi.md b/gen/docs/PaymentsApi.md new file mode 100644 index 00000000..862f4abf --- /dev/null +++ b/gen/docs/PaymentsApi.md @@ -0,0 +1,287 @@ +# PaymentsApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**listAllAdminScheduledPayments**](PaymentsApi.md#listAllAdminScheduledPayments) | **GET** /communities/{communityId}/admins/{adminId}/payments | +[**listAllMemberPayments**](PaymentsApi.md#listAllMemberPayments) | **GET** /members/{memberId}/payments | +[**listPaymentDetails**](PaymentsApi.md#listPaymentDetails) | **GET** /payments/{paymentId} | +[**schedulePayment**](PaymentsApi.md#schedulePayment) | **POST** /payments | + + + +# **listAllAdminScheduledPayments** +> ListAdminPaymentsResponse listAllAdminScheduledPayments(communityId, adminId, pageable) + + + +Get all payments scheduled by the specified admin + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PaymentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + PaymentsApi apiInstance = new PaymentsApi(defaultClient); + String communityId = "communityId_example"; // String | The id of community + String adminId = "adminId_example"; // String | The id of admin + Pageable pageable = new Pageable(); // Pageable | + try { + ListAdminPaymentsResponse result = apiInstance.listAllAdminScheduledPayments(communityId, adminId, pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PaymentsApi#listAllAdminScheduledPayments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **communityId** | **String**| The id of community | + **adminId** | **String**| The id of admin | + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**ListAdminPaymentsResponse**](ListAdminPaymentsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If communityId and adminId are valid. Response body has the details | - | +**404** | If communityId or adminId are invalid | - | + + +# **listAllMemberPayments** +> ListMemberPaymentsResponse listAllMemberPayments(memberId) + + + +Get all payments for the specified member + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PaymentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + PaymentsApi apiInstance = new PaymentsApi(defaultClient); + String memberId = "memberId_example"; // String | Member Id to use for getting all payments + try { + ListMemberPaymentsResponse result = apiInstance.listAllMemberPayments(memberId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PaymentsApi#listAllMemberPayments"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **memberId** | **String**| Member Id to use for getting all payments | + +### Return type + +[**ListMemberPaymentsResponse**](ListMemberPaymentsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If memberId is valid. Response body has the details | - | +**404** | If memberId is invalid | - | + + +# **listPaymentDetails** +> SchedulePaymentResponse listPaymentDetails(paymentId) + + + +Get details about a payment with the given payment id + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PaymentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + PaymentsApi apiInstance = new PaymentsApi(defaultClient); + String paymentId = "paymentId_example"; // String | Payment ID + try { + SchedulePaymentResponse result = apiInstance.listPaymentDetails(paymentId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PaymentsApi#listPaymentDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **paymentId** | **String**| Payment ID | + +### Return type + +[**SchedulePaymentResponse**](SchedulePaymentResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If payment is valid. Response body has the details | - | +**404** | If paymentId is invalid | - | + + +# **schedulePayment** +> SchedulePaymentResponse schedulePayment(schedulePaymentRequest) + + + +Schedule a new payment + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PaymentsApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + PaymentsApi apiInstance = new PaymentsApi(defaultClient); + SchedulePaymentRequest schedulePaymentRequest = new SchedulePaymentRequest(); // SchedulePaymentRequest | CreateUserRequest aggregate fields + try { + SchedulePaymentResponse result = apiInstance.schedulePayment(schedulePaymentRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PaymentsApi#schedulePayment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **schedulePaymentRequest** | [**SchedulePaymentRequest**](SchedulePaymentRequest.md)| CreateUserRequest aggregate fields | + +### Return type + +[**SchedulePaymentResponse**](SchedulePaymentResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | If schedule payment is created | - | + diff --git a/gen/docs/SchedulePaymentRequest.md b/gen/docs/SchedulePaymentRequest.md new file mode 100644 index 00000000..9f6d9690 --- /dev/null +++ b/gen/docs/SchedulePaymentRequest.md @@ -0,0 +1,18 @@ + + +# SchedulePaymentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **String** | | [optional] +**description** | **String** | | +**recurring** | **Boolean** | | [optional] +**charge** | **BigDecimal** | | [optional] +**dueDate** | **String** | | [optional] +**adminId** | **String** | | [optional] +**memberId** | **String** | | [optional] + + + diff --git a/gen/docs/SchedulePaymentResponse.md b/gen/docs/SchedulePaymentResponse.md new file mode 100644 index 00000000..d683a03c --- /dev/null +++ b/gen/docs/SchedulePaymentResponse.md @@ -0,0 +1,19 @@ + + +# SchedulePaymentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**paymentId** | **String** | | [optional] +**charge** | **BigDecimal** | | [optional] +**type** | **String** | | [optional] +**description** | **String** | | [optional] +**recurring** | **Boolean** | | [optional] +**dueDate** | **String** | | [optional] +**adminId** | **String** | | [optional] +**memberId** | **String** | | [optional] + + + diff --git a/gen/docs/UpdateAmenityRequest.md b/gen/docs/UpdateAmenityRequest.md new file mode 100644 index 00000000..f26142ae --- /dev/null +++ b/gen/docs/UpdateAmenityRequest.md @@ -0,0 +1,15 @@ + + +# UpdateAmenityRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**description** | **String** | | [optional] +**price** | **Long** | | [optional] +**communityId** | **String** | | [optional] + + + diff --git a/gen/docs/UsersApi.md b/gen/docs/UsersApi.md new file mode 100644 index 00000000..75d57488 --- /dev/null +++ b/gen/docs/UsersApi.md @@ -0,0 +1,472 @@ +# UsersApi + +All URIs are relative to *http://localhost:8080* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**confirmEmail**](UsersApi.md#confirmEmail) | **GET** /users/{userId}/email-confirm/{emailConfirmToken} | +[**getUserDetails**](UsersApi.md#getUserDetails) | **GET** /users/{userId} | +[**listAllHousemates**](UsersApi.md#listAllHousemates) | **GET** /users/{userId}/housemates | +[**listAllUsers**](UsersApi.md#listAllUsers) | **GET** /users | +[**resendConfirmEmailMail**](UsersApi.md#resendConfirmEmailMail) | **GET** /users/{userId}/email-confirm-resend | +[**signUp**](UsersApi.md#signUp) | **POST** /users | +[**usersPasswordPost**](UsersApi.md#usersPasswordPost) | **POST** /users/password | + + + +# **confirmEmail** +> confirmEmail(userId, emailConfirmToken) + + + +Confirm user email + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | Id of the user for confirm email + String emailConfirmToken = "emailConfirmToken_example"; // String | Tocken from user email + try { + apiInstance.confirmEmail(userId, emailConfirmToken); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#confirmEmail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| Id of the user for confirm email | + **emailConfirmToken** | **String**| Tocken from user email | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Email was successfully confirmed | - | +**400** | Email confirmation error | - | + + +# **getUserDetails** +> GetUserDetailsResponseUser getUserDetails(userId) + + + +Get details of a user given userId + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | ID of the user to get + try { + GetUserDetailsResponseUser result = apiInstance.getUserDetails(userId); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#getUserDetails"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| ID of the user to get | + +### Return type + +[**GetUserDetailsResponseUser**](GetUserDetailsResponseUser.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If userId is valid. Response body has the details | - | +**404** | If userId is invalid | - | + + +# **listAllHousemates** +> ListHouseMembersResponse listAllHousemates(userId, pageable) + + + +Lists all members from all houses of a user + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | ID of the user for which to find housemates + Pageable pageable = new Pageable(); // Pageable | + try { + ListHouseMembersResponse result = apiInstance.listAllHousemates(userId, pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listAllHousemates"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| ID of the user for which to find housemates | + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**ListHouseMembersResponse**](ListHouseMembersResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns list of all members from all houses of the specified user | - | + + +# **listAllUsers** +> GetUserDetailsResponse listAllUsers(pageable) + + + +Lists all users + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + // Configure HTTP bearer authorization: bearerAuth + HttpBearerAuth bearerAuth = (HttpBearerAuth) defaultClient.getAuthentication("bearerAuth"); + bearerAuth.setBearerToken("BEARER TOKEN"); + + UsersApi apiInstance = new UsersApi(defaultClient); + Pageable pageable = new Pageable(); // Pageable | + try { + GetUserDetailsResponse result = apiInstance.listAllUsers(pageable); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#listAllUsers"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageable** | [**Pageable**](.md)| | [optional] + +### Return type + +[**GetUserDetailsResponse**](GetUserDetailsResponse.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Returns list of users | - | + + +# **resendConfirmEmailMail** +> resendConfirmEmailMail(userId) + + + +Resend email confirm mail + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String userId = "userId_example"; // String | ID of the user for resend confirm email + try { + apiInstance.resendConfirmEmailMail(userId); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#resendConfirmEmailMail"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **String**| ID of the user for resend confirm email | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Email was successfully send | - | +**400** | Email send error | - | + + +# **signUp** +> CreateUserResponse signUp(createUserRequest) + + + +Create a new user + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + UsersApi apiInstance = new UsersApi(defaultClient); + CreateUserRequest createUserRequest = new CreateUserRequest(); // CreateUserRequest | CreateUserRequest aggregate fields + try { + CreateUserResponse result = apiInstance.signUp(createUserRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#signUp"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **createUserRequest** | [**CreateUserRequest**](CreateUserRequest.md)| CreateUserRequest aggregate fields | + +### Return type + +[**CreateUserResponse**](CreateUserResponse.md) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: application/json, application/xml + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | If user created | - | +**409** | If user already exists | - | + + +# **usersPasswordPost** +> usersPasswordPost(action, forgotPasswordRequest) + + + +Request reset password or reset password + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.UsersApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:8080"); + + UsersApi apiInstance = new UsersApi(defaultClient); + String action = "action_example"; // String | Acton with user password (forgot or reset) + ForgotPasswordRequest forgotPasswordRequest = new ForgotPasswordRequest(); // ForgotPasswordRequest | + try { + apiInstance.usersPasswordPost(action, forgotPasswordRequest); + } catch (ApiException e) { + System.err.println("Exception when calling UsersApi#usersPasswordPost"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **action** | **String**| Acton with user password (forgot or reset) | [enum: FORGOT, RESET] + **forgotPasswordRequest** | [**ForgotPasswordRequest**](ForgotPasswordRequest.md)| | + +### Return type + +null (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | If password reset | - | +**400** | If wrong password reset token | - | + diff --git a/gen/git_push.sh b/gen/git_push.sh new file mode 100644 index 00000000..ced3be2b --- /dev/null +++ b/gen/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/gen/gradle.properties b/gen/gradle.properties new file mode 100644 index 00000000..05644f07 --- /dev/null +++ b/gen/gradle.properties @@ -0,0 +1,2 @@ +# Uncomment to build for Android +#target = android \ No newline at end of file diff --git a/gen/gradle/wrapper/gradle-wrapper.jar b/gen/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..e708b1c0 Binary files /dev/null and b/gen/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gen/gradle/wrapper/gradle-wrapper.properties b/gen/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..4d9ca164 --- /dev/null +++ b/gen/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gen/gradlew b/gen/gradlew new file mode 100644 index 00000000..4f906e0c --- /dev/null +++ b/gen/gradlew @@ -0,0 +1,185 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/gen/gradlew.bat b/gen/gradlew.bat new file mode 100644 index 00000000..107acd32 --- /dev/null +++ b/gen/gradlew.bat @@ -0,0 +1,89 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto execute + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/gen/pom.xml b/gen/pom.xml new file mode 100644 index 00000000..e0fd8589 --- /dev/null +++ b/gen/pom.xml @@ -0,0 +1,282 @@ + + 4.0.0 + org.openapitools + openapi-java-client + jar + openapi-java-client + 2.0.0 + https://github.com/openapitools/openapi-generator + OpenAPI Java + + scm:git:git@github.com:openapitools/openapi-generator.git + scm:git:git@github.com:openapitools/openapi-generator.git + https://github.com/openapitools/openapi-generator + + + + + Unlicense + http://unlicense.org + repo + + + + + + OpenAPI-Generator Contributors + team@openapitools.org + OpenAPITools.org + http://openapitools.org + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + true + 128m + 512m + + -Xlint:all + -J-Xss4m + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M4 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + 10 + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.1.1 + + + attach-javadocs + + jar + + + + + none + + + http.response.details + a + Http Response Details: + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.squareup.okhttp3 + okhttp + ${okhttp-version} + + + com.squareup.okhttp3 + logging-interceptor + ${okhttp-version} + + + com.google.code.gson + gson + ${gson-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + + org.apache.commons + commons-lang3 + ${commons-lang3-version} + + + org.threeten + threetenbp + ${threetenbp-version} + + + javax.annotation + javax.annotation-api + ${javax-annotation-version} + provided + + + + junit + junit + ${junit-version} + test + + + + 1.7 + ${java.version} + ${java.version} + 1.8.4 + 1.5.24 + 3.14.7 + 2.8.6 + 3.10 + 1.4.3 + 1.3.2 + 4.13.1 + UTF-8 + + diff --git a/gen/settings.gradle b/gen/settings.gradle new file mode 100644 index 00000000..369ba54a --- /dev/null +++ b/gen/settings.gradle @@ -0,0 +1 @@ +rootProject.name = "openapi-java-client" \ No newline at end of file diff --git a/gen/src/main/AndroidManifest.xml b/gen/src/main/AndroidManifest.xml new file mode 100644 index 00000000..54fbcb3d --- /dev/null +++ b/gen/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + + diff --git a/gen/src/main/java/org/openapitools/client/ApiCallback.java b/gen/src/main/java/org/openapitools/client/ApiCallback.java new file mode 100644 index 00000000..437c51e6 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ApiCallback.java @@ -0,0 +1,62 @@ +/* + * 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.io.IOException; + +import java.util.Map; +import java.util.List; + +/** + * Callback for asynchronous API call. + * + * @param The return type + */ +public interface ApiCallback { + /** + * This is called when the API call fails. + * + * @param e The exception causing the failure + * @param statusCode Status code of the response if available, otherwise it would be 0 + * @param responseHeaders Headers of the response if available, otherwise it would be null + */ + void onFailure(ApiException e, int statusCode, Map> responseHeaders); + + /** + * This is called when the API call succeeded. + * + * @param result The result deserialized from response + * @param statusCode Status code of the response + * @param responseHeaders Headers of the response + */ + void onSuccess(T result, int statusCode, Map> responseHeaders); + + /** + * This is called when the API upload processing. + * + * @param bytesWritten bytes Written + * @param contentLength content length of request body + * @param done write end + */ + void onUploadProgress(long bytesWritten, long contentLength, boolean done); + + /** + * This is called when the API downlond processing. + * + * @param bytesRead bytes Read + * @param contentLength content lenngth of the response + * @param done Read end + */ + void onDownloadProgress(long bytesRead, long contentLength, boolean done); +} diff --git a/gen/src/main/java/org/openapitools/client/ApiClient.java b/gen/src/main/java/org/openapitools/client/ApiClient.java new file mode 100644 index 00000000..bc3b8082 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ApiClient.java @@ -0,0 +1,1363 @@ +/* + * 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 okhttp3.*; +import okhttp3.internal.http.HttpMethod; +import okhttp3.internal.tls.OkHostnameVerifier; +import okhttp3.logging.HttpLoggingInterceptor; +import okhttp3.logging.HttpLoggingInterceptor.Level; +import okio.BufferedSink; +import okio.Okio; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.format.DateTimeFormatter; + +import javax.net.ssl.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.lang.reflect.Type; +import java.net.URI; +import java.net.URLConnection; +import java.net.URLEncoder; +import java.security.GeneralSecurityException; +import java.security.KeyStore; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.cert.X509Certificate; +import java.text.DateFormat; +import java.util.*; +import java.util.Map.Entry; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.openapitools.client.auth.Authentication; +import org.openapitools.client.auth.HttpBasicAuth; +import org.openapitools.client.auth.HttpBearerAuth; +import org.openapitools.client.auth.ApiKeyAuth; + +public class ApiClient { + + private String basePath = "http://localhost:8080"; + private boolean debugging = false; + private Map defaultHeaderMap = new HashMap(); + private Map defaultCookieMap = new HashMap(); + private String tempFolderPath = null; + + private Map authentications; + + private DateFormat dateFormat; + private DateFormat datetimeFormat; + private boolean lenientDatetimeFormat; + private int dateLength; + + private InputStream sslCaCert; + private boolean verifyingSsl; + private KeyManager[] keyManagers; + + private OkHttpClient httpClient; + private JSON json; + + private HttpLoggingInterceptor loggingInterceptor; + + /* + * Basic constructor for ApiClient + */ + public ApiClient() { + init(); + initHttpClient(); + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("bearerAuth", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + /* + * Basic constructor with custom OkHttpClient + */ + public ApiClient(OkHttpClient client) { + init(); + + httpClient = client; + + // Setup authentications (key: authentication name, value: authentication). + authentications.put("bearerAuth", new HttpBearerAuth("bearer")); + // Prevent the authentications from being modified. + authentications = Collections.unmodifiableMap(authentications); + } + + private void initHttpClient() { + initHttpClient(Collections.emptyList()); + } + + private void initHttpClient(List interceptors) { + OkHttpClient.Builder builder = new OkHttpClient.Builder(); + builder.addNetworkInterceptor(getProgressInterceptor()); + for (Interceptor interceptor: interceptors) { + builder.addInterceptor(interceptor); + } + + httpClient = builder.build(); + } + + private void init() { + verifyingSsl = true; + + json = new JSON(); + + // Set default User-Agent. + setUserAgent("OpenAPI-Generator/2.0.0/java"); + + authentications = new HashMap(); + } + + /** + * Get base path + * + * @return Base path + */ + public String getBasePath() { + return basePath; + } + + /** + * Set base path + * + * @param basePath Base path of the URL (e.g http://localhost:8080 + * @return An instance of OkHttpClient + */ + public ApiClient setBasePath(String basePath) { + this.basePath = basePath; + return this; + } + + /** + * Get HTTP client + * + * @return An instance of OkHttpClient + */ + public OkHttpClient getHttpClient() { + return httpClient; + } + + /** + * Set HTTP client, which must never be null. + * + * @param newHttpClient An instance of OkHttpClient + * @return Api Client + * @throws NullPointerException when newHttpClient is null + */ + public ApiClient setHttpClient(OkHttpClient newHttpClient) { + this.httpClient = Objects.requireNonNull(newHttpClient, "HttpClient must not be null!"); + return this; + } + + /** + * Get JSON + * + * @return JSON object + */ + public JSON getJSON() { + return json; + } + + /** + * Set JSON + * + * @param json JSON object + * @return Api client + */ + public ApiClient setJSON(JSON json) { + this.json = json; + return this; + } + + /** + * True if isVerifyingSsl flag is on + * + * @return True if isVerifySsl flag is on + */ + public boolean isVerifyingSsl() { + return verifyingSsl; + } + + /** + * Configure whether to verify certificate and hostname when making https requests. + * Default to true. + * NOTE: Do NOT set to false in production code, otherwise you would face multiple types of cryptographic attacks. + * + * @param verifyingSsl True to verify TLS/SSL connection + * @return ApiClient + */ + public ApiClient setVerifyingSsl(boolean verifyingSsl) { + this.verifyingSsl = verifyingSsl; + applySslSettings(); + return this; + } + + /** + * Get SSL CA cert. + * + * @return Input stream to the SSL CA cert + */ + public InputStream getSslCaCert() { + return sslCaCert; + } + + /** + * Configure the CA certificate to be trusted when making https requests. + * Use null to reset to default. + * + * @param sslCaCert input stream for SSL CA cert + * @return ApiClient + */ + public ApiClient setSslCaCert(InputStream sslCaCert) { + this.sslCaCert = sslCaCert; + applySslSettings(); + return this; + } + + public KeyManager[] getKeyManagers() { + return keyManagers; + } + + /** + * Configure client keys to use for authorization in an SSL session. + * Use null to reset to default. + * + * @param managers The KeyManagers to use + * @return ApiClient + */ + public ApiClient setKeyManagers(KeyManager[] managers) { + this.keyManagers = managers; + applySslSettings(); + return this; + } + + public DateFormat getDateFormat() { + return dateFormat; + } + + public ApiClient setDateFormat(DateFormat dateFormat) { + this.json.setDateFormat(dateFormat); + return this; + } + + public ApiClient setSqlDateFormat(DateFormat dateFormat) { + this.json.setSqlDateFormat(dateFormat); + return this; + } + + public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + this.json.setOffsetDateTimeFormat(dateFormat); + return this; + } + + public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { + this.json.setLocalDateFormat(dateFormat); + return this; + } + + public ApiClient setLenientOnJson(boolean lenientOnJson) { + this.json.setLenientOnJson(lenientOnJson); + return this; + } + + /** + * Get authentications (key: authentication name, value: authentication). + * + * @return Map of authentication objects + */ + public Map getAuthentications() { + return authentications; + } + + /** + * Get authentication for the given name. + * + * @param authName The authentication name + * @return The authentication, null if not found + */ + public Authentication getAuthentication(String authName) { + return authentications.get(authName); + } + + /** + * Helper method to set access token for the first Bearer authentication. + * @param bearerToken Bearer token + */ + public void setBearerToken(String bearerToken) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBearerAuth) { + ((HttpBearerAuth) auth).setBearerToken(bearerToken); + return; + } + } + throw new RuntimeException("No Bearer authentication configured!"); + } + + /** + * Helper method to set username for the first HTTP basic authentication. + * + * @param username Username + */ + public void setUsername(String username) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setUsername(username); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set password for the first HTTP basic authentication. + * + * @param password Password + */ + public void setPassword(String password) { + for (Authentication auth : authentications.values()) { + if (auth instanceof HttpBasicAuth) { + ((HttpBasicAuth) auth).setPassword(password); + return; + } + } + throw new RuntimeException("No HTTP basic authentication configured!"); + } + + /** + * Helper method to set API key value for the first API key authentication. + * + * @param apiKey API key + */ + public void setApiKey(String apiKey) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKey(apiKey); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set API key prefix for the first API key authentication. + * + * @param apiKeyPrefix API key prefix + */ + public void setApiKeyPrefix(String apiKeyPrefix) { + for (Authentication auth : authentications.values()) { + if (auth instanceof ApiKeyAuth) { + ((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix); + return; + } + } + throw new RuntimeException("No API key authentication configured!"); + } + + /** + * Helper method to set access token for the first OAuth2 authentication. + * + * @param accessToken Access token + */ + public void setAccessToken(String accessToken) { + throw new RuntimeException("No OAuth2 authentication configured!"); + } + + /** + * Set the User-Agent header's value (by adding to the default header map). + * + * @param userAgent HTTP request's user agent + * @return ApiClient + */ + public ApiClient setUserAgent(String userAgent) { + addDefaultHeader("User-Agent", userAgent); + return this; + } + + /** + * Add a default header. + * + * @param key The header's key + * @param value The header's value + * @return ApiClient + */ + public ApiClient addDefaultHeader(String key, String value) { + defaultHeaderMap.put(key, value); + return this; + } + + /** + * Add a default cookie. + * + * @param key The cookie's key + * @param value The cookie's value + * @return ApiClient + */ + public ApiClient addDefaultCookie(String key, String value) { + defaultCookieMap.put(key, value); + return this; + } + + /** + * Check that whether debugging is enabled for this API client. + * + * @return True if debugging is enabled, false otherwise. + */ + public boolean isDebugging() { + return debugging; + } + + /** + * Enable/disable debugging for this API client. + * + * @param debugging To enable (true) or disable (false) debugging + * @return ApiClient + */ + public ApiClient setDebugging(boolean debugging) { + if (debugging != this.debugging) { + if (debugging) { + loggingInterceptor = new HttpLoggingInterceptor(); + loggingInterceptor.setLevel(Level.BODY); + httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build(); + } else { + final OkHttpClient.Builder builder = httpClient.newBuilder(); + builder.interceptors().remove(loggingInterceptor); + httpClient = builder.build(); + loggingInterceptor = null; + } + } + this.debugging = debugging; + return this; + } + + /** + * The path of temporary folder used to store downloaded files from endpoints + * with file response. The default value is null, i.e. using + * the system's default tempopary folder. + * + * @see createTempFile + * @return Temporary folder path + */ + public String getTempFolderPath() { + return tempFolderPath; + } + + /** + * Set the temporary folder path (for downloading files) + * + * @param tempFolderPath Temporary folder path + * @return ApiClient + */ + public ApiClient setTempFolderPath(String tempFolderPath) { + this.tempFolderPath = tempFolderPath; + return this; + } + + /** + * Get connection timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getConnectTimeout() { + return httpClient.connectTimeoutMillis(); + } + + /** + * Sets the connect timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param connectionTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setConnectTimeout(int connectionTimeout) { + httpClient = httpClient.newBuilder().connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get read timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getReadTimeout() { + return httpClient.readTimeoutMillis(); + } + + /** + * Sets the read timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param readTimeout read timeout in milliseconds + * @return Api client + */ + public ApiClient setReadTimeout(int readTimeout) { + httpClient = httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + /** + * Get write timeout (in milliseconds). + * + * @return Timeout in milliseconds + */ + public int getWriteTimeout() { + return httpClient.writeTimeoutMillis(); + } + + /** + * Sets the write timeout (in milliseconds). + * A value of 0 means no timeout, otherwise values must be between 1 and + * {@link Integer#MAX_VALUE}. + * + * @param writeTimeout connection timeout in milliseconds + * @return Api client + */ + public ApiClient setWriteTimeout(int writeTimeout) { + httpClient = httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build(); + return this; + } + + + /** + * Format the given parameter object into string. + * + * @param param Parameter + * @return String representation of the parameter + */ + public String parameterToString(Object param) { + if (param == null) { + return ""; + } else if (param instanceof Date || param instanceof OffsetDateTime || param instanceof LocalDate) { + //Serialize to json string and remove the " enclosing characters + String jsonStr = json.serialize(param); + return jsonStr.substring(1, jsonStr.length() - 1); + } else if (param instanceof Collection) { + StringBuilder b = new StringBuilder(); + for (Object o : (Collection) param) { + if (b.length() > 0) { + b.append(","); + } + b.append(String.valueOf(o)); + } + return b.toString(); + } else { + return String.valueOf(param); + } + } + + /** + * Formats the specified query parameter to a list containing a single {@code Pair} object. + * + * Note that {@code value} must not be a collection. + * + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list containing a single {@code Pair} object. + */ + public List parameterToPair(String name, Object value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value instanceof Collection) { + return params; + } + + params.add(new Pair(name, parameterToString(value))); + return params; + } + + /** + * Formats the specified collection query parameters to a list of {@code Pair} objects. + * + * Note that the values of each of the returned Pair objects are percent-encoded. + * + * @param collectionFormat The collection format of the parameter. + * @param name The name of the parameter. + * @param value The value of the parameter. + * @return A list of {@code Pair} objects. + */ + public List parameterToPairs(String collectionFormat, String name, Collection value) { + List params = new ArrayList(); + + // preconditions + if (name == null || name.isEmpty() || value == null || value.isEmpty()) { + return params; + } + + // create the params based on the collection format + if ("multi".equals(collectionFormat)) { + for (Object item : value) { + params.add(new Pair(name, escapeString(parameterToString(item)))); + } + return params; + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + // escape all delimiters except commas, which are URI reserved + // characters + if ("ssv".equals(collectionFormat)) { + delimiter = escapeString(" "); + } else if ("tsv".equals(collectionFormat)) { + delimiter = escapeString("\t"); + } else if ("pipes".equals(collectionFormat)) { + delimiter = escapeString("|"); + } + + StringBuilder sb = new StringBuilder(); + for (Object item : value) { + sb.append(delimiter); + sb.append(escapeString(parameterToString(item))); + } + + params.add(new Pair(name, sb.substring(delimiter.length()))); + + return params; + } + + /** + * Formats the specified collection path parameter to a string value. + * + * @param collectionFormat The collection format of the parameter. + * @param value The value of the parameter. + * @return String representation of the parameter + */ + public String collectionPathParameterToString(String collectionFormat, Collection value) { + // create the value based on the collection format + if ("multi".equals(collectionFormat)) { + // not valid for path params + return parameterToString(value); + } + + // collectionFormat is assumed to be "csv" by default + String delimiter = ","; + + if ("ssv".equals(collectionFormat)) { + delimiter = " "; + } else if ("tsv".equals(collectionFormat)) { + delimiter = "\t"; + } else if ("pipes".equals(collectionFormat)) { + delimiter = "|"; + } + + StringBuilder sb = new StringBuilder() ; + for (Object item : value) { + sb.append(delimiter); + sb.append(parameterToString(item)); + } + + return sb.substring(delimiter.length()); + } + + /** + * Sanitize filename by removing path. + * e.g. ../../sun.gif becomes sun.gif + * + * @param filename The filename to be sanitized + * @return The sanitized filename + */ + public String sanitizeFilename(String filename) { + return filename.replaceAll(".*[/\\\\]", ""); + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * "* / *" is also default to JSON + * @param mime MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public boolean isJsonMime(String mime) { + String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"; + return mime != null && (mime.matches(jsonMime) || mime.equals("*/*")); + } + + /** + * Select the Accept header's value from the given accepts array: + * if JSON exists in the given array, use it; + * otherwise use all of them (joining into a string) + * + * @param accepts The accepts array to select from + * @return The Accept header to use. If the given array is empty, + * null will be returned (not to set the Accept header explicitly). + */ + public String selectHeaderAccept(String[] accepts) { + if (accepts.length == 0) { + return null; + } + for (String accept : accepts) { + if (isJsonMime(accept)) { + return accept; + } + } + return StringUtil.join(accepts, ","); + } + + /** + * Select the Content-Type header's value from the given array: + * if JSON exists in the given array, use it; + * otherwise use the first one of the array. + * + * @param contentTypes The Content-Type array to select from + * @return The Content-Type header to use. If the given array is empty, + * or matches "any", JSON will be used. + */ + public String selectHeaderContentType(String[] contentTypes) { + if (contentTypes.length == 0 || contentTypes[0].equals("*/*")) { + return "application/json"; + } + for (String contentType : contentTypes) { + if (isJsonMime(contentType)) { + return contentType; + } + } + return contentTypes[0]; + } + + /** + * Escape the given string to be used as URL query value. + * + * @param str String to be escaped + * @return Escaped string + */ + public String escapeString(String str) { + try { + return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20"); + } catch (UnsupportedEncodingException e) { + return str; + } + } + + /** + * Deserialize response body to Java object, according to the return type and + * the Content-Type response header. + * + * @param Type + * @param response HTTP response + * @param returnType The type of the Java object + * @return The deserialized Java object + * @throws ApiException If fail to deserialize response body, i.e. cannot read response body + * or the Content-Type of the response is not supported. + */ + @SuppressWarnings("unchecked") + public T deserialize(Response response, Type returnType) throws ApiException { + if (response == null || returnType == null) { + return null; + } + + if ("byte[]".equals(returnType.toString())) { + // Handle binary response (byte array). + try { + return (T) response.body().bytes(); + } catch (IOException e) { + throw new ApiException(e); + } + } else if (returnType.equals(File.class)) { + // Handle file downloading. + return (T) downloadFileFromResponse(response); + } + + String respBody; + try { + if (response.body() != null) + respBody = response.body().string(); + else + respBody = null; + } catch (IOException e) { + throw new ApiException(e); + } + + if (respBody == null || "".equals(respBody)) { + return null; + } + + String contentType = response.headers().get("Content-Type"); + if (contentType == null) { + // ensuring a default content type + contentType = "application/json"; + } + if (isJsonMime(contentType)) { + return json.deserialize(respBody, returnType); + } else if (returnType.equals(String.class)) { + // Expecting string, return the raw response body. + return (T) respBody; + } else { + throw new ApiException( + "Content type \"" + contentType + "\" is not supported for type: " + returnType, + response.code(), + response.headers().toMultimap(), + respBody); + } + } + + /** + * Serialize the given Java object into request body according to the object's + * class and the request Content-Type. + * + * @param obj The Java object + * @param contentType The request Content-Type + * @return The serialized request body + * @throws ApiException If fail to serialize the given object + */ + public RequestBody serialize(Object obj, String contentType) throws ApiException { + if (obj instanceof byte[]) { + // Binary (byte array) body parameter support. + return RequestBody.create(MediaType.parse(contentType), (byte[]) obj); + } else if (obj instanceof File) { + // File body parameter support. + return RequestBody.create(MediaType.parse(contentType), (File) obj); + } else if (isJsonMime(contentType)) { + String content; + if (obj != null) { + content = json.serialize(obj); + } else { + content = null; + } + return RequestBody.create(MediaType.parse(contentType), content); + } else { + throw new ApiException("Content type \"" + contentType + "\" is not supported"); + } + } + + /** + * Download file from the given response. + * + * @param response An instance of the Response object + * @throws ApiException If fail to read file content from response and write to disk + * @return Downloaded file + */ + public File downloadFileFromResponse(Response response) throws ApiException { + try { + File file = prepareDownloadFile(response); + BufferedSink sink = Okio.buffer(Okio.sink(file)); + sink.writeAll(response.body().source()); + sink.close(); + return file; + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * Prepare file for download + * + * @param response An instance of the Response object + * @return Prepared file for the download + * @throws IOException If fail to prepare file for download + */ + public File prepareDownloadFile(Response response) throws IOException { + String filename = null; + String contentDisposition = response.header("Content-Disposition"); + if (contentDisposition != null && !"".equals(contentDisposition)) { + // Get filename from the Content-Disposition header. + Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); + Matcher matcher = pattern.matcher(contentDisposition); + if (matcher.find()) { + filename = sanitizeFilename(matcher.group(1)); + } + } + + String prefix = null; + String suffix = null; + if (filename == null) { + prefix = "download-"; + suffix = ""; + } else { + int pos = filename.lastIndexOf("."); + if (pos == -1) { + prefix = filename + "-"; + } else { + prefix = filename.substring(0, pos) + "-"; + suffix = filename.substring(pos); + } + // File.createTempFile requires the prefix to be at least three characters long + if (prefix.length() < 3) + prefix = "download-"; + } + + if (tempFolderPath == null) + return File.createTempFile(prefix, suffix); + else + return File.createTempFile(prefix, suffix, new File(tempFolderPath)); + } + + /** + * {@link #execute(Call, Type)} + * + * @param Type + * @param call An instance of the Call object + * @return ApiResponse<T> + * @throws ApiException If fail to execute the call + */ + public ApiResponse execute(Call call) throws ApiException { + return execute(call, null); + } + + /** + * Execute HTTP call and deserialize the HTTP response body into the given return type. + * + * @param returnType The return type used to deserialize HTTP response body + * @param The return type corresponding to (same with) returnType + * @param call Call + * @return ApiResponse object containing response status, headers and + * data, which is a Java object deserialized from response body and would be null + * when returnType is null. + * @throws ApiException If fail to execute the call + */ + public ApiResponse execute(Call call, Type returnType) throws ApiException { + try { + Response response = call.execute(); + T data = handleResponse(response, returnType); + return new ApiResponse(response.code(), response.headers().toMultimap(), data); + } catch (IOException e) { + throw new ApiException(e); + } + } + + /** + * {@link #executeAsync(Call, Type, ApiCallback)} + * + * @param Type + * @param call An instance of the Call object + * @param callback ApiCallback<T> + */ + public void executeAsync(Call call, ApiCallback callback) { + executeAsync(call, null, callback); + } + + /** + * Execute HTTP call asynchronously. + * + * @param Type + * @param call The callback to be executed when the API call finishes + * @param returnType Return type + * @param callback ApiCallback + * @see #execute(Call, Type) + */ + @SuppressWarnings("unchecked") + public void executeAsync(Call call, final Type returnType, final ApiCallback callback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, IOException e) { + callback.onFailure(new ApiException(e), 0, null); + } + + @Override + public void onResponse(Call call, Response response) throws IOException { + T result; + try { + result = (T) handleResponse(response, returnType); + } catch (ApiException e) { + callback.onFailure(e, response.code(), response.headers().toMultimap()); + return; + } catch (Exception e) { + callback.onFailure(new ApiException(e), response.code(), response.headers().toMultimap()); + return; + } + callback.onSuccess(result, response.code(), response.headers().toMultimap()); + } + }); + } + + /** + * Handle the given response, return the deserialized object when the response is successful. + * + * @param Type + * @param response Response + * @param returnType Return type + * @return Type + * @throws ApiException If the response has an unsuccessful status code or + * fail to deserialize the response body + */ + public T handleResponse(Response response, Type returnType) throws ApiException { + if (response.isSuccessful()) { + if (returnType == null || response.code() == 204) { + // returning null if the returnType is not defined, + // or the status code is 204 (No Content) + if (response.body() != null) { + try { + response.body().close(); + } catch (Exception e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + return null; + } else { + return deserialize(response, returnType); + } + } else { + String respBody = null; + if (response.body() != null) { + try { + respBody = response.body().string(); + } catch (IOException e) { + throw new ApiException(response.message(), e, response.code(), response.headers().toMultimap()); + } + } + throw new ApiException(response.message(), response.code(), response.headers().toMultimap(), respBody); + } + } + + /** + * Build HTTP call with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP call + * @throws ApiException If fail to serialize the request body object + */ + public Call buildCall(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + Request request = buildRequest(path, method, queryParams, collectionQueryParams, body, headerParams, cookieParams, formParams, authNames, callback); + + return httpClient.newCall(request); + } + + /** + * Build an HTTP request with the given options. + * + * @param path The sub-path of the HTTP URL + * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and "DELETE" + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @param body The request body object + * @param headerParams The header parameters + * @param cookieParams The cookie parameters + * @param formParams The form parameters + * @param authNames The authentications to apply + * @param callback Callback for upload/download progress + * @return The HTTP request + * @throws ApiException If fail to serialize the request body object + */ + public Request buildRequest(String path, String method, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map cookieParams, Map formParams, String[] authNames, ApiCallback callback) throws ApiException { + updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); + + final String url = buildUrl(path, queryParams, collectionQueryParams); + final Request.Builder reqBuilder = new Request.Builder().url(url); + processHeaderParams(headerParams, reqBuilder); + processCookieParams(cookieParams, reqBuilder); + + String contentType = (String) headerParams.get("Content-Type"); + // ensuring a default content type + if (contentType == null) { + contentType = "application/json"; + } + + RequestBody reqBody; + if (!HttpMethod.permitsRequestBody(method)) { + reqBody = null; + } else if ("application/x-www-form-urlencoded".equals(contentType)) { + reqBody = buildRequestBodyFormEncoding(formParams); + } else if ("multipart/form-data".equals(contentType)) { + reqBody = buildRequestBodyMultipart(formParams); + } else if (body == null) { + if ("DELETE".equals(method)) { + // allow calling DELETE without sending a request body + reqBody = null; + } else { + // use an empty request body (for POST, PUT and PATCH) + reqBody = RequestBody.create(MediaType.parse(contentType), ""); + } + } else { + reqBody = serialize(body, contentType); + } + + // Associate callback with request (if not null) so interceptor can + // access it when creating ProgressResponseBody + reqBuilder.tag(callback); + + Request request = null; + + if (callback != null && reqBody != null) { + ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback); + request = reqBuilder.method(method, progressRequestBody).build(); + } else { + request = reqBuilder.method(method, reqBody).build(); + } + + return request; + } + + /** + * Build full URL by concatenating base path, the given sub path and query parameters. + * + * @param path The sub path + * @param queryParams The query parameters + * @param collectionQueryParams The collection query parameters + * @return The full URL + */ + public String buildUrl(String path, List queryParams, List collectionQueryParams) { + final StringBuilder url = new StringBuilder(); + url.append(basePath).append(path); + + if (queryParams != null && !queryParams.isEmpty()) { + // support (constant) query string in `path`, e.g. "/posts?draft=1" + String prefix = path.contains("?") ? "&" : "?"; + for (Pair param : queryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + url.append(escapeString(param.getName())).append("=").append(escapeString(value)); + } + } + } + + if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) { + String prefix = url.toString().contains("?") ? "&" : "?"; + for (Pair param : collectionQueryParams) { + if (param.getValue() != null) { + if (prefix != null) { + url.append(prefix); + prefix = null; + } else { + url.append("&"); + } + String value = parameterToString(param.getValue()); + // collection query parameter value already escaped as part of parameterToPairs + url.append(escapeString(param.getName())).append("=").append(value); + } + } + } + + return url.toString(); + } + + /** + * Set header parameters to the request builder, including default headers. + * + * @param headerParams Header parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) { + for (Entry param : headerParams.entrySet()) { + reqBuilder.header(param.getKey(), parameterToString(param.getValue())); + } + for (Entry header : defaultHeaderMap.entrySet()) { + if (!headerParams.containsKey(header.getKey())) { + reqBuilder.header(header.getKey(), parameterToString(header.getValue())); + } + } + } + + /** + * Set cookie parameters to the request builder, including default cookies. + * + * @param cookieParams Cookie parameters in the form of Map + * @param reqBuilder Request.Builder + */ + public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) { + for (Entry param : cookieParams.entrySet()) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + for (Entry param : defaultCookieMap.entrySet()) { + if (!cookieParams.containsKey(param.getKey())) { + reqBuilder.addHeader("Cookie", String.format("%s=%s", param.getKey(), param.getValue())); + } + } + } + + /** + * Update query and header parameters based on authentication settings. + * + * @param authNames The authentications to apply + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + public void updateParamsForAuth(String[] authNames, List queryParams, Map headerParams, Map cookieParams) { + for (String authName : authNames) { + Authentication auth = authentications.get(authName); + if (auth == null) { + throw new RuntimeException("Authentication undefined: " + authName); + } + auth.applyToParams(queryParams, headerParams, cookieParams); + } + } + + /** + * Build a form-encoding request body with the given form parameters. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyFormEncoding(Map formParams) { + okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder(); + for (Entry param : formParams.entrySet()) { + formBuilder.add(param.getKey(), parameterToString(param.getValue())); + } + return formBuilder.build(); + } + + /** + * Build a multipart (file uploading) request body with the given form parameters, + * which could contain text fields and file fields. + * + * @param formParams Form parameters in the form of Map + * @return RequestBody + */ + public RequestBody buildRequestBodyMultipart(Map formParams) { + MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM); + for (Entry param : formParams.entrySet()) { + if (param.getValue() instanceof File) { + File file = (File) param.getValue(); + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\"; filename=\"" + file.getName() + "\""); + MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file)); + mpBuilder.addPart(partHeaders, RequestBody.create(mediaType, file)); + } else { + Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + param.getKey() + "\""); + mpBuilder.addPart(partHeaders, RequestBody.create(null, parameterToString(param.getValue()))); + } + } + return mpBuilder.build(); + } + + /** + * Guess Content-Type header from the given file (defaults to "application/octet-stream"). + * + * @param file The given file + * @return The guessed Content-Type + */ + public String guessContentTypeFromFile(File file) { + String contentType = URLConnection.guessContentTypeFromName(file.getName()); + if (contentType == null) { + return "application/octet-stream"; + } else { + return contentType; + } + } + + /** + * Get network interceptor to add it to the httpClient to track download progress for + * async requests. + */ + private Interceptor getProgressInterceptor() { + return new Interceptor() { + @Override + public Response intercept(Interceptor.Chain chain) throws IOException { + final Request request = chain.request(); + final Response originalResponse = chain.proceed(request); + if (request.tag() instanceof ApiCallback) { + final ApiCallback callback = (ApiCallback) request.tag(); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), callback)) + .build(); + } + return originalResponse; + } + }; + } + + /** + * Apply SSL related settings to httpClient according to the current values of + * verifyingSsl and sslCaCert. + */ + private void applySslSettings() { + try { + TrustManager[] trustManagers; + HostnameVerifier hostnameVerifier; + if (!verifyingSsl) { + trustManagers = new TrustManager[]{ + new X509TrustManager() { + @Override + public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { + } + + @Override + public java.security.cert.X509Certificate[] getAcceptedIssuers() { + return new java.security.cert.X509Certificate[]{}; + } + } + }; + hostnameVerifier = new HostnameVerifier() { + @Override + public boolean verify(String hostname, SSLSession session) { + return true; + } + }; + } else { + TrustManagerFactory trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + + if (sslCaCert == null) { + trustManagerFactory.init((KeyStore) null); + } else { + char[] password = null; // Any password will work. + CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); + Collection certificates = certificateFactory.generateCertificates(sslCaCert); + if (certificates.isEmpty()) { + throw new IllegalArgumentException("expected non-empty set of trusted certificates"); + } + KeyStore caKeyStore = newEmptyKeyStore(password); + int index = 0; + for (Certificate certificate : certificates) { + String certificateAlias = "ca" + Integer.toString(index++); + caKeyStore.setCertificateEntry(certificateAlias, certificate); + } + trustManagerFactory.init(caKeyStore); + } + trustManagers = trustManagerFactory.getTrustManagers(); + hostnameVerifier = OkHostnameVerifier.INSTANCE; + } + + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(keyManagers, trustManagers, new SecureRandom()); + httpClient = httpClient.newBuilder() + .sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustManagers[0]) + .hostnameVerifier(hostnameVerifier) + .build(); + } catch (GeneralSecurityException e) { + throw new RuntimeException(e); + } + } + + private KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException { + try { + KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); + keyStore.load(null, password); + return keyStore; + } catch (IOException e) { + throw new AssertionError(e); + } + } +} diff --git a/gen/src/main/java/org/openapitools/client/ApiException.java b/gen/src/main/java/org/openapitools/client/ApiException.java new file mode 100644 index 00000000..d3effd39 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ApiException.java @@ -0,0 +1,91 @@ +/* + * 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.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ApiException extends Exception { + private int code = 0; + private Map> responseHeaders = null; + private String responseBody = null; + + public ApiException() {} + + public ApiException(Throwable throwable) { + super(throwable); + } + + public ApiException(String message) { + super(message); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { + super(message, throwable); + this.code = code; + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + public ApiException(String message, int code, Map> responseHeaders, String responseBody) { + this(message, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { + this(message, throwable, code, responseHeaders, null); + } + + public ApiException(int code, Map> responseHeaders, String responseBody) { + this((String) null, (Throwable) null, code, responseHeaders, responseBody); + } + + public ApiException(int code, String message) { + super(message); + this.code = code; + } + + public ApiException(int code, String message, Map> responseHeaders, String responseBody) { + this(code, message); + this.responseHeaders = responseHeaders; + this.responseBody = responseBody; + } + + /** + * Get the HTTP status code. + * + * @return HTTP status code + */ + public int getCode() { + return code; + } + + /** + * Get the HTTP response headers. + * + * @return A map of list of string + */ + public Map> getResponseHeaders() { + return responseHeaders; + } + + /** + * Get the HTTP response body. + * + * @return Response body in the form of string + */ + public String getResponseBody() { + return responseBody; + } +} diff --git a/gen/src/main/java/org/openapitools/client/ApiResponse.java b/gen/src/main/java/org/openapitools/client/ApiResponse.java new file mode 100644 index 00000000..7434a39d --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ApiResponse.java @@ -0,0 +1,59 @@ +/* + * 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.List; +import java.util.Map; + +/** + * API response returned by API call. + * + * @param The type of data that is deserialized from response body + */ +public class ApiResponse { + final private int statusCode; + final private Map> headers; + final private T data; + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + */ + public ApiResponse(int statusCode, Map> headers) { + this(statusCode, headers, null); + } + + /** + * @param statusCode The status code of HTTP response + * @param headers The headers of HTTP response + * @param data The object deserialized from response bod + */ + public ApiResponse(int statusCode, Map> headers, T data) { + this.statusCode = statusCode; + this.headers = headers; + this.data = data; + } + + public int getStatusCode() { + return statusCode; + } + + public Map> getHeaders() { + return headers; + } + + public T getData() { + return data; + } +} diff --git a/gen/src/main/java/org/openapitools/client/Configuration.java b/gen/src/main/java/org/openapitools/client/Configuration.java new file mode 100644 index 00000000..726cba3f --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/Configuration.java @@ -0,0 +1,39 @@ +/* + * 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; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class Configuration { + private static ApiClient defaultApiClient = new ApiClient(); + + /** + * Get the default API client, which would be used when creating API + * instances without providing an API client. + * + * @return Default API client + */ + public static ApiClient getDefaultApiClient() { + return defaultApiClient; + } + + /** + * Set the default API client, which would be used when creating API + * instances without providing an API client. + * + * @param apiClient API client + */ + public static void setDefaultApiClient(ApiClient apiClient) { + defaultApiClient = apiClient; + } +} diff --git a/gen/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/gen/src/main/java/org/openapitools/client/GzipRequestInterceptor.java new file mode 100644 index 00000000..c5b63497 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/GzipRequestInterceptor.java @@ -0,0 +1,85 @@ +/* + * 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 okhttp3.*; +import okio.Buffer; +import okio.BufferedSink; +import okio.GzipSink; +import okio.Okio; + +import java.io.IOException; + +/** + * Encodes request bodies using gzip. + * + * Taken from https://github.com/square/okhttp/issues/350 + */ +class GzipRequestInterceptor implements Interceptor { + @Override + public Response intercept(Chain chain) throws IOException { + Request originalRequest = chain.request(); + if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { + return chain.proceed(originalRequest); + } + + Request compressedRequest = originalRequest.newBuilder() + .header("Content-Encoding", "gzip") + .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) + .build(); + return chain.proceed(compressedRequest); + } + + private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { + final Buffer buffer = new Buffer(); + requestBody.writeTo(buffer); + return new RequestBody() { + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() { + return buffer.size(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + sink.write(buffer.snapshot()); + } + }; + } + + private RequestBody gzip(final RequestBody body) { + return new RequestBody() { + @Override + public MediaType contentType() { + return body.contentType(); + } + + @Override + public long contentLength() { + return -1; // We don't know the compressed length in advance! + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); + body.writeTo(gzipSink); + gzipSink.close(); + } + }; + } +} diff --git a/gen/src/main/java/org/openapitools/client/JSON.java b/gen/src/main/java/org/openapitools/client/JSON.java new file mode 100644 index 00000000..7d5a5dea --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/JSON.java @@ -0,0 +1,402 @@ +/* + * 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 com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapter; +import com.google.gson.internal.bind.util.ISO8601Utils; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import com.google.gson.JsonElement; +import io.gsonfire.GsonFireBuilder; +import io.gsonfire.TypeSelector; +import org.threeten.bp.LocalDate; +import org.threeten.bp.OffsetDateTime; +import org.threeten.bp.format.DateTimeFormatter; + +import org.openapitools.client.model.*; +import okio.ByteString; + +import java.io.IOException; +import java.io.StringReader; +import java.lang.reflect.Type; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.ParsePosition; +import java.util.Date; +import java.util.Locale; +import java.util.Map; +import java.util.HashMap; + +public class JSON { + private Gson gson; + private boolean isLenientOnJson = false; + private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); + private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); + private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); + private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + + public static GsonBuilder createGson() { + GsonFireBuilder fireBuilder = new GsonFireBuilder() + ; + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; + } + + private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { + JsonElement element = readElement.getAsJsonObject().get(discriminatorField); + if (null == element) { + throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); + } + return element.getAsString(); + } + + /** + * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. + * + * @param classByDiscriminatorValue The map of discriminator values to Java classes. + * @param discriminatorValue The value of the OpenAPI discriminator in the input data. + * @return The Java class that implements the OpenAPI schema + */ + private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { + Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); + if (null == clazz) { + throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); + } + return clazz; + } + + public JSON() { + gson = createGson() + .registerTypeAdapter(Date.class, dateTypeAdapter) + .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) + .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) + .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + .registerTypeAdapter(byte[].class, byteArrayAdapter) + .create(); + } + + /** + * Get Gson. + * + * @return Gson + */ + public Gson getGson() { + return gson; + } + + /** + * Set Gson. + * + * @param gson Gson + * @return JSON + */ + public JSON setGson(Gson gson) { + this.gson = gson; + return this; + } + + public JSON setLenientOnJson(boolean lenientOnJson) { + isLenientOnJson = lenientOnJson; + return this; + } + + /** + * Serialize the given Java object into JSON string. + * + * @param obj Object + * @return String representation of the JSON + */ + public String serialize(Object obj) { + return gson.toJson(obj); + } + + /** + * Deserialize the given JSON string to Java object. + * + * @param Type + * @param body The JSON string + * @param returnType The type to deserialize into + * @return The deserialized Java object + */ + @SuppressWarnings("unchecked") + public T deserialize(String body, Type returnType) { + try { + if (isLenientOnJson) { + JsonReader jsonReader = new JsonReader(new StringReader(body)); + // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) + jsonReader.setLenient(true); + return gson.fromJson(jsonReader, returnType); + } else { + return gson.fromJson(body, returnType); + } + } catch (JsonParseException e) { + // Fallback processing when failed to parse JSON form response body: + // return the response body string directly for the String return type; + if (returnType.equals(String.class)) { + return (T) body; + } else { + throw (e); + } + } + } + + /** + * Gson TypeAdapter for Byte Array type + */ + public class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + + /** + * Gson TypeAdapter for JSR310 OffsetDateTime type + */ + public static class OffsetDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public OffsetDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); + } + + public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, OffsetDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public OffsetDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + if (date.endsWith("+0000")) { + date = date.substring(0, date.length()-5) + "Z"; + } + return OffsetDateTime.parse(date, formatter); + } + } + } + + /** + * Gson TypeAdapter for JSR310 LocalDate type + */ + public class LocalDateTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE); + } + + public LocalDateTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDate date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDate read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + return LocalDate.parse(date, formatter); + } + } + } + + public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { + offsetDateTimeTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setLocalDateFormat(DateTimeFormatter dateFormat) { + localDateTypeAdapter.setFormat(dateFormat); + return this; + } + + /** + * Gson TypeAdapter for java.sql.Date type + * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used + * (more efficient than SimpleDateFormat). + */ + public static class SqlDateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public SqlDateTypeAdapter() {} + + public SqlDateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, java.sql.Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = date.toString(); + } + out.value(value); + } + } + + @Override + public java.sql.Date read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return new java.sql.Date(dateFormat.parse(date).getTime()); + } + return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } + } + + /** + * Gson TypeAdapter for java.util.Date type + * If the dateFormat is null, ISO8601Utils will be used. + */ + public static class DateTypeAdapter extends TypeAdapter { + + private DateFormat dateFormat; + + public DateTypeAdapter() {} + + public DateTypeAdapter(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + public void setFormat(DateFormat dateFormat) { + this.dateFormat = dateFormat; + } + + @Override + public void write(JsonWriter out, Date date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + String value; + if (dateFormat != null) { + value = dateFormat.format(date); + } else { + value = ISO8601Utils.format(date, true); + } + out.value(value); + } + } + + @Override + public Date read(JsonReader in) throws IOException { + try { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + if (dateFormat != null) { + return dateFormat.parse(date); + } + return ISO8601Utils.parse(date, new ParsePosition(0)); + } catch (ParseException e) { + throw new JsonParseException(e); + } + } + } catch (IllegalArgumentException e) { + throw new JsonParseException(e); + } + } + } + + public JSON setDateFormat(DateFormat dateFormat) { + dateTypeAdapter.setFormat(dateFormat); + return this; + } + + public JSON setSqlDateFormat(DateFormat dateFormat) { + sqlDateTypeAdapter.setFormat(dateFormat); + return this; + } + +} diff --git a/gen/src/main/java/org/openapitools/client/Pair.java b/gen/src/main/java/org/openapitools/client/Pair.java new file mode 100644 index 00000000..d9ebc90c --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/Pair.java @@ -0,0 +1,61 @@ +/* + * 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; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class Pair { + private String name = ""; + private String value = ""; + + public Pair (String name, String value) { + setName(name); + setValue(value); + } + + private void setName(String name) { + if (!isValidString(name)) { + return; + } + + this.name = name; + } + + private void setValue(String value) { + if (!isValidString(value)) { + return; + } + + this.value = value; + } + + public String getName() { + return this.name; + } + + public String getValue() { + return this.value; + } + + private boolean isValidString(String arg) { + if (arg == null) { + return false; + } + + if (arg.trim().isEmpty()) { + return false; + } + + return true; + } +} diff --git a/gen/src/main/java/org/openapitools/client/ProgressRequestBody.java b/gen/src/main/java/org/openapitools/client/ProgressRequestBody.java new file mode 100644 index 00000000..a5ed359a --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ProgressRequestBody.java @@ -0,0 +1,73 @@ +/* + * 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 okhttp3.MediaType; +import okhttp3.RequestBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSink; +import okio.ForwardingSink; +import okio.Okio; +import okio.Sink; + +public class ProgressRequestBody extends RequestBody { + + private final RequestBody requestBody; + + private final ApiCallback callback; + + public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { + this.requestBody = requestBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return requestBody.contentType(); + } + + @Override + public long contentLength() throws IOException { + return requestBody.contentLength(); + } + + @Override + public void writeTo(BufferedSink sink) throws IOException { + BufferedSink bufferedSink = Okio.buffer(sink(sink)); + requestBody.writeTo(bufferedSink); + bufferedSink.flush(); + } + + private Sink sink(Sink sink) { + return new ForwardingSink(sink) { + + long bytesWritten = 0L; + long contentLength = 0L; + + @Override + public void write(Buffer source, long byteCount) throws IOException { + super.write(source, byteCount); + if (contentLength == 0) { + contentLength = contentLength(); + } + + bytesWritten += byteCount; + callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); + } + }; + } +} diff --git a/gen/src/main/java/org/openapitools/client/ProgressResponseBody.java b/gen/src/main/java/org/openapitools/client/ProgressResponseBody.java new file mode 100644 index 00000000..bbc9d2af --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ProgressResponseBody.java @@ -0,0 +1,72 @@ +/* + * 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 okhttp3.MediaType; +import okhttp3.ResponseBody; + +import java.io.IOException; + +import okio.Buffer; +import okio.BufferedSource; +import okio.ForwardingSource; +import okio.Okio; +import okio.Source; + +public class ProgressResponseBody extends ResponseBody { + + private final ResponseBody responseBody; + private final ApiCallback callback; + private BufferedSource bufferedSource; + + public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { + this.responseBody = responseBody; + this.callback = callback; + } + + @Override + public MediaType contentType() { + return responseBody.contentType(); + } + + @Override + public long contentLength() { + return responseBody.contentLength(); + } + + @Override + public BufferedSource source() { + if (bufferedSource == null) { + bufferedSource = Okio.buffer(source(responseBody.source())); + } + return bufferedSource; + } + + private Source source(Source source) { + return new ForwardingSource(source) { + long totalBytesRead = 0L; + + @Override + public long read(Buffer sink, long byteCount) throws IOException { + long bytesRead = super.read(sink, byteCount); + // read() returns the number of bytes read, or -1 if this source is exhausted. + totalBytesRead += bytesRead != -1 ? bytesRead : 0; + callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); + return bytesRead; + } + }; + } +} + + diff --git a/gen/src/main/java/org/openapitools/client/ServerConfiguration.java b/gen/src/main/java/org/openapitools/client/ServerConfiguration.java new file mode 100644 index 00000000..a1107a86 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ServerConfiguration.java @@ -0,0 +1,58 @@ +package org.openapitools.client; + +import java.util.Map; + +/** + * Representing a Server configuration. + */ +public class ServerConfiguration { + public String URL; + public String description; + public Map variables; + + /** + * @param URL A URL to the target host. + * @param description A describtion of the host designated by the URL. + * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. + */ + public ServerConfiguration(String URL, String description, Map variables) { + this.URL = URL; + this.description = description; + this.variables = variables; + } + + /** + * Format URL template using given variables. + * + * @param variables A map between a variable name and its value. + * @return Formatted URL. + */ + public String URL(Map variables) { + String url = this.URL; + + // go through variables and replace placeholders + for (Map.Entry variable: this.variables.entrySet()) { + String name = variable.getKey(); + ServerVariable serverVariable = variable.getValue(); + String value = serverVariable.defaultValue; + + if (variables != null && variables.containsKey(name)) { + value = variables.get(name); + if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { + throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); + } + } + url = url.replaceAll("\\{" + name + "\\}", value); + } + return url; + } + + /** + * Format URL template using default server variables. + * + * @return Formatted URL. + */ + public String URL() { + return URL(null); + } +} diff --git a/gen/src/main/java/org/openapitools/client/ServerVariable.java b/gen/src/main/java/org/openapitools/client/ServerVariable.java new file mode 100644 index 00000000..c2f13e21 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/ServerVariable.java @@ -0,0 +1,23 @@ +package org.openapitools.client; + +import java.util.HashSet; + +/** + * Representing a Server Variable for server URL template substitution. + */ +public class ServerVariable { + public String description; + public String defaultValue; + public HashSet enumValues = null; + + /** + * @param description A description for the server variable. + * @param defaultValue The default value to use for substitution. + * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. + */ + public ServerVariable(String description, String defaultValue, HashSet 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 + + + + +
Status Code Description Response Headers
200 If community exists -
404 If params are invalid -
+ */ + public ApiResponse listCommunityAdminsWithHttpInfo(String communityId, Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listCommunityAdminsValidateBeforeCall(communityId, pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List all admins of the community given a community id + * @param communityId (required) + * @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 If community exists -
404 If params are invalid -
+ */ + public okhttp3.Call listCommunityAdminsAsync(String communityId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listCommunityAdminsValidateBeforeCall(communityId, pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listCommunityDetails + * @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 If community exists -
404 If params are invalid -
+ */ + public okhttp3.Call listCommunityDetailsCall(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 = { + "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 listCommunityDetailsValidateBeforeCall(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 listCommunityDetails(Async)"); + } + + + okhttp3.Call localVarCall = listCommunityDetailsCall(communityId, _callback); + return localVarCall; + + } + + /** + * + * Get details about the community given a community id + * @param communityId (required) + * @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 If community exists -
404 If params are invalid -
+ */ + public GetCommunityDetailsResponse listCommunityDetails(String communityId) throws ApiException { + ApiResponse localVarResp = listCommunityDetailsWithHttpInfo(communityId); + return localVarResp.getData(); + } + + /** + * + * Get details about the community given a community id + * @param communityId (required) + * @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 If community exists -
404 If params are invalid -
+ */ + public ApiResponse listCommunityDetailsWithHttpInfo(String communityId) throws ApiException { + okhttp3.Call localVarCall = listCommunityDetailsValidateBeforeCall(communityId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get details about the community given a 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
200 If community exists -
404 If params are invalid -
+ */ + public okhttp3.Call listCommunityDetailsAsync(String communityId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listCommunityDetailsValidateBeforeCall(communityId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for removeAdminFromCommunity + * @param communityId (required) + * @param adminId (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 admin was removed -
404 If params are invalid -
+ */ + public okhttp3.Call removeAdminFromCommunityCall(String communityId, String adminId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/communities/{communityId}/admins/{adminId}" + .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString())) + .replaceAll("\\{" + "adminId" + "\\}", localVarApiClient.escapeString(adminId.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 removeAdminFromCommunityValidateBeforeCall(String communityId, String adminId, 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 removeAdminFromCommunity(Async)"); + } + + // verify the required parameter 'adminId' is set + if (adminId == null) { + throw new ApiException("Missing the required parameter 'adminId' when calling removeAdminFromCommunity(Async)"); + } + + + okhttp3.Call localVarCall = removeAdminFromCommunityCall(communityId, adminId, _callback); + return localVarCall; + + } + + /** + * + * Remove of admin associated with a community + * @param communityId (required) + * @param adminId (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 admin was removed -
404 If params are invalid -
+ */ + public void removeAdminFromCommunity(String communityId, String adminId) throws ApiException { + removeAdminFromCommunityWithHttpInfo(communityId, adminId); + } + + /** + * + * Remove of admin associated with a community + * @param communityId (required) + * @param adminId (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 admin was removed -
404 If params are invalid -
+ */ + public ApiResponse removeAdminFromCommunityWithHttpInfo(String communityId, String adminId) throws ApiException { + okhttp3.Call localVarCall = removeAdminFromCommunityValidateBeforeCall(communityId, adminId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Remove of admin associated with a community + * @param communityId (required) + * @param adminId (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 admin was removed -
404 If params are invalid -
+ */ + public okhttp3.Call removeAdminFromCommunityAsync(String communityId, String adminId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = removeAdminFromCommunityValidateBeforeCall(communityId, adminId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/gen/src/main/java/org/openapitools/client/api/DocumentsApi.java b/gen/src/main/java/org/openapitools/client/api/DocumentsApi.java new file mode 100644 index 00000000..3c90c553 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/api/DocumentsApi.java @@ -0,0 +1,541 @@ +/* + * 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.io.File; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class DocumentsApi { + private ApiClient localVarApiClient; + + public DocumentsApi() { + this(Configuration.getDefaultApiClient()); + } + + public DocumentsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for deleteHouseMemberDocument + * @param memberId (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 document deleted -
404 If params are invalid -
+ */ + public okhttp3.Call deleteHouseMemberDocumentCall(String memberId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/members/{memberId}/documents" + .replaceAll("\\{" + "memberId" + "\\}", localVarApiClient.escapeString(memberId.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 deleteHouseMemberDocumentValidateBeforeCall(String memberId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'memberId' is set + if (memberId == null) { + throw new ApiException("Missing the required parameter 'memberId' when calling deleteHouseMemberDocument(Async)"); + } + + + okhttp3.Call localVarCall = deleteHouseMemberDocumentCall(memberId, _callback); + return localVarCall; + + } + + /** + * + * Delete house member's documents + * @param memberId (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 document deleted -
404 If params are invalid -
+ */ + public void deleteHouseMemberDocument(String memberId) throws ApiException { + deleteHouseMemberDocumentWithHttpInfo(memberId); + } + + /** + * + * Delete house member's documents + * @param memberId (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 document deleted -
404 If params are invalid -
+ */ + public ApiResponse deleteHouseMemberDocumentWithHttpInfo(String memberId) throws ApiException { + okhttp3.Call localVarCall = deleteHouseMemberDocumentValidateBeforeCall(memberId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Delete house member's documents + * @param memberId (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 document deleted -
404 If params are invalid -
+ */ + public okhttp3.Call deleteHouseMemberDocumentAsync(String memberId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteHouseMemberDocumentValidateBeforeCall(memberId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getHouseMemberDocument + * @param memberId (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 document present -
404 If params are invalid -
+ */ + public okhttp3.Call getHouseMemberDocumentCall(String memberId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/members/{memberId}/documents" + .replaceAll("\\{" + "memberId" + "\\}", localVarApiClient.escapeString(memberId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "image/jpeg" + }; + 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 getHouseMemberDocumentValidateBeforeCall(String memberId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'memberId' is set + if (memberId == null) { + throw new ApiException("Missing the required parameter 'memberId' when calling getHouseMemberDocument(Async)"); + } + + + okhttp3.Call localVarCall = getHouseMemberDocumentCall(memberId, _callback); + return localVarCall; + + } + + /** + * + * Returns house member's documents + * @param memberId (required) + * @return byte[] + * @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 document present -
404 If params are invalid -
+ */ + public byte[] getHouseMemberDocument(String memberId) throws ApiException { + ApiResponse localVarResp = getHouseMemberDocumentWithHttpInfo(memberId); + return localVarResp.getData(); + } + + /** + * + * Returns house member's documents + * @param memberId (required) + * @return ApiResponse<byte[]> + * @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 document present -
404 If params are invalid -
+ */ + public ApiResponse getHouseMemberDocumentWithHttpInfo(String memberId) throws ApiException { + okhttp3.Call localVarCall = getHouseMemberDocumentValidateBeforeCall(memberId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Returns house member's documents + * @param memberId (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 document present -
404 If params are invalid -
+ */ + public okhttp3.Call getHouseMemberDocumentAsync(String memberId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getHouseMemberDocumentValidateBeforeCall(memberId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for updateHouseMemberDocument + * @param memberId (required) + * @param memberDocument (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
204 If document updated -
409 If document update error -
413 If document file too large -
404 If params are invalid -
+ */ + public okhttp3.Call updateHouseMemberDocumentCall(String memberId, File memberDocument, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/members/{memberId}/documents" + .replaceAll("\\{" + "memberId" + "\\}", localVarApiClient.escapeString(memberId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (memberDocument != null) { + localVarFormParams.put("memberDocument", memberDocument); + } + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + 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 updateHouseMemberDocumentValidateBeforeCall(String memberId, File memberDocument, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'memberId' is set + if (memberId == null) { + throw new ApiException("Missing the required parameter 'memberId' when calling updateHouseMemberDocument(Async)"); + } + + + okhttp3.Call localVarCall = updateHouseMemberDocumentCall(memberId, memberDocument, _callback); + return localVarCall; + + } + + /** + * + * Update house member's documents + * @param memberId (required) + * @param memberDocument (optional) + * @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 document updated -
409 If document update error -
413 If document file too large -
404 If params are invalid -
+ */ + public void updateHouseMemberDocument(String memberId, File memberDocument) throws ApiException { + updateHouseMemberDocumentWithHttpInfo(memberId, memberDocument); + } + + /** + * + * Update house member's documents + * @param memberId (required) + * @param memberDocument (optional) + * @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 document updated -
409 If document update error -
413 If document file too large -
404 If params are invalid -
+ */ + public ApiResponse updateHouseMemberDocumentWithHttpInfo(String memberId, File memberDocument) throws ApiException { + okhttp3.Call localVarCall = updateHouseMemberDocumentValidateBeforeCall(memberId, memberDocument, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Update house member's documents + * @param memberId (required) + * @param memberDocument (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
204 If document updated -
409 If document update error -
413 If document file too large -
404 If params are invalid -
+ */ + public okhttp3.Call updateHouseMemberDocumentAsync(String memberId, File memberDocument, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = updateHouseMemberDocumentValidateBeforeCall(memberId, memberDocument, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for uploadHouseMemberDocument + * @param memberId (required) + * @param memberDocument (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
204 If document saved -
409 If document save error -
413 If document file too large -
404 If params are invalid -
+ */ + public okhttp3.Call uploadHouseMemberDocumentCall(String memberId, File memberDocument, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/members/{memberId}/documents" + .replaceAll("\\{" + "memberId" + "\\}", localVarApiClient.escapeString(memberId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (memberDocument != null) { + localVarFormParams.put("memberDocument", memberDocument); + } + + final String[] localVarAccepts = { + + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + 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 uploadHouseMemberDocumentValidateBeforeCall(String memberId, File memberDocument, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'memberId' is set + if (memberId == null) { + throw new ApiException("Missing the required parameter 'memberId' when calling uploadHouseMemberDocument(Async)"); + } + + + okhttp3.Call localVarCall = uploadHouseMemberDocumentCall(memberId, memberDocument, _callback); + return localVarCall; + + } + + /** + * + * Add house member's documents + * @param memberId (required) + * @param memberDocument (optional) + * @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 document saved -
409 If document save error -
413 If document file too large -
404 If params are invalid -
+ */ + public void uploadHouseMemberDocument(String memberId, File memberDocument) throws ApiException { + uploadHouseMemberDocumentWithHttpInfo(memberId, memberDocument); + } + + /** + * + * Add house member's documents + * @param memberId (required) + * @param memberDocument (optional) + * @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 document saved -
409 If document save error -
413 If document file too large -
404 If params are invalid -
+ */ + public ApiResponse uploadHouseMemberDocumentWithHttpInfo(String memberId, File memberDocument) throws ApiException { + okhttp3.Call localVarCall = uploadHouseMemberDocumentValidateBeforeCall(memberId, memberDocument, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Add house member's documents + * @param memberId (required) + * @param memberDocument (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
204 If document saved -
409 If document save error -
413 If document file too large -
404 If params are invalid -
+ */ + public okhttp3.Call uploadHouseMemberDocumentAsync(String memberId, File memberDocument, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = uploadHouseMemberDocumentValidateBeforeCall(memberId, memberDocument, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/gen/src/main/java/org/openapitools/client/api/HousesApi.java b/gen/src/main/java/org/openapitools/client/api/HousesApi.java new file mode 100644 index 00000000..fb258203 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/api/HousesApi.java @@ -0,0 +1,1031 @@ +/* + * 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.AddCommunityHouseRequest; +import org.openapitools.client.model.AddCommunityHouseResponse; +import org.openapitools.client.model.AddHouseMemberRequest; +import org.openapitools.client.model.AddHouseMemberResponse; +import org.openapitools.client.model.GetHouseDetailsResponse; +import org.openapitools.client.model.ListHouseMembersResponse; +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 HousesApi { + private ApiClient localVarApiClient; + + public HousesApi() { + this(Configuration.getDefaultApiClient()); + } + + public HousesApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for addCommunityHouses + * @param communityId (required) + * @param addCommunityHouseRequest AddCommunityHouseRequest 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 houses were added -
400 If params are invalid -
+ */ + public okhttp3.Call addCommunityHousesCall(String communityId, AddCommunityHouseRequest addCommunityHouseRequest, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = addCommunityHouseRequest; + + // create path and map variables + String localVarPath = "/communities/{communityId}/houses" + .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[] { }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call addCommunityHousesValidateBeforeCall(String communityId, AddCommunityHouseRequest addCommunityHouseRequest, 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 addCommunityHouses(Async)"); + } + + // verify the required parameter 'addCommunityHouseRequest' is set + if (addCommunityHouseRequest == null) { + throw new ApiException("Missing the required parameter 'addCommunityHouseRequest' when calling addCommunityHouses(Async)"); + } + + + okhttp3.Call localVarCall = addCommunityHousesCall(communityId, addCommunityHouseRequest, _callback); + return localVarCall; + + } + + /** + * + * Add a new house to the community given a community id + * @param communityId (required) + * @param addCommunityHouseRequest AddCommunityHouseRequest aggregate fields (required) + * @return AddCommunityHouseResponse + * @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 houses were added -
400 If params are invalid -
+ */ + public AddCommunityHouseResponse addCommunityHouses(String communityId, AddCommunityHouseRequest addCommunityHouseRequest) throws ApiException { + ApiResponse localVarResp = addCommunityHousesWithHttpInfo(communityId, addCommunityHouseRequest); + return localVarResp.getData(); + } + + /** + * + * Add a new house to the community given a community id + * @param communityId (required) + * @param addCommunityHouseRequest AddCommunityHouseRequest aggregate fields (required) + * @return ApiResponse<AddCommunityHouseResponse> + * @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 houses were added -
400 If params are invalid -
+ */ + public ApiResponse addCommunityHousesWithHttpInfo(String communityId, AddCommunityHouseRequest addCommunityHouseRequest) throws ApiException { + okhttp3.Call localVarCall = addCommunityHousesValidateBeforeCall(communityId, addCommunityHouseRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add a new house to the community given a community id + * @param communityId (required) + * @param addCommunityHouseRequest AddCommunityHouseRequest 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 houses were added -
400 If params are invalid -
+ */ + public okhttp3.Call addCommunityHousesAsync(String communityId, AddCommunityHouseRequest addCommunityHouseRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = addCommunityHousesValidateBeforeCall(communityId, addCommunityHouseRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for addHouseMembers + * @param houseId (required) + * @param addHouseMemberRequest AddHouseMemberRequest 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 members were added to house -
404 If parameters are invalid -
+ */ + public okhttp3.Call addHouseMembersCall(String houseId, AddHouseMemberRequest addHouseMemberRequest, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = addHouseMemberRequest; + + // create path and map variables + String localVarPath = "/houses/{houseId}/members" + .replaceAll("\\{" + "houseId" + "\\}", localVarApiClient.escapeString(houseId.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 addHouseMembersValidateBeforeCall(String houseId, AddHouseMemberRequest addHouseMemberRequest, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'houseId' is set + if (houseId == null) { + throw new ApiException("Missing the required parameter 'houseId' when calling addHouseMembers(Async)"); + } + + // verify the required parameter 'addHouseMemberRequest' is set + if (addHouseMemberRequest == null) { + throw new ApiException("Missing the required parameter 'addHouseMemberRequest' when calling addHouseMembers(Async)"); + } + + + okhttp3.Call localVarCall = addHouseMembersCall(houseId, addHouseMemberRequest, _callback); + return localVarCall; + + } + + /** + * + * Add new members to the house given a house id. Responds with member id which were added + * @param houseId (required) + * @param addHouseMemberRequest AddHouseMemberRequest aggregate fields (required) + * @return AddHouseMemberResponse + * @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 members were added to house -
404 If parameters are invalid -
+ */ + public AddHouseMemberResponse addHouseMembers(String houseId, AddHouseMemberRequest addHouseMemberRequest) throws ApiException { + ApiResponse localVarResp = addHouseMembersWithHttpInfo(houseId, addHouseMemberRequest); + return localVarResp.getData(); + } + + /** + * + * Add new members to the house given a house id. Responds with member id which were added + * @param houseId (required) + * @param addHouseMemberRequest AddHouseMemberRequest aggregate fields (required) + * @return ApiResponse<AddHouseMemberResponse> + * @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 members were added to house -
404 If parameters are invalid -
+ */ + public ApiResponse addHouseMembersWithHttpInfo(String houseId, AddHouseMemberRequest addHouseMemberRequest) throws ApiException { + okhttp3.Call localVarCall = addHouseMembersValidateBeforeCall(houseId, addHouseMemberRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Add new members to the house given a house id. Responds with member id which were added + * @param houseId (required) + * @param addHouseMemberRequest AddHouseMemberRequest 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 members were added to house -
404 If parameters are invalid -
+ */ + public okhttp3.Call addHouseMembersAsync(String houseId, AddHouseMemberRequest addHouseMemberRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = addHouseMembersValidateBeforeCall(houseId, addHouseMemberRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for deleteHouseMember + * @param houseId (required) + * @param memberId (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 house member was removed from house -
400 If params are invalid -
+ */ + public okhttp3.Call deleteHouseMemberCall(String houseId, String memberId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/houses/{houseId}/members/{memberId}" + .replaceAll("\\{" + "houseId" + "\\}", localVarApiClient.escapeString(houseId.toString())) + .replaceAll("\\{" + "memberId" + "\\}", localVarApiClient.escapeString(memberId.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 deleteHouseMemberValidateBeforeCall(String houseId, String memberId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'houseId' is set + if (houseId == null) { + throw new ApiException("Missing the required parameter 'houseId' when calling deleteHouseMember(Async)"); + } + + // verify the required parameter 'memberId' is set + if (memberId == null) { + throw new ApiException("Missing the required parameter 'memberId' when calling deleteHouseMember(Async)"); + } + + + okhttp3.Call localVarCall = deleteHouseMemberCall(houseId, memberId, _callback); + return localVarCall; + + } + + /** + * + * Deletion of member associated with a house + * @param houseId (required) + * @param memberId (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 house member was removed from house -
400 If params are invalid -
+ */ + public void deleteHouseMember(String houseId, String memberId) throws ApiException { + deleteHouseMemberWithHttpInfo(houseId, memberId); + } + + /** + * + * Deletion of member associated with a house + * @param houseId (required) + * @param memberId (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 house member was removed from house -
400 If params are invalid -
+ */ + public ApiResponse deleteHouseMemberWithHttpInfo(String houseId, String memberId) throws ApiException { + okhttp3.Call localVarCall = deleteHouseMemberValidateBeforeCall(houseId, memberId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Deletion of member associated with a house + * @param houseId (required) + * @param memberId (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 house member was removed from house -
400 If params are invalid -
+ */ + public okhttp3.Call deleteHouseMemberAsync(String houseId, String memberId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteHouseMemberValidateBeforeCall(houseId, memberId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getHouseDetails + * @param houseId ID of the house to get (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 house present -
404 If params are invalid -
+ */ + public okhttp3.Call getHouseDetailsCall(String houseId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/houses/{houseId}" + .replaceAll("\\{" + "houseId" + "\\}", localVarApiClient.escapeString(houseId.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 getHouseDetailsValidateBeforeCall(String houseId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'houseId' is set + if (houseId == null) { + throw new ApiException("Missing the required parameter 'houseId' when calling getHouseDetails(Async)"); + } + + + okhttp3.Call localVarCall = getHouseDetailsCall(houseId, _callback); + return localVarCall; + + } + + /** + * + * Get house detail by a given ID + * @param houseId ID of the house to get (required) + * @return GetHouseDetailsResponse + * @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 house present -
404 If params are invalid -
+ */ + public GetHouseDetailsResponse getHouseDetails(String houseId) throws ApiException { + ApiResponse localVarResp = getHouseDetailsWithHttpInfo(houseId); + return localVarResp.getData(); + } + + /** + * + * Get house detail by a given ID + * @param houseId ID of the house to get (required) + * @return ApiResponse<GetHouseDetailsResponse> + * @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 house present -
404 If params are invalid -
+ */ + public ApiResponse getHouseDetailsWithHttpInfo(String houseId) throws ApiException { + okhttp3.Call localVarCall = getHouseDetailsValidateBeforeCall(houseId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get house detail by a given ID + * @param houseId ID of the house to get (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 house present -
404 If params are invalid -
+ */ + public okhttp3.Call getHouseDetailsAsync(String houseId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getHouseDetailsValidateBeforeCall(houseId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listAllHouses + * @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 -
+ */ + public okhttp3.Call listAllHousesCall(Pageable pageable, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/houses"; + + 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 listAllHousesValidateBeforeCall(Pageable pageable, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = listAllHousesCall(pageable, _callback); + return localVarCall; + + } + + /** + * + * List all houses of the community given a community id + * @param pageable (optional) + * @return GetHouseDetailsResponse + * @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 -
+ */ + public GetHouseDetailsResponse listAllHouses(Pageable pageable) throws ApiException { + ApiResponse localVarResp = listAllHousesWithHttpInfo(pageable); + return localVarResp.getData(); + } + + /** + * + * List all houses of the community given a community id + * @param pageable (optional) + * @return ApiResponse<GetHouseDetailsResponse> + * @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 -
+ */ + public ApiResponse listAllHousesWithHttpInfo(Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listAllHousesValidateBeforeCall(pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List all houses of the community given a community id + * @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 If community exists -
+ */ + public okhttp3.Call listAllHousesAsync(Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAllHousesValidateBeforeCall(pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listAllMembersOfHouse + * @param houseId (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 house present -
404 If params are invalid -
+ */ + public okhttp3.Call listAllMembersOfHouseCall(String houseId, Pageable pageable, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/houses/{houseId}/members" + .replaceAll("\\{" + "houseId" + "\\}", localVarApiClient.escapeString(houseId.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 listAllMembersOfHouseValidateBeforeCall(String houseId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'houseId' is set + if (houseId == null) { + throw new ApiException("Missing the required parameter 'houseId' when calling listAllMembersOfHouse(Async)"); + } + + + okhttp3.Call localVarCall = listAllMembersOfHouseCall(houseId, pageable, _callback); + return localVarCall; + + } + + /** + * + * List all members of the house given a house id + * @param houseId (required) + * @param pageable (optional) + * @return ListHouseMembersResponse + * @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 house present -
404 If params are invalid -
+ */ + public ListHouseMembersResponse listAllMembersOfHouse(String houseId, Pageable pageable) throws ApiException { + ApiResponse localVarResp = listAllMembersOfHouseWithHttpInfo(houseId, pageable); + return localVarResp.getData(); + } + + /** + * + * List all members of the house given a house id + * @param houseId (required) + * @param pageable (optional) + * @return ApiResponse<ListHouseMembersResponse> + * @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 house present -
404 If params are invalid -
+ */ + public ApiResponse listAllMembersOfHouseWithHttpInfo(String houseId, Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listAllMembersOfHouseValidateBeforeCall(houseId, pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List all members of the house given a house id + * @param houseId (required) + * @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 If house present -
404 If params are invalid -
+ */ + public okhttp3.Call listAllMembersOfHouseAsync(String houseId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAllMembersOfHouseValidateBeforeCall(houseId, pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listCommunityHouses + * @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 listCommunityHousesCall(String communityId, Pageable pageable, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/communities/{communityId}/houses" + .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 listCommunityHousesValidateBeforeCall(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 listCommunityHouses(Async)"); + } + + + okhttp3.Call localVarCall = listCommunityHousesCall(communityId, pageable, _callback); + return localVarCall; + + } + + /** + * + * List all houses of the community given a community id + * @param communityId (required) + * @param pageable (optional) + * @return GetHouseDetailsResponse + * @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 GetHouseDetailsResponse listCommunityHouses(String communityId, Pageable pageable) throws ApiException { + ApiResponse localVarResp = listCommunityHousesWithHttpInfo(communityId, pageable); + return localVarResp.getData(); + } + + /** + * + * List all houses of the community given a community id + * @param communityId (required) + * @param pageable (optional) + * @return ApiResponse<GetHouseDetailsResponse> + * @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 ApiResponse listCommunityHousesWithHttpInfo(String communityId, Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listCommunityHousesValidateBeforeCall(communityId, pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * List all houses of the community given a community id + * @param communityId (required) + * @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 If community exists -
404 If params are invalid -
+ */ + public okhttp3.Call listCommunityHousesAsync(String communityId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listCommunityHousesValidateBeforeCall(communityId, pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for removeCommunityHouse + * @param communityId (required) + * @param houseId (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 house was removed -
400 If params are invalid -
+ */ + public okhttp3.Call removeCommunityHouseCall(String communityId, String houseId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/communities/{communityId}/houses/{houseId}" + .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString())) + .replaceAll("\\{" + "houseId" + "\\}", localVarApiClient.escapeString(houseId.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 removeCommunityHouseValidateBeforeCall(String communityId, String houseId, 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 removeCommunityHouse(Async)"); + } + + // verify the required parameter 'houseId' is set + if (houseId == null) { + throw new ApiException("Missing the required parameter 'houseId' when calling removeCommunityHouse(Async)"); + } + + + okhttp3.Call localVarCall = removeCommunityHouseCall(communityId, houseId, _callback); + return localVarCall; + + } + + /** + * + * Remove of house from the community given a community id and a house id + * @param communityId (required) + * @param houseId (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 house was removed -
400 If params are invalid -
+ */ + public void removeCommunityHouse(String communityId, String houseId) throws ApiException { + removeCommunityHouseWithHttpInfo(communityId, houseId); + } + + /** + * + * Remove of house from the community given a community id and a house id + * @param communityId (required) + * @param houseId (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 house was removed -
400 If params are invalid -
+ */ + public ApiResponse removeCommunityHouseWithHttpInfo(String communityId, String houseId) throws ApiException { + okhttp3.Call localVarCall = removeCommunityHouseValidateBeforeCall(communityId, houseId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Remove of house from the community given a community id and a house id + * @param communityId (required) + * @param houseId (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 house was removed -
400 If params are invalid -
+ */ + public okhttp3.Call removeCommunityHouseAsync(String communityId, String houseId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = removeCommunityHouseValidateBeforeCall(communityId, houseId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/gen/src/main/java/org/openapitools/client/api/PaymentsApi.java b/gen/src/main/java/org/openapitools/client/api/PaymentsApi.java new file mode 100644 index 00000000..5a988e36 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/api/PaymentsApi.java @@ -0,0 +1,538 @@ +/* + * 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.ListAdminPaymentsResponse; +import org.openapitools.client.model.ListMemberPaymentsResponse; +import org.openapitools.client.model.Pageable; +import org.openapitools.client.model.SchedulePaymentRequest; +import org.openapitools.client.model.SchedulePaymentResponse; + +import java.lang.reflect.Type; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class PaymentsApi { + private ApiClient localVarApiClient; + + public PaymentsApi() { + this(Configuration.getDefaultApiClient()); + } + + public PaymentsApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for listAllAdminScheduledPayments + * @param communityId The id of community (required) + * @param adminId The id of admin (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 communityId and adminId are valid. Response body has the details -
404 If communityId or adminId are invalid -
+ */ + public okhttp3.Call listAllAdminScheduledPaymentsCall(String communityId, String adminId, Pageable pageable, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/communities/{communityId}/admins/{adminId}/payments" + .replaceAll("\\{" + "communityId" + "\\}", localVarApiClient.escapeString(communityId.toString())) + .replaceAll("\\{" + "adminId" + "\\}", localVarApiClient.escapeString(adminId.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 listAllAdminScheduledPaymentsValidateBeforeCall(String communityId, String adminId, 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 listAllAdminScheduledPayments(Async)"); + } + + // verify the required parameter 'adminId' is set + if (adminId == null) { + throw new ApiException("Missing the required parameter 'adminId' when calling listAllAdminScheduledPayments(Async)"); + } + + + okhttp3.Call localVarCall = listAllAdminScheduledPaymentsCall(communityId, adminId, pageable, _callback); + return localVarCall; + + } + + /** + * + * Get all payments scheduled by the specified admin + * @param communityId The id of community (required) + * @param adminId The id of admin (required) + * @param pageable (optional) + * @return ListAdminPaymentsResponse + * @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 communityId and adminId are valid. Response body has the details -
404 If communityId or adminId are invalid -
+ */ + public ListAdminPaymentsResponse listAllAdminScheduledPayments(String communityId, String adminId, Pageable pageable) throws ApiException { + ApiResponse localVarResp = listAllAdminScheduledPaymentsWithHttpInfo(communityId, adminId, pageable); + return localVarResp.getData(); + } + + /** + * + * Get all payments scheduled by the specified admin + * @param communityId The id of community (required) + * @param adminId The id of admin (required) + * @param pageable (optional) + * @return ApiResponse<ListAdminPaymentsResponse> + * @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 communityId and adminId are valid. Response body has the details -
404 If communityId or adminId are invalid -
+ */ + public ApiResponse listAllAdminScheduledPaymentsWithHttpInfo(String communityId, String adminId, Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listAllAdminScheduledPaymentsValidateBeforeCall(communityId, adminId, pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get all payments scheduled by the specified admin + * @param communityId The id of community (required) + * @param adminId The id of admin (required) + * @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 If communityId and adminId are valid. Response body has the details -
404 If communityId or adminId are invalid -
+ */ + public okhttp3.Call listAllAdminScheduledPaymentsAsync(String communityId, String adminId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAllAdminScheduledPaymentsValidateBeforeCall(communityId, adminId, pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listAllMemberPayments + * @param memberId Member Id to use for getting all payments (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 memberId is valid. Response body has the details -
404 If memberId is invalid -
+ */ + public okhttp3.Call listAllMemberPaymentsCall(String memberId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/members/{memberId}/payments" + .replaceAll("\\{" + "memberId" + "\\}", localVarApiClient.escapeString(memberId.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 listAllMemberPaymentsValidateBeforeCall(String memberId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'memberId' is set + if (memberId == null) { + throw new ApiException("Missing the required parameter 'memberId' when calling listAllMemberPayments(Async)"); + } + + + okhttp3.Call localVarCall = listAllMemberPaymentsCall(memberId, _callback); + return localVarCall; + + } + + /** + * + * Get all payments for the specified member + * @param memberId Member Id to use for getting all payments (required) + * @return ListMemberPaymentsResponse + * @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 memberId is valid. Response body has the details -
404 If memberId is invalid -
+ */ + public ListMemberPaymentsResponse listAllMemberPayments(String memberId) throws ApiException { + ApiResponse localVarResp = listAllMemberPaymentsWithHttpInfo(memberId); + return localVarResp.getData(); + } + + /** + * + * Get all payments for the specified member + * @param memberId Member Id to use for getting all payments (required) + * @return ApiResponse<ListMemberPaymentsResponse> + * @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 memberId is valid. Response body has the details -
404 If memberId is invalid -
+ */ + public ApiResponse listAllMemberPaymentsWithHttpInfo(String memberId) throws ApiException { + okhttp3.Call localVarCall = listAllMemberPaymentsValidateBeforeCall(memberId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get all payments for the specified member + * @param memberId Member Id to use for getting all payments (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 memberId is valid. Response body has the details -
404 If memberId is invalid -
+ */ + public okhttp3.Call listAllMemberPaymentsAsync(String memberId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAllMemberPaymentsValidateBeforeCall(memberId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listPaymentDetails + * @param paymentId Payment ID (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 payment is valid. Response body has the details -
404 If paymentId is invalid -
+ */ + public okhttp3.Call listPaymentDetailsCall(String paymentId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/payments/{paymentId}" + .replaceAll("\\{" + "paymentId" + "\\}", localVarApiClient.escapeString(paymentId.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 listPaymentDetailsValidateBeforeCall(String paymentId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'paymentId' is set + if (paymentId == null) { + throw new ApiException("Missing the required parameter 'paymentId' when calling listPaymentDetails(Async)"); + } + + + okhttp3.Call localVarCall = listPaymentDetailsCall(paymentId, _callback); + return localVarCall; + + } + + /** + * + * Get details about a payment with the given payment id + * @param paymentId Payment ID (required) + * @return SchedulePaymentResponse + * @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 payment is valid. Response body has the details -
404 If paymentId is invalid -
+ */ + public SchedulePaymentResponse listPaymentDetails(String paymentId) throws ApiException { + ApiResponse localVarResp = listPaymentDetailsWithHttpInfo(paymentId); + return localVarResp.getData(); + } + + /** + * + * Get details about a payment with the given payment id + * @param paymentId Payment ID (required) + * @return ApiResponse<SchedulePaymentResponse> + * @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 payment is valid. Response body has the details -
404 If paymentId is invalid -
+ */ + public ApiResponse listPaymentDetailsWithHttpInfo(String paymentId) throws ApiException { + okhttp3.Call localVarCall = listPaymentDetailsValidateBeforeCall(paymentId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get details about a payment with the given payment id + * @param paymentId Payment ID (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 payment is valid. Response body has the details -
404 If paymentId is invalid -
+ */ + public okhttp3.Call listPaymentDetailsAsync(String paymentId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listPaymentDetailsValidateBeforeCall(paymentId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for schedulePayment + * @param schedulePaymentRequest CreateUserRequest 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 schedule payment is created -
+ */ + public okhttp3.Call schedulePaymentCall(SchedulePaymentRequest schedulePaymentRequest, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = schedulePaymentRequest; + + // create path and map variables + String localVarPath = "/payments"; + + 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 schedulePaymentValidateBeforeCall(SchedulePaymentRequest schedulePaymentRequest, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'schedulePaymentRequest' is set + if (schedulePaymentRequest == null) { + throw new ApiException("Missing the required parameter 'schedulePaymentRequest' when calling schedulePayment(Async)"); + } + + + okhttp3.Call localVarCall = schedulePaymentCall(schedulePaymentRequest, _callback); + return localVarCall; + + } + + /** + * + * Schedule a new payment + * @param schedulePaymentRequest CreateUserRequest aggregate fields (required) + * @return SchedulePaymentResponse + * @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 schedule payment is created -
+ */ + public SchedulePaymentResponse schedulePayment(SchedulePaymentRequest schedulePaymentRequest) throws ApiException { + ApiResponse localVarResp = schedulePaymentWithHttpInfo(schedulePaymentRequest); + return localVarResp.getData(); + } + + /** + * + * Schedule a new payment + * @param schedulePaymentRequest CreateUserRequest aggregate fields (required) + * @return ApiResponse<SchedulePaymentResponse> + * @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 schedule payment is created -
+ */ + public ApiResponse schedulePaymentWithHttpInfo(SchedulePaymentRequest schedulePaymentRequest) throws ApiException { + okhttp3.Call localVarCall = schedulePaymentValidateBeforeCall(schedulePaymentRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Schedule a new payment + * @param schedulePaymentRequest CreateUserRequest 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 schedule payment is created -
+ */ + public okhttp3.Call schedulePaymentAsync(SchedulePaymentRequest schedulePaymentRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = schedulePaymentValidateBeforeCall(schedulePaymentRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } +} diff --git a/gen/src/main/java/org/openapitools/client/api/UsersApi.java b/gen/src/main/java/org/openapitools/client/api/UsersApi.java new file mode 100644 index 00000000..7f45e856 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/api/UsersApi.java @@ -0,0 +1,882 @@ +/* + * 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.CreateUserRequest; +import org.openapitools.client.model.CreateUserResponse; +import org.openapitools.client.model.ForgotPasswordRequest; +import org.openapitools.client.model.GetUserDetailsResponse; +import org.openapitools.client.model.GetUserDetailsResponseUser; +import org.openapitools.client.model.ListHouseMembersResponse; +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 UsersApi { + private ApiClient localVarApiClient; + + public UsersApi() { + this(Configuration.getDefaultApiClient()); + } + + public UsersApi(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + public ApiClient getApiClient() { + return localVarApiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.localVarApiClient = apiClient; + } + + /** + * Build call for confirmEmail + * @param userId Id of the user for confirm email (required) + * @param emailConfirmToken Tocken from user email (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 Email was successfully confirmed -
400 Email confirmation error -
+ */ + public okhttp3.Call confirmEmailCall(String userId, String emailConfirmToken, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users/{userId}/email-confirm/{emailConfirmToken}" + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.toString())) + .replaceAll("\\{" + "emailConfirmToken" + "\\}", localVarApiClient.escapeString(emailConfirmToken.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[] { }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call confirmEmailValidateBeforeCall(String userId, String emailConfirmToken, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling confirmEmail(Async)"); + } + + // verify the required parameter 'emailConfirmToken' is set + if (emailConfirmToken == null) { + throw new ApiException("Missing the required parameter 'emailConfirmToken' when calling confirmEmail(Async)"); + } + + + okhttp3.Call localVarCall = confirmEmailCall(userId, emailConfirmToken, _callback); + return localVarCall; + + } + + /** + * + * Confirm user email + * @param userId Id of the user for confirm email (required) + * @param emailConfirmToken Tocken from user email (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 Email was successfully confirmed -
400 Email confirmation error -
+ */ + public void confirmEmail(String userId, String emailConfirmToken) throws ApiException { + confirmEmailWithHttpInfo(userId, emailConfirmToken); + } + + /** + * + * Confirm user email + * @param userId Id of the user for confirm email (required) + * @param emailConfirmToken Tocken from user email (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 Email was successfully confirmed -
400 Email confirmation error -
+ */ + public ApiResponse confirmEmailWithHttpInfo(String userId, String emailConfirmToken) throws ApiException { + okhttp3.Call localVarCall = confirmEmailValidateBeforeCall(userId, emailConfirmToken, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Confirm user email + * @param userId Id of the user for confirm email (required) + * @param emailConfirmToken Tocken from user email (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 Email was successfully confirmed -
400 Email confirmation error -
+ */ + public okhttp3.Call confirmEmailAsync(String userId, String emailConfirmToken, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = confirmEmailValidateBeforeCall(userId, emailConfirmToken, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for getUserDetails + * @param userId ID of the user to get (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 userId is valid. Response body has the details -
404 If userId is invalid -
+ */ + public okhttp3.Call getUserDetailsCall(String userId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users/{userId}" + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.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 getUserDetailsValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling getUserDetails(Async)"); + } + + + okhttp3.Call localVarCall = getUserDetailsCall(userId, _callback); + return localVarCall; + + } + + /** + * + * Get details of a user given userId + * @param userId ID of the user to get (required) + * @return GetUserDetailsResponseUser + * @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 userId is valid. Response body has the details -
404 If userId is invalid -
+ */ + public GetUserDetailsResponseUser getUserDetails(String userId) throws ApiException { + ApiResponse localVarResp = getUserDetailsWithHttpInfo(userId); + return localVarResp.getData(); + } + + /** + * + * Get details of a user given userId + * @param userId ID of the user to get (required) + * @return ApiResponse<GetUserDetailsResponseUser> + * @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 userId is valid. Response body has the details -
404 If userId is invalid -
+ */ + public ApiResponse getUserDetailsWithHttpInfo(String userId) throws ApiException { + okhttp3.Call localVarCall = getUserDetailsValidateBeforeCall(userId, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Get details of a user given userId + * @param userId ID of the user to get (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 userId is valid. Response body has the details -
404 If userId is invalid -
+ */ + public okhttp3.Call getUserDetailsAsync(String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getUserDetailsValidateBeforeCall(userId, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listAllHousemates + * @param userId ID of the user for which to find housemates (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 Returns list of all members from all houses of the specified user -
+ */ + public okhttp3.Call listAllHousematesCall(String userId, Pageable pageable, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users/{userId}/housemates" + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.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 listAllHousematesValidateBeforeCall(String userId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling listAllHousemates(Async)"); + } + + + okhttp3.Call localVarCall = listAllHousematesCall(userId, pageable, _callback); + return localVarCall; + + } + + /** + * + * Lists all members from all houses of a user + * @param userId ID of the user for which to find housemates (required) + * @param pageable (optional) + * @return ListHouseMembersResponse + * @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 all members from all houses of the specified user -
+ */ + public ListHouseMembersResponse listAllHousemates(String userId, Pageable pageable) throws ApiException { + ApiResponse localVarResp = listAllHousematesWithHttpInfo(userId, pageable); + return localVarResp.getData(); + } + + /** + * + * Lists all members from all houses of a user + * @param userId ID of the user for which to find housemates (required) + * @param pageable (optional) + * @return ApiResponse<ListHouseMembersResponse> + * @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 all members from all houses of the specified user -
+ */ + public ApiResponse listAllHousematesWithHttpInfo(String userId, Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listAllHousematesValidateBeforeCall(userId, pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Lists all members from all houses of a user + * @param userId ID of the user for which to find housemates (required) + * @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 all members from all houses of the specified user -
+ */ + public okhttp3.Call listAllHousematesAsync(String userId, Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAllHousematesValidateBeforeCall(userId, pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for listAllUsers + * @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 users -
+ */ + public okhttp3.Call listAllUsersCall(Pageable pageable, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users"; + + 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 listAllUsersValidateBeforeCall(Pageable pageable, final ApiCallback _callback) throws ApiException { + + + okhttp3.Call localVarCall = listAllUsersCall(pageable, _callback); + return localVarCall; + + } + + /** + * + * Lists all users + * @param pageable (optional) + * @return GetUserDetailsResponse + * @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 users -
+ */ + public GetUserDetailsResponse listAllUsers(Pageable pageable) throws ApiException { + ApiResponse localVarResp = listAllUsersWithHttpInfo(pageable); + return localVarResp.getData(); + } + + /** + * + * Lists all users + * @param pageable (optional) + * @return ApiResponse<GetUserDetailsResponse> + * @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 users -
+ */ + public ApiResponse listAllUsersWithHttpInfo(Pageable pageable) throws ApiException { + okhttp3.Call localVarCall = listAllUsersValidateBeforeCall(pageable, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Lists all users + * @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 users -
+ */ + public okhttp3.Call listAllUsersAsync(Pageable pageable, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = listAllUsersValidateBeforeCall(pageable, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for resendConfirmEmailMail + * @param userId ID of the user for resend confirm email (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 Email was successfully send -
400 Email send error -
+ */ + public okhttp3.Call resendConfirmEmailMailCall(String userId, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users/{userId}/email-confirm-resend" + .replaceAll("\\{" + "userId" + "\\}", localVarApiClient.escapeString(userId.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[] { }; + return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call resendConfirmEmailMailValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling resendConfirmEmailMail(Async)"); + } + + + okhttp3.Call localVarCall = resendConfirmEmailMailCall(userId, _callback); + return localVarCall; + + } + + /** + * + * Resend email confirm mail + * @param userId ID of the user for resend confirm email (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 Email was successfully send -
400 Email send error -
+ */ + public void resendConfirmEmailMail(String userId) throws ApiException { + resendConfirmEmailMailWithHttpInfo(userId); + } + + /** + * + * Resend email confirm mail + * @param userId ID of the user for resend confirm email (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 Email was successfully send -
400 Email send error -
+ */ + public ApiResponse resendConfirmEmailMailWithHttpInfo(String userId) throws ApiException { + okhttp3.Call localVarCall = resendConfirmEmailMailValidateBeforeCall(userId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Resend email confirm mail + * @param userId ID of the user for resend confirm email (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 Email was successfully send -
400 Email send error -
+ */ + public okhttp3.Call resendConfirmEmailMailAsync(String userId, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = resendConfirmEmailMailValidateBeforeCall(userId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + /** + * Build call for signUp + * @param createUserRequest CreateUserRequest 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 user created -
409 If user already exists -
+ */ + public okhttp3.Call signUpCall(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = createUserRequest; + + // create path and map variables + String localVarPath = "/users"; + + 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[] { }; + return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call signUpValidateBeforeCall(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'createUserRequest' is set + if (createUserRequest == null) { + throw new ApiException("Missing the required parameter 'createUserRequest' when calling signUp(Async)"); + } + + + okhttp3.Call localVarCall = signUpCall(createUserRequest, _callback); + return localVarCall; + + } + + /** + * + * Create a new user + * @param createUserRequest CreateUserRequest aggregate fields (required) + * @return CreateUserResponse + * @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 user created -
409 If user already exists -
+ */ + public CreateUserResponse signUp(CreateUserRequest createUserRequest) throws ApiException { + ApiResponse localVarResp = signUpWithHttpInfo(createUserRequest); + return localVarResp.getData(); + } + + /** + * + * Create a new user + * @param createUserRequest CreateUserRequest aggregate fields (required) + * @return ApiResponse<CreateUserResponse> + * @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 user created -
409 If user already exists -
+ */ + public ApiResponse signUpWithHttpInfo(CreateUserRequest createUserRequest) throws ApiException { + okhttp3.Call localVarCall = signUpValidateBeforeCall(createUserRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * (asynchronously) + * Create a new user + * @param createUserRequest CreateUserRequest 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 user created -
409 If user already exists -
+ */ + public okhttp3.Call signUpAsync(CreateUserRequest createUserRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = signUpValidateBeforeCall(createUserRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + /** + * Build call for usersPasswordPost + * @param action Acton with user password (forgot or reset) (required) + * @param forgotPasswordRequest (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 password reset -
400 If wrong password reset token -
+ */ + public okhttp3.Call usersPasswordPostCall(String action, ForgotPasswordRequest forgotPasswordRequest, final ApiCallback _callback) throws ApiException { + Object localVarPostBody = forgotPasswordRequest; + + // create path and map variables + String localVarPath = "/users/password"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (action != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("action", action)); + } + + 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 usersPasswordPostValidateBeforeCall(String action, ForgotPasswordRequest forgotPasswordRequest, final ApiCallback _callback) throws ApiException { + + // verify the required parameter 'action' is set + if (action == null) { + throw new ApiException("Missing the required parameter 'action' when calling usersPasswordPost(Async)"); + } + + // verify the required parameter 'forgotPasswordRequest' is set + if (forgotPasswordRequest == null) { + throw new ApiException("Missing the required parameter 'forgotPasswordRequest' when calling usersPasswordPost(Async)"); + } + + + okhttp3.Call localVarCall = usersPasswordPostCall(action, forgotPasswordRequest, _callback); + return localVarCall; + + } + + /** + * + * Request reset password or reset password + * @param action Acton with user password (forgot or reset) (required) + * @param forgotPasswordRequest (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 If password reset -
400 If wrong password reset token -
+ */ + public void usersPasswordPost(String action, ForgotPasswordRequest forgotPasswordRequest) throws ApiException { + usersPasswordPostWithHttpInfo(action, forgotPasswordRequest); + } + + /** + * + * Request reset password or reset password + * @param action Acton with user password (forgot or reset) (required) + * @param forgotPasswordRequest (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 If password reset -
400 If wrong password reset token -
+ */ + public ApiResponse usersPasswordPostWithHttpInfo(String action, ForgotPasswordRequest forgotPasswordRequest) throws ApiException { + okhttp3.Call localVarCall = usersPasswordPostValidateBeforeCall(action, forgotPasswordRequest, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * (asynchronously) + * Request reset password or reset password + * @param action Acton with user password (forgot or reset) (required) + * @param forgotPasswordRequest (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 password reset -
400 If wrong password reset token -
+ */ + public okhttp3.Call usersPasswordPostAsync(String action, ForgotPasswordRequest forgotPasswordRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = usersPasswordPostValidateBeforeCall(action, forgotPasswordRequest, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } +} diff --git a/gen/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/gen/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java new file mode 100644 index 00000000..f6ce893b --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -0,0 +1,77 @@ +/* + * 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.auth; + +import org.openapitools.client.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ApiKeyAuth implements Authentication { + private final String location; + private final String paramName; + + private String apiKey; + private String apiKeyPrefix; + + public ApiKeyAuth(String location, String paramName) { + this.location = location; + this.paramName = paramName; + } + + public String getLocation() { + return location; + } + + public String getParamName() { + return paramName; + } + + public String getApiKey() { + return apiKey; + } + + public void setApiKey(String apiKey) { + this.apiKey = apiKey; + } + + public String getApiKeyPrefix() { + return apiKeyPrefix; + } + + public void setApiKeyPrefix(String apiKeyPrefix) { + this.apiKeyPrefix = apiKeyPrefix; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (apiKey == null) { + return; + } + String value; + if (apiKeyPrefix != null) { + value = apiKeyPrefix + " " + apiKey; + } else { + value = apiKey; + } + if ("query".equals(location)) { + queryParams.add(new Pair(paramName, value)); + } else if ("header".equals(location)) { + headerParams.put(paramName, value); + } else if ("cookie".equals(location)) { + cookieParams.put(paramName, value); + } + } +} diff --git a/gen/src/main/java/org/openapitools/client/auth/Authentication.java b/gen/src/main/java/org/openapitools/client/auth/Authentication.java new file mode 100644 index 00000000..5fb1f7ec --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/auth/Authentication.java @@ -0,0 +1,30 @@ +/* + * 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.auth; + +import org.openapitools.client.Pair; + +import java.util.Map; +import java.util.List; + +public interface Authentication { + /** + * Apply authentication settings to header and query params. + * + * @param queryParams List of query parameters + * @param headerParams Map of header parameters + * @param cookieParams Map of cookie parameters + */ + void applyToParams(List queryParams, Map headerParams, Map cookieParams); +} diff --git a/gen/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/gen/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java new file mode 100644 index 00000000..8a8357aa --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -0,0 +1,54 @@ +/* + * 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.auth; + +import org.openapitools.client.Pair; + +import okhttp3.Credentials; + +import java.util.Map; +import java.util.List; + +import java.io.UnsupportedEncodingException; + +public class HttpBasicAuth implements Authentication { + private String username; + private String password; + + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if (username == null && password == null) { + return; + } + headerParams.put("Authorization", Credentials.basic( + username == null ? "" : username, + password == null ? "" : password)); + } +} diff --git a/gen/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/gen/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java new file mode 100644 index 00000000..776091d5 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -0,0 +1,60 @@ +/* + * 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.auth; + +import org.openapitools.client.Pair; + +import java.util.Map; +import java.util.List; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class HttpBearerAuth implements Authentication { + private final String scheme; + private String bearerToken; + + public HttpBearerAuth(String scheme) { + this.scheme = scheme; + } + + /** + * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @return The bearer token + */ + public String getBearerToken() { + return bearerToken; + } + + /** + * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. + * + * @param bearerToken The bearer token to send in the Authorization header + */ + public void setBearerToken(String bearerToken) { + this.bearerToken = bearerToken; + } + + @Override + public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { + if(bearerToken == null) { + return; + } + + headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); + } + + private static String upperCaseBearer(String scheme) { + return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; + } +} diff --git a/gen/src/main/java/org/openapitools/client/model/AddAmenityRequest.java b/gen/src/main/java/org/openapitools/client/model/AddAmenityRequest.java new file mode 100644 index 00000000..ded2b9c9 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddAmenityRequest.java @@ -0,0 +1,111 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.AmenityDto; + +/** + * AddAmenityRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddAmenityRequest { + public static final String SERIALIZED_NAME_AMENITIES = "amenities"; + @SerializedName(SERIALIZED_NAME_AMENITIES) + private Set amenities = null; + + + public AddAmenityRequest amenities(Set amenities) { + + this.amenities = amenities; + return this; + } + + public AddAmenityRequest addAmenitiesItem(AmenityDto amenitiesItem) { + if (this.amenities == null) { + this.amenities = new LinkedHashSet(); + } + this.amenities.add(amenitiesItem); + return this; + } + + /** + * Get amenities + * @return amenities + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Set getAmenities() { + return amenities; + } + + + public void setAmenities(Set amenities) { + this.amenities = amenities; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddAmenityRequest addAmenityRequest = (AddAmenityRequest) o; + return Objects.equals(this.amenities, addAmenityRequest.amenities); + } + + @Override + public int hashCode() { + return Objects.hash(amenities); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddAmenityRequest {\n"); + sb.append(" amenities: ").append(toIndentedString(amenities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddAmenityResponse.java b/gen/src/main/java/org/openapitools/client/model/AddAmenityResponse.java new file mode 100644 index 00000000..133b4f49 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddAmenityResponse.java @@ -0,0 +1,110 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.AmenityDto; + +/** + * AddAmenityResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddAmenityResponse { + public static final String SERIALIZED_NAME_AMENITIES = "amenities"; + @SerializedName(SERIALIZED_NAME_AMENITIES) + private List amenities = null; + + + public AddAmenityResponse amenities(List amenities) { + + this.amenities = amenities; + return this; + } + + public AddAmenityResponse addAmenitiesItem(AmenityDto amenitiesItem) { + if (this.amenities == null) { + this.amenities = new ArrayList(); + } + this.amenities.add(amenitiesItem); + return this; + } + + /** + * Get amenities + * @return amenities + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public List getAmenities() { + return amenities; + } + + + public void setAmenities(List amenities) { + this.amenities = amenities; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddAmenityResponse addAmenityResponse = (AddAmenityResponse) o; + return Objects.equals(this.amenities, addAmenityResponse.amenities); + } + + @Override + public int hashCode() { + return Objects.hash(amenities); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddAmenityResponse {\n"); + sb.append(" amenities: ").append(toIndentedString(amenities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddCommunityAdminRequest.java b/gen/src/main/java/org/openapitools/client/model/AddCommunityAdminRequest.java new file mode 100644 index 00000000..5c68fdac --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddCommunityAdminRequest.java @@ -0,0 +1,106 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +/** + * AddCommunityAdminRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddCommunityAdminRequest { + public static final String SERIALIZED_NAME_ADMINS = "admins"; + @SerializedName(SERIALIZED_NAME_ADMINS) + private Set admins = new LinkedHashSet(); + + + public AddCommunityAdminRequest admins(Set admins) { + + this.admins = admins; + return this; + } + + public AddCommunityAdminRequest addAdminsItem(String adminsItem) { + this.admins.add(adminsItem); + return this; + } + + /** + * Get admins + * @return admins + **/ + @ApiModelProperty(required = true, value = "") + + public Set getAdmins() { + return admins; + } + + + public void setAdmins(Set admins) { + this.admins = admins; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCommunityAdminRequest addCommunityAdminRequest = (AddCommunityAdminRequest) o; + return Objects.equals(this.admins, addCommunityAdminRequest.admins); + } + + @Override + public int hashCode() { + return Objects.hash(admins); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCommunityAdminRequest {\n"); + sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddCommunityAdminResponse.java b/gen/src/main/java/org/openapitools/client/model/AddCommunityAdminResponse.java new file mode 100644 index 00000000..23274e7f --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddCommunityAdminResponse.java @@ -0,0 +1,106 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +/** + * AddCommunityAdminResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddCommunityAdminResponse { + public static final String SERIALIZED_NAME_ADMINS = "admins"; + @SerializedName(SERIALIZED_NAME_ADMINS) + private Set admins = new LinkedHashSet(); + + + public AddCommunityAdminResponse admins(Set admins) { + + this.admins = admins; + return this; + } + + public AddCommunityAdminResponse addAdminsItem(String adminsItem) { + this.admins.add(adminsItem); + return this; + } + + /** + * Get admins + * @return admins + **/ + @ApiModelProperty(required = true, value = "") + + public Set getAdmins() { + return admins; + } + + + public void setAdmins(Set admins) { + this.admins = admins; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCommunityAdminResponse addCommunityAdminResponse = (AddCommunityAdminResponse) o; + return Objects.equals(this.admins, addCommunityAdminResponse.admins); + } + + @Override + public int hashCode() { + return Objects.hash(admins); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCommunityAdminResponse {\n"); + sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddCommunityHouseRequest.java b/gen/src/main/java/org/openapitools/client/model/AddCommunityHouseRequest.java new file mode 100644 index 00000000..632988e8 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddCommunityHouseRequest.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.CommunityHouseName; + +/** + * AddCommunityHouseRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddCommunityHouseRequest { + public static final String SERIALIZED_NAME_HOUSES = "houses"; + @SerializedName(SERIALIZED_NAME_HOUSES) + private Set houses = new LinkedHashSet(); + + + public AddCommunityHouseRequest houses(Set houses) { + + this.houses = houses; + return this; + } + + public AddCommunityHouseRequest addHousesItem(CommunityHouseName housesItem) { + this.houses.add(housesItem); + return this; + } + + /** + * Get houses + * @return houses + **/ + @ApiModelProperty(required = true, value = "") + + public Set getHouses() { + return houses; + } + + + public void setHouses(Set houses) { + this.houses = houses; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCommunityHouseRequest addCommunityHouseRequest = (AddCommunityHouseRequest) o; + return Objects.equals(this.houses, addCommunityHouseRequest.houses); + } + + @Override + public int hashCode() { + return Objects.hash(houses); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCommunityHouseRequest {\n"); + sb.append(" houses: ").append(toIndentedString(houses)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddCommunityHouseResponse.java b/gen/src/main/java/org/openapitools/client/model/AddCommunityHouseResponse.java new file mode 100644 index 00000000..342e9222 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddCommunityHouseResponse.java @@ -0,0 +1,106 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +/** + * AddCommunityHouseResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddCommunityHouseResponse { + public static final String SERIALIZED_NAME_HOUSES = "houses"; + @SerializedName(SERIALIZED_NAME_HOUSES) + private Set houses = new LinkedHashSet(); + + + public AddCommunityHouseResponse houses(Set houses) { + + this.houses = houses; + return this; + } + + public AddCommunityHouseResponse addHousesItem(String housesItem) { + this.houses.add(housesItem); + return this; + } + + /** + * Get houses + * @return houses + **/ + @ApiModelProperty(required = true, value = "") + + public Set getHouses() { + return houses; + } + + + public void setHouses(Set houses) { + this.houses = houses; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddCommunityHouseResponse addCommunityHouseResponse = (AddCommunityHouseResponse) o; + return Objects.equals(this.houses, addCommunityHouseResponse.houses); + } + + @Override + public int hashCode() { + return Objects.hash(houses); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddCommunityHouseResponse {\n"); + sb.append(" houses: ").append(toIndentedString(houses)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddHouseMemberRequest.java b/gen/src/main/java/org/openapitools/client/model/AddHouseMemberRequest.java new file mode 100644 index 00000000..8d640c00 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddHouseMemberRequest.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.HouseMemberDto; + +/** + * AddHouseMemberRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddHouseMemberRequest { + public static final String SERIALIZED_NAME_MEMBERS = "members"; + @SerializedName(SERIALIZED_NAME_MEMBERS) + private Set members = new LinkedHashSet(); + + + public AddHouseMemberRequest members(Set members) { + + this.members = members; + return this; + } + + public AddHouseMemberRequest addMembersItem(HouseMemberDto membersItem) { + this.members.add(membersItem); + return this; + } + + /** + * Get members + * @return members + **/ + @ApiModelProperty(required = true, value = "") + + public Set getMembers() { + return members; + } + + + public void setMembers(Set members) { + this.members = members; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddHouseMemberRequest addHouseMemberRequest = (AddHouseMemberRequest) o; + return Objects.equals(this.members, addHouseMemberRequest.members); + } + + @Override + public int hashCode() { + return Objects.hash(members); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddHouseMemberRequest {\n"); + sb.append(" members: ").append(toIndentedString(members)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AddHouseMemberResponse.java b/gen/src/main/java/org/openapitools/client/model/AddHouseMemberResponse.java new file mode 100644 index 00000000..a5c609c3 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AddHouseMemberResponse.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.HouseMember; + +/** + * AddHouseMemberResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AddHouseMemberResponse { + public static final String SERIALIZED_NAME_MEMBERS = "members"; + @SerializedName(SERIALIZED_NAME_MEMBERS) + private Set members = new LinkedHashSet(); + + + public AddHouseMemberResponse members(Set members) { + + this.members = members; + return this; + } + + public AddHouseMemberResponse addMembersItem(HouseMember membersItem) { + this.members.add(membersItem); + return this; + } + + /** + * Get members + * @return members + **/ + @ApiModelProperty(required = true, value = "") + + public Set getMembers() { + return members; + } + + + public void setMembers(Set members) { + this.members = members; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AddHouseMemberResponse addHouseMemberResponse = (AddHouseMemberResponse) o; + return Objects.equals(this.members, addHouseMemberResponse.members); + } + + @Override + public int hashCode() { + return Objects.hash(members); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddHouseMemberResponse {\n"); + sb.append(" members: ").append(toIndentedString(members)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AdminPayment.java b/gen/src/main/java/org/openapitools/client/model/AdminPayment.java new file mode 100644 index 00000000..5761b767 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AdminPayment.java @@ -0,0 +1,187 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * AdminPayment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AdminPayment { + public static final String SERIALIZED_NAME_ADMIN_ID = "adminId"; + @SerializedName(SERIALIZED_NAME_ADMIN_ID) + private String adminId; + + public static final String SERIALIZED_NAME_PAYMENT_ID = "paymentId"; + @SerializedName(SERIALIZED_NAME_PAYMENT_ID) + private String paymentId; + + public static final String SERIALIZED_NAME_CHARGE = "charge"; + @SerializedName(SERIALIZED_NAME_CHARGE) + private BigDecimal charge; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private String dueDate; + + + public AdminPayment adminId(String adminId) { + + this.adminId = adminId; + return this; + } + + /** + * Get adminId + * @return adminId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getAdminId() { + return adminId; + } + + + public void setAdminId(String adminId) { + this.adminId = adminId; + } + + + public AdminPayment paymentId(String paymentId) { + + this.paymentId = paymentId; + return this; + } + + /** + * Get paymentId + * @return paymentId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getPaymentId() { + return paymentId; + } + + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + + public AdminPayment charge(BigDecimal charge) { + + this.charge = charge; + return this; + } + + /** + * Get charge + * @return charge + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BigDecimal getCharge() { + return charge; + } + + + public void setCharge(BigDecimal charge) { + this.charge = charge; + } + + + public AdminPayment dueDate(String dueDate) { + + this.dueDate = dueDate; + return this; + } + + /** + * Get dueDate + * @return dueDate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDueDate() { + return dueDate; + } + + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AdminPayment adminPayment = (AdminPayment) o; + return Objects.equals(this.adminId, adminPayment.adminId) && + Objects.equals(this.paymentId, adminPayment.paymentId) && + Objects.equals(this.charge, adminPayment.charge) && + Objects.equals(this.dueDate, adminPayment.dueDate); + } + + @Override + public int hashCode() { + return Objects.hash(adminId, paymentId, charge, dueDate); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AdminPayment {\n"); + sb.append(" adminId: ").append(toIndentedString(adminId)).append("\n"); + sb.append(" paymentId: ").append(toIndentedString(paymentId)).append("\n"); + sb.append(" charge: ").append(toIndentedString(charge)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/AmenityDto.java b/gen/src/main/java/org/openapitools/client/model/AmenityDto.java new file mode 100644 index 00000000..0aeaad2e --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/AmenityDto.java @@ -0,0 +1,245 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * AmenityDto + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class AmenityDto { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Long id; + + public static final String SERIALIZED_NAME_AMENITY_ID = "amenityId"; + @SerializedName(SERIALIZED_NAME_AMENITY_ID) + private String amenityId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_PRICE = "price"; + @SerializedName(SERIALIZED_NAME_PRICE) + private BigDecimal price; + + public static final String SERIALIZED_NAME_COMMUNITY_ID = "communityId"; + @SerializedName(SERIALIZED_NAME_COMMUNITY_ID) + private String communityId; + + + public AmenityDto id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public AmenityDto amenityId(String amenityId) { + + this.amenityId = amenityId; + return this; + } + + /** + * Get amenityId + * @return amenityId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getAmenityId() { + return amenityId; + } + + + public void setAmenityId(String amenityId) { + this.amenityId = amenityId; + } + + + public AmenityDto name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public AmenityDto description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public AmenityDto price(BigDecimal price) { + + this.price = price; + return this; + } + + /** + * Get price + * @return price + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BigDecimal getPrice() { + return price; + } + + + public void setPrice(BigDecimal price) { + this.price = price; + } + + + public AmenityDto communityId(String communityId) { + + this.communityId = communityId; + return this; + } + + /** + * Get communityId + * @return communityId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getCommunityId() { + return communityId; + } + + + public void setCommunityId(String communityId) { + this.communityId = communityId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AmenityDto amenityDto = (AmenityDto) o; + return Objects.equals(this.id, amenityDto.id) && + Objects.equals(this.amenityId, amenityDto.amenityId) && + Objects.equals(this.name, amenityDto.name) && + Objects.equals(this.description, amenityDto.description) && + Objects.equals(this.price, amenityDto.price) && + Objects.equals(this.communityId, amenityDto.communityId); + } + + @Override + public int hashCode() { + return Objects.hash(id, amenityId, name, description, price, communityId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AmenityDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" amenityId: ").append(toIndentedString(amenityId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" communityId: ").append(toIndentedString(communityId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/CommunityHouseName.java b/gen/src/main/java/org/openapitools/client/model/CommunityHouseName.java new file mode 100644 index 00000000..790df9e2 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/CommunityHouseName.java @@ -0,0 +1,99 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CommunityHouseName + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class CommunityHouseName { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public CommunityHouseName name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CommunityHouseName communityHouseName = (CommunityHouseName) o; + return Objects.equals(this.name, communityHouseName.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommunityHouseName {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/CreateCommunityRequest.java b/gen/src/main/java/org/openapitools/client/model/CreateCommunityRequest.java new file mode 100644 index 00000000..8c44f90c --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/CreateCommunityRequest.java @@ -0,0 +1,126 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateCommunityRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class CreateCommunityRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DISTRICT = "district"; + @SerializedName(SERIALIZED_NAME_DISTRICT) + private String district; + + + public CreateCommunityRequest name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(required = true, value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateCommunityRequest district(String district) { + + this.district = district; + return this; + } + + /** + * Get district + * @return district + **/ + @ApiModelProperty(required = true, value = "") + + public String getDistrict() { + return district; + } + + + public void setDistrict(String district) { + this.district = district; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCommunityRequest createCommunityRequest = (CreateCommunityRequest) o; + return Objects.equals(this.name, createCommunityRequest.name) && + Objects.equals(this.district, createCommunityRequest.district); + } + + @Override + public int hashCode() { + return Objects.hash(name, district); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCommunityRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" district: ").append(toIndentedString(district)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/CreateCommunityResponse.java b/gen/src/main/java/org/openapitools/client/model/CreateCommunityResponse.java new file mode 100644 index 00000000..af47d63e --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/CreateCommunityResponse.java @@ -0,0 +1,98 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateCommunityResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class CreateCommunityResponse { + public static final String SERIALIZED_NAME_COMMUNITY_ID = "communityId"; + @SerializedName(SERIALIZED_NAME_COMMUNITY_ID) + private String communityId; + + + public CreateCommunityResponse communityId(String communityId) { + + this.communityId = communityId; + return this; + } + + /** + * Get communityId + * @return communityId + **/ + @ApiModelProperty(required = true, value = "") + + public String getCommunityId() { + return communityId; + } + + + public void setCommunityId(String communityId) { + this.communityId = communityId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateCommunityResponse createCommunityResponse = (CreateCommunityResponse) o; + return Objects.equals(this.communityId, createCommunityResponse.communityId); + } + + @Override + public int hashCode() { + return Objects.hash(communityId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateCommunityResponse {\n"); + sb.append(" communityId: ").append(toIndentedString(communityId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/CreateUserRequest.java b/gen/src/main/java/org/openapitools/client/model/CreateUserRequest.java new file mode 100644 index 00000000..fd7e48be --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/CreateUserRequest.java @@ -0,0 +1,156 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateUserRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class CreateUserRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + private String password; + + + public CreateUserRequest name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(required = true, value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateUserRequest email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public CreateUserRequest password(String password) { + + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserRequest createUserRequest = (CreateUserRequest) o; + return Objects.equals(this.name, createUserRequest.name) && + Objects.equals(this.email, createUserRequest.email) && + Objects.equals(this.password, createUserRequest.password); + } + + @Override + public int hashCode() { + return Objects.hash(name, email, password); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/CreateUserResponse.java b/gen/src/main/java/org/openapitools/client/model/CreateUserResponse.java new file mode 100644 index 00000000..cdd7784b --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/CreateUserResponse.java @@ -0,0 +1,157 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateUserResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class CreateUserResponse { + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + + public CreateUserResponse userId(String userId) { + + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public CreateUserResponse name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public CreateUserResponse email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateUserResponse createUserResponse = (CreateUserResponse) o; + return Objects.equals(this.userId, createUserResponse.userId) && + Objects.equals(this.name, createUserResponse.name) && + Objects.equals(this.email, createUserResponse.email); + } + + @Override + public int hashCode() { + return Objects.hash(userId, name, email); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateUserResponse {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/ForgotPasswordRequest.java b/gen/src/main/java/org/openapitools/client/model/ForgotPasswordRequest.java new file mode 100644 index 00000000..38cdf538 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/ForgotPasswordRequest.java @@ -0,0 +1,157 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ForgotPasswordRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ForgotPasswordRequest { + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_TOKEN = "token"; + @SerializedName(SERIALIZED_NAME_TOKEN) + private String token; + + public static final String SERIALIZED_NAME_NEW_PASSWORD = "newPassword"; + @SerializedName(SERIALIZED_NAME_NEW_PASSWORD) + private String newPassword; + + + public ForgotPasswordRequest email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public ForgotPasswordRequest token(String token) { + + this.token = token; + return this; + } + + /** + * Get token + * @return token + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getToken() { + return token; + } + + + public void setToken(String token) { + this.token = token; + } + + + public ForgotPasswordRequest newPassword(String newPassword) { + + this.newPassword = newPassword; + return this; + } + + /** + * Get newPassword + * @return newPassword + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getNewPassword() { + return newPassword; + } + + + public void setNewPassword(String newPassword) { + this.newPassword = newPassword; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ForgotPasswordRequest forgotPasswordRequest = (ForgotPasswordRequest) o; + return Objects.equals(this.email, forgotPasswordRequest.email) && + Objects.equals(this.token, forgotPasswordRequest.token) && + Objects.equals(this.newPassword, forgotPasswordRequest.newPassword); + } + + @Override + public int hashCode() { + return Objects.hash(email, token, newPassword); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ForgotPasswordRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" token: ").append(toIndentedString(token)).append("\n"); + sb.append(" newPassword: ").append(toIndentedString(newPassword)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetAmenityDetailsResponse.java b/gen/src/main/java/org/openapitools/client/model/GetAmenityDetailsResponse.java new file mode 100644 index 00000000..4e99d1ee --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetAmenityDetailsResponse.java @@ -0,0 +1,128 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetAmenityDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetAmenityDetailsResponse { + public static final String SERIALIZED_NAME_AMENITY_ID = "amenityId"; + @SerializedName(SERIALIZED_NAME_AMENITY_ID) + private String amenityId; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + + public GetAmenityDetailsResponse amenityId(String amenityId) { + + this.amenityId = amenityId; + return this; + } + + /** + * Get amenityId + * @return amenityId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getAmenityId() { + return amenityId; + } + + + public void setAmenityId(String amenityId) { + this.amenityId = amenityId; + } + + + public GetAmenityDetailsResponse description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetAmenityDetailsResponse getAmenityDetailsResponse = (GetAmenityDetailsResponse) o; + return Objects.equals(this.amenityId, getAmenityDetailsResponse.amenityId) && + Objects.equals(this.description, getAmenityDetailsResponse.description); + } + + @Override + public int hashCode() { + return Objects.hash(amenityId, description); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetAmenityDetailsResponse {\n"); + sb.append(" amenityId: ").append(toIndentedString(amenityId)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetCommunityDetailsResponse.java b/gen/src/main/java/org/openapitools/client/model/GetCommunityDetailsResponse.java new file mode 100644 index 00000000..ee2213aa --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetCommunityDetailsResponse.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.GetCommunityDetailsResponseCommunity; + +/** + * GetCommunityDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetCommunityDetailsResponse { + public static final String SERIALIZED_NAME_COMMUNITIES = "communities"; + @SerializedName(SERIALIZED_NAME_COMMUNITIES) + private Set communities = new LinkedHashSet(); + + + public GetCommunityDetailsResponse communities(Set communities) { + + this.communities = communities; + return this; + } + + public GetCommunityDetailsResponse addCommunitiesItem(GetCommunityDetailsResponseCommunity communitiesItem) { + this.communities.add(communitiesItem); + return this; + } + + /** + * Get communities + * @return communities + **/ + @ApiModelProperty(required = true, value = "") + + public Set getCommunities() { + return communities; + } + + + public void setCommunities(Set communities) { + this.communities = communities; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCommunityDetailsResponse getCommunityDetailsResponse = (GetCommunityDetailsResponse) o; + return Objects.equals(this.communities, getCommunityDetailsResponse.communities); + } + + @Override + public int hashCode() { + return Objects.hash(communities); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCommunityDetailsResponse {\n"); + sb.append(" communities: ").append(toIndentedString(communities)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunity.java b/gen/src/main/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunity.java new file mode 100644 index 00000000..fe1ee2a8 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunity.java @@ -0,0 +1,157 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetCommunityDetailsResponseCommunity + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetCommunityDetailsResponseCommunity { + public static final String SERIALIZED_NAME_COMMUNITY_ID = "communityId"; + @SerializedName(SERIALIZED_NAME_COMMUNITY_ID) + private String communityId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DISTRICT = "district"; + @SerializedName(SERIALIZED_NAME_DISTRICT) + private String district; + + + public GetCommunityDetailsResponseCommunity communityId(String communityId) { + + this.communityId = communityId; + return this; + } + + /** + * Get communityId + * @return communityId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getCommunityId() { + return communityId; + } + + + public void setCommunityId(String communityId) { + this.communityId = communityId; + } + + + public GetCommunityDetailsResponseCommunity name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public GetCommunityDetailsResponseCommunity district(String district) { + + this.district = district; + return this; + } + + /** + * Get district + * @return district + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDistrict() { + return district; + } + + + public void setDistrict(String district) { + this.district = district; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetCommunityDetailsResponseCommunity getCommunityDetailsResponseCommunity = (GetCommunityDetailsResponseCommunity) o; + return Objects.equals(this.communityId, getCommunityDetailsResponseCommunity.communityId) && + Objects.equals(this.name, getCommunityDetailsResponseCommunity.name) && + Objects.equals(this.district, getCommunityDetailsResponseCommunity.district); + } + + @Override + public int hashCode() { + return Objects.hash(communityId, name, district); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetCommunityDetailsResponseCommunity {\n"); + sb.append(" communityId: ").append(toIndentedString(communityId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" district: ").append(toIndentedString(district)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetHouseDetailsResponse.java b/gen/src/main/java/org/openapitools/client/model/GetHouseDetailsResponse.java new file mode 100644 index 00000000..01d6b765 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetHouseDetailsResponse.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.GetHouseDetailsResponseCommunityHouse; + +/** + * GetHouseDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetHouseDetailsResponse { + public static final String SERIALIZED_NAME_HOUSES = "houses"; + @SerializedName(SERIALIZED_NAME_HOUSES) + private Set houses = new LinkedHashSet(); + + + public GetHouseDetailsResponse houses(Set houses) { + + this.houses = houses; + return this; + } + + public GetHouseDetailsResponse addHousesItem(GetHouseDetailsResponseCommunityHouse housesItem) { + this.houses.add(housesItem); + return this; + } + + /** + * Get houses + * @return houses + **/ + @ApiModelProperty(required = true, value = "") + + public Set getHouses() { + return houses; + } + + + public void setHouses(Set houses) { + this.houses = houses; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHouseDetailsResponse getHouseDetailsResponse = (GetHouseDetailsResponse) o; + return Objects.equals(this.houses, getHouseDetailsResponse.houses); + } + + @Override + public int hashCode() { + return Objects.hash(houses); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetHouseDetailsResponse {\n"); + sb.append(" houses: ").append(toIndentedString(houses)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouse.java b/gen/src/main/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouse.java new file mode 100644 index 00000000..c1e71005 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouse.java @@ -0,0 +1,128 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GetHouseDetailsResponseCommunityHouse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetHouseDetailsResponseCommunityHouse { + public static final String SERIALIZED_NAME_HOUSE_ID = "houseId"; + @SerializedName(SERIALIZED_NAME_HOUSE_ID) + private String houseId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public GetHouseDetailsResponseCommunityHouse houseId(String houseId) { + + this.houseId = houseId; + return this; + } + + /** + * Get houseId + * @return houseId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getHouseId() { + return houseId; + } + + + public void setHouseId(String houseId) { + this.houseId = houseId; + } + + + public GetHouseDetailsResponseCommunityHouse name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetHouseDetailsResponseCommunityHouse getHouseDetailsResponseCommunityHouse = (GetHouseDetailsResponseCommunityHouse) o; + return Objects.equals(this.houseId, getHouseDetailsResponseCommunityHouse.houseId) && + Objects.equals(this.name, getHouseDetailsResponseCommunityHouse.name); + } + + @Override + public int hashCode() { + return Objects.hash(houseId, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetHouseDetailsResponseCommunityHouse {\n"); + sb.append(" houseId: ").append(toIndentedString(houseId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetUserDetailsResponse.java b/gen/src/main/java/org/openapitools/client/model/GetUserDetailsResponse.java new file mode 100644 index 00000000..1256f78f --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetUserDetailsResponse.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.GetUserDetailsResponseUser; + +/** + * GetUserDetailsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetUserDetailsResponse { + public static final String SERIALIZED_NAME_USERS = "users"; + @SerializedName(SERIALIZED_NAME_USERS) + private Set users = new LinkedHashSet(); + + + public GetUserDetailsResponse users(Set users) { + + this.users = users; + return this; + } + + public GetUserDetailsResponse addUsersItem(GetUserDetailsResponseUser usersItem) { + this.users.add(usersItem); + return this; + } + + /** + * Get users + * @return users + **/ + @ApiModelProperty(required = true, value = "") + + public Set getUsers() { + return users; + } + + + public void setUsers(Set users) { + this.users = users; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUserDetailsResponse getUserDetailsResponse = (GetUserDetailsResponse) o; + return Objects.equals(this.users, getUserDetailsResponse.users); + } + + @Override + public int hashCode() { + return Objects.hash(users); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetUserDetailsResponse {\n"); + sb.append(" users: ").append(toIndentedString(users)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/GetUserDetailsResponseUser.java b/gen/src/main/java/org/openapitools/client/model/GetUserDetailsResponseUser.java new file mode 100644 index 00000000..0af3674a --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/GetUserDetailsResponseUser.java @@ -0,0 +1,197 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +/** + * GetUserDetailsResponseUser + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class GetUserDetailsResponseUser { + public static final String SERIALIZED_NAME_USER_ID = "userId"; + @SerializedName(SERIALIZED_NAME_USER_ID) + private String userId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_COMMUNITY_IDS = "communityIds"; + @SerializedName(SERIALIZED_NAME_COMMUNITY_IDS) + private Set communityIds = null; + + + public GetUserDetailsResponseUser userId(String userId) { + + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getUserId() { + return userId; + } + + + public void setUserId(String userId) { + this.userId = userId; + } + + + public GetUserDetailsResponseUser name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public GetUserDetailsResponseUser email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public GetUserDetailsResponseUser communityIds(Set communityIds) { + + this.communityIds = communityIds; + return this; + } + + public GetUserDetailsResponseUser addCommunityIdsItem(String communityIdsItem) { + if (this.communityIds == null) { + this.communityIds = new LinkedHashSet(); + } + this.communityIds.add(communityIdsItem); + return this; + } + + /** + * Get communityIds + * @return communityIds + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Set getCommunityIds() { + return communityIds; + } + + + public void setCommunityIds(Set communityIds) { + this.communityIds = communityIds; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetUserDetailsResponseUser getUserDetailsResponseUser = (GetUserDetailsResponseUser) o; + return Objects.equals(this.userId, getUserDetailsResponseUser.userId) && + Objects.equals(this.name, getUserDetailsResponseUser.name) && + Objects.equals(this.email, getUserDetailsResponseUser.email) && + Objects.equals(this.communityIds, getUserDetailsResponseUser.communityIds); + } + + @Override + public int hashCode() { + return Objects.hash(userId, name, email, communityIds); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetUserDetailsResponseUser {\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" communityIds: ").append(toIndentedString(communityIds)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/HouseMember.java b/gen/src/main/java/org/openapitools/client/model/HouseMember.java new file mode 100644 index 00000000..54b2478e --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/HouseMember.java @@ -0,0 +1,126 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * HouseMember + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class HouseMember { + public static final String SERIALIZED_NAME_MEMBER_ID = "memberId"; + @SerializedName(SERIALIZED_NAME_MEMBER_ID) + private String memberId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public HouseMember memberId(String memberId) { + + this.memberId = memberId; + return this; + } + + /** + * Get memberId + * @return memberId + **/ + @ApiModelProperty(required = true, value = "") + + public String getMemberId() { + return memberId; + } + + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + + public HouseMember name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(required = true, value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HouseMember houseMember = (HouseMember) o; + return Objects.equals(this.memberId, houseMember.memberId) && + Objects.equals(this.name, houseMember.name); + } + + @Override + public int hashCode() { + return Objects.hash(memberId, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HouseMember {\n"); + sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/HouseMemberDto.java b/gen/src/main/java/org/openapitools/client/model/HouseMemberDto.java new file mode 100644 index 00000000..b7a4884c --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/HouseMemberDto.java @@ -0,0 +1,155 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * HouseMemberDto + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class HouseMemberDto { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private Long id; + + public static final String SERIALIZED_NAME_MEMBER_ID = "memberId"; + @SerializedName(SERIALIZED_NAME_MEMBER_ID) + private String memberId; + + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + + public HouseMemberDto id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Long getId() { + return id; + } + + + public void setId(Long id) { + this.id = id; + } + + + public HouseMemberDto memberId(String memberId) { + + this.memberId = memberId; + return this; + } + + /** + * Get memberId + * @return memberId + **/ + @ApiModelProperty(required = true, value = "") + + public String getMemberId() { + return memberId; + } + + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + + public HouseMemberDto name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(required = true, value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HouseMemberDto houseMemberDto = (HouseMemberDto) o; + return Objects.equals(this.id, houseMemberDto.id) && + Objects.equals(this.memberId, houseMemberDto.memberId) && + Objects.equals(this.name, houseMemberDto.name); + } + + @Override + public int hashCode() { + return Objects.hash(id, memberId, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class HouseMemberDto {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/ListAdminPaymentsResponse.java b/gen/src/main/java/org/openapitools/client/model/ListAdminPaymentsResponse.java new file mode 100644 index 00000000..9573e928 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/ListAdminPaymentsResponse.java @@ -0,0 +1,141 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.AdminPayment; +import org.openapitools.client.model.PageInfo; + +/** + * ListAdminPaymentsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ListAdminPaymentsResponse { + public static final String SERIALIZED_NAME_PAYMENTS = "payments"; + @SerializedName(SERIALIZED_NAME_PAYMENTS) + private Set payments = null; + + public static final String SERIALIZED_NAME_PAGE_INFO = "pageInfo"; + @SerializedName(SERIALIZED_NAME_PAGE_INFO) + private PageInfo pageInfo; + + + public ListAdminPaymentsResponse payments(Set payments) { + + this.payments = payments; + return this; + } + + public ListAdminPaymentsResponse addPaymentsItem(AdminPayment paymentsItem) { + if (this.payments == null) { + this.payments = new LinkedHashSet(); + } + this.payments.add(paymentsItem); + return this; + } + + /** + * Get payments + * @return payments + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Set getPayments() { + return payments; + } + + + public void setPayments(Set payments) { + this.payments = payments; + } + + + public ListAdminPaymentsResponse pageInfo(PageInfo pageInfo) { + + this.pageInfo = pageInfo; + return this; + } + + /** + * Get pageInfo + * @return pageInfo + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public PageInfo getPageInfo() { + return pageInfo; + } + + + public void setPageInfo(PageInfo pageInfo) { + this.pageInfo = pageInfo; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListAdminPaymentsResponse listAdminPaymentsResponse = (ListAdminPaymentsResponse) o; + return Objects.equals(this.payments, listAdminPaymentsResponse.payments) && + Objects.equals(this.pageInfo, listAdminPaymentsResponse.pageInfo); + } + + @Override + public int hashCode() { + return Objects.hash(payments, pageInfo); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListAdminPaymentsResponse {\n"); + sb.append(" payments: ").append(toIndentedString(payments)).append("\n"); + sb.append(" pageInfo: ").append(toIndentedString(pageInfo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/ListCommunityAdminsResponse.java b/gen/src/main/java/org/openapitools/client/model/ListCommunityAdminsResponse.java new file mode 100644 index 00000000..a9784e02 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/ListCommunityAdminsResponse.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.ListCommunityAdminsResponseCommunityAdmin; + +/** + * ListCommunityAdminsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ListCommunityAdminsResponse { + public static final String SERIALIZED_NAME_ADMINS = "admins"; + @SerializedName(SERIALIZED_NAME_ADMINS) + private Set admins = new LinkedHashSet(); + + + public ListCommunityAdminsResponse admins(Set admins) { + + this.admins = admins; + return this; + } + + public ListCommunityAdminsResponse addAdminsItem(ListCommunityAdminsResponseCommunityAdmin adminsItem) { + this.admins.add(adminsItem); + return this; + } + + /** + * Get admins + * @return admins + **/ + @ApiModelProperty(required = true, value = "") + + public Set getAdmins() { + return admins; + } + + + public void setAdmins(Set admins) { + this.admins = admins; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListCommunityAdminsResponse listCommunityAdminsResponse = (ListCommunityAdminsResponse) o; + return Objects.equals(this.admins, listCommunityAdminsResponse.admins); + } + + @Override + public int hashCode() { + return Objects.hash(admins); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListCommunityAdminsResponse {\n"); + sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdmin.java b/gen/src/main/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdmin.java new file mode 100644 index 00000000..5fe0c12b --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdmin.java @@ -0,0 +1,99 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ListCommunityAdminsResponseCommunityAdmin + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ListCommunityAdminsResponseCommunityAdmin { + public static final String SERIALIZED_NAME_ADMIN_ID = "adminId"; + @SerializedName(SERIALIZED_NAME_ADMIN_ID) + private String adminId; + + + public ListCommunityAdminsResponseCommunityAdmin adminId(String adminId) { + + this.adminId = adminId; + return this; + } + + /** + * Get adminId + * @return adminId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getAdminId() { + return adminId; + } + + + public void setAdminId(String adminId) { + this.adminId = adminId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListCommunityAdminsResponseCommunityAdmin listCommunityAdminsResponseCommunityAdmin = (ListCommunityAdminsResponseCommunityAdmin) o; + return Objects.equals(this.adminId, listCommunityAdminsResponseCommunityAdmin.adminId); + } + + @Override + public int hashCode() { + return Objects.hash(adminId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListCommunityAdminsResponseCommunityAdmin {\n"); + sb.append(" adminId: ").append(toIndentedString(adminId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/ListHouseMembersResponse.java b/gen/src/main/java/org/openapitools/client/model/ListHouseMembersResponse.java new file mode 100644 index 00000000..14157ede --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/ListHouseMembersResponse.java @@ -0,0 +1,107 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.HouseMember; + +/** + * ListHouseMembersResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ListHouseMembersResponse { + public static final String SERIALIZED_NAME_MEMBERS = "members"; + @SerializedName(SERIALIZED_NAME_MEMBERS) + private Set members = new LinkedHashSet(); + + + public ListHouseMembersResponse members(Set members) { + + this.members = members; + return this; + } + + public ListHouseMembersResponse addMembersItem(HouseMember membersItem) { + this.members.add(membersItem); + return this; + } + + /** + * Get members + * @return members + **/ + @ApiModelProperty(required = true, value = "") + + public Set getMembers() { + return members; + } + + + public void setMembers(Set members) { + this.members = members; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListHouseMembersResponse listHouseMembersResponse = (ListHouseMembersResponse) o; + return Objects.equals(this.members, listHouseMembersResponse.members); + } + + @Override + public int hashCode() { + return Objects.hash(members); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListHouseMembersResponse {\n"); + sb.append(" members: ").append(toIndentedString(members)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/ListMemberPaymentsResponse.java b/gen/src/main/java/org/openapitools/client/model/ListMemberPaymentsResponse.java new file mode 100644 index 00000000..b702ed46 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/ListMemberPaymentsResponse.java @@ -0,0 +1,111 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.MemberPayment; + +/** + * ListMemberPaymentsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class ListMemberPaymentsResponse { + public static final String SERIALIZED_NAME_PAYMENTS = "payments"; + @SerializedName(SERIALIZED_NAME_PAYMENTS) + private Set payments = null; + + + public ListMemberPaymentsResponse payments(Set payments) { + + this.payments = payments; + return this; + } + + public ListMemberPaymentsResponse addPaymentsItem(MemberPayment paymentsItem) { + if (this.payments == null) { + this.payments = new LinkedHashSet(); + } + this.payments.add(paymentsItem); + return this; + } + + /** + * Get payments + * @return payments + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Set getPayments() { + return payments; + } + + + public void setPayments(Set payments) { + this.payments = payments; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ListMemberPaymentsResponse listMemberPaymentsResponse = (ListMemberPaymentsResponse) o; + return Objects.equals(this.payments, listMemberPaymentsResponse.payments); + } + + @Override + public int hashCode() { + return Objects.hash(payments); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ListMemberPaymentsResponse {\n"); + sb.append(" payments: ").append(toIndentedString(payments)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/LoginRequest.java b/gen/src/main/java/org/openapitools/client/model/LoginRequest.java new file mode 100644 index 00000000..c0d8a042 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/LoginRequest.java @@ -0,0 +1,128 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * LoginRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class LoginRequest { + public static final String SERIALIZED_NAME_EMAIL = "email"; + @SerializedName(SERIALIZED_NAME_EMAIL) + private String email; + + public static final String SERIALIZED_NAME_PASSWORD = "password"; + @SerializedName(SERIALIZED_NAME_PASSWORD) + private String password; + + + public LoginRequest email(String email) { + + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getEmail() { + return email; + } + + + public void setEmail(String email) { + this.email = email; + } + + + public LoginRequest password(String password) { + + this.password = password; + return this; + } + + /** + * Get password + * @return password + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getPassword() { + return password; + } + + + public void setPassword(String password) { + this.password = password; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LoginRequest loginRequest = (LoginRequest) o; + return Objects.equals(this.email, loginRequest.email) && + Objects.equals(this.password, loginRequest.password); + } + + @Override + public int hashCode() { + return Objects.hash(email, password); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LoginRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/MemberPayment.java b/gen/src/main/java/org/openapitools/client/model/MemberPayment.java new file mode 100644 index 00000000..480c0395 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/MemberPayment.java @@ -0,0 +1,187 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * MemberPayment + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class MemberPayment { + public static final String SERIALIZED_NAME_MEMBER_ID = "memberId"; + @SerializedName(SERIALIZED_NAME_MEMBER_ID) + private String memberId; + + public static final String SERIALIZED_NAME_PAYMENT_ID = "paymentId"; + @SerializedName(SERIALIZED_NAME_PAYMENT_ID) + private String paymentId; + + public static final String SERIALIZED_NAME_CHARGE = "charge"; + @SerializedName(SERIALIZED_NAME_CHARGE) + private BigDecimal charge; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private String dueDate; + + + public MemberPayment memberId(String memberId) { + + this.memberId = memberId; + return this; + } + + /** + * Get memberId + * @return memberId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getMemberId() { + return memberId; + } + + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + + public MemberPayment paymentId(String paymentId) { + + this.paymentId = paymentId; + return this; + } + + /** + * Get paymentId + * @return paymentId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getPaymentId() { + return paymentId; + } + + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + + public MemberPayment charge(BigDecimal charge) { + + this.charge = charge; + return this; + } + + /** + * Get charge + * @return charge + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BigDecimal getCharge() { + return charge; + } + + + public void setCharge(BigDecimal charge) { + this.charge = charge; + } + + + public MemberPayment dueDate(String dueDate) { + + this.dueDate = dueDate; + return this; + } + + /** + * Get dueDate + * @return dueDate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDueDate() { + return dueDate; + } + + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MemberPayment memberPayment = (MemberPayment) o; + return Objects.equals(this.memberId, memberPayment.memberId) && + Objects.equals(this.paymentId, memberPayment.paymentId) && + Objects.equals(this.charge, memberPayment.charge) && + Objects.equals(this.dueDate, memberPayment.dueDate); + } + + @Override + public int hashCode() { + return Objects.hash(memberId, paymentId, charge, dueDate); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MemberPayment {\n"); + sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); + sb.append(" paymentId: ").append(toIndentedString(paymentId)).append("\n"); + sb.append(" charge: ").append(toIndentedString(charge)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/PageInfo.java b/gen/src/main/java/org/openapitools/client/model/PageInfo.java new file mode 100644 index 00000000..8f02314e --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/PageInfo.java @@ -0,0 +1,187 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Page info + */ +@ApiModel(description = "Page info") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class PageInfo { + public static final String SERIALIZED_NAME_CURRENT_PAGE = "currentPage"; + @SerializedName(SERIALIZED_NAME_CURRENT_PAGE) + private Integer currentPage; + + public static final String SERIALIZED_NAME_PAGE_LIMIT = "pageLimit"; + @SerializedName(SERIALIZED_NAME_PAGE_LIMIT) + private Integer pageLimit; + + public static final String SERIALIZED_NAME_TOTAL_PAGES = "totalPages"; + @SerializedName(SERIALIZED_NAME_TOTAL_PAGES) + private Integer totalPages; + + public static final String SERIALIZED_NAME_TOTAL_ELEMENTS = "totalElements"; + @SerializedName(SERIALIZED_NAME_TOTAL_ELEMENTS) + private Long totalElements; + + + public PageInfo currentPage(Integer currentPage) { + + this.currentPage = currentPage; + return this; + } + + /** + * Get currentPage + * @return currentPage + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Integer getCurrentPage() { + return currentPage; + } + + + public void setCurrentPage(Integer currentPage) { + this.currentPage = currentPage; + } + + + public PageInfo pageLimit(Integer pageLimit) { + + this.pageLimit = pageLimit; + return this; + } + + /** + * Get pageLimit + * @return pageLimit + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Integer getPageLimit() { + return pageLimit; + } + + + public void setPageLimit(Integer pageLimit) { + this.pageLimit = pageLimit; + } + + + public PageInfo totalPages(Integer totalPages) { + + this.totalPages = totalPages; + return this; + } + + /** + * Get totalPages + * @return totalPages + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Integer getTotalPages() { + return totalPages; + } + + + public void setTotalPages(Integer totalPages) { + this.totalPages = totalPages; + } + + + public PageInfo totalElements(Long totalElements) { + + this.totalElements = totalElements; + return this; + } + + /** + * Get totalElements + * @return totalElements + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Long getTotalElements() { + return totalElements; + } + + + public void setTotalElements(Long totalElements) { + this.totalElements = totalElements; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PageInfo pageInfo = (PageInfo) o; + return Objects.equals(this.currentPage, pageInfo.currentPage) && + Objects.equals(this.pageLimit, pageInfo.pageLimit) && + Objects.equals(this.totalPages, pageInfo.totalPages) && + Objects.equals(this.totalElements, pageInfo.totalElements); + } + + @Override + public int hashCode() { + return Objects.hash(currentPage, pageLimit, totalPages, totalElements); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PageInfo {\n"); + sb.append(" currentPage: ").append(toIndentedString(currentPage)).append("\n"); + sb.append(" pageLimit: ").append(toIndentedString(pageLimit)).append("\n"); + sb.append(" totalPages: ").append(toIndentedString(totalPages)).append("\n"); + sb.append(" totalElements: ").append(toIndentedString(totalElements)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/Pageable.java b/gen/src/main/java/org/openapitools/client/model/Pageable.java new file mode 100644 index 00000000..6f65de28 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/Pageable.java @@ -0,0 +1,129 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Pageable query parameters + */ +@ApiModel(description = "Pageable query parameters") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class Pageable { + public static final String SERIALIZED_NAME_PAGE = "page"; + @SerializedName(SERIALIZED_NAME_PAGE) + private Integer page; + + public static final String SERIALIZED_NAME_SIZE = "size"; + @SerializedName(SERIALIZED_NAME_SIZE) + private Integer size; + + + public Pageable page(Integer page) { + + this.page = page; + return this; + } + + /** + * Get page + * @return page + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Integer getPage() { + return page; + } + + + public void setPage(Integer page) { + this.page = page; + } + + + public Pageable size(Integer size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Integer getSize() { + return size; + } + + + public void setSize(Integer size) { + this.size = size; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Pageable pageable = (Pageable) o; + return Objects.equals(this.page, pageable.page) && + Objects.equals(this.size, pageable.size); + } + + @Override + public int hashCode() { + return Objects.hash(page, size); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Pageable {\n"); + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/SchedulePaymentRequest.java b/gen/src/main/java/org/openapitools/client/model/SchedulePaymentRequest.java new file mode 100644 index 00000000..9cfbc56e --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/SchedulePaymentRequest.java @@ -0,0 +1,273 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * SchedulePaymentRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class SchedulePaymentRequest { + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_RECURRING = "recurring"; + @SerializedName(SERIALIZED_NAME_RECURRING) + private Boolean recurring; + + public static final String SERIALIZED_NAME_CHARGE = "charge"; + @SerializedName(SERIALIZED_NAME_CHARGE) + private BigDecimal charge; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private String dueDate; + + public static final String SERIALIZED_NAME_ADMIN_ID = "adminId"; + @SerializedName(SERIALIZED_NAME_ADMIN_ID) + private String adminId; + + public static final String SERIALIZED_NAME_MEMBER_ID = "memberId"; + @SerializedName(SERIALIZED_NAME_MEMBER_ID) + private String memberId; + + + public SchedulePaymentRequest type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public SchedulePaymentRequest description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @ApiModelProperty(required = true, value = "") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public SchedulePaymentRequest recurring(Boolean recurring) { + + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Boolean getRecurring() { + return recurring; + } + + + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public SchedulePaymentRequest charge(BigDecimal charge) { + + this.charge = charge; + return this; + } + + /** + * Get charge + * @return charge + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BigDecimal getCharge() { + return charge; + } + + + public void setCharge(BigDecimal charge) { + this.charge = charge; + } + + + public SchedulePaymentRequest dueDate(String dueDate) { + + this.dueDate = dueDate; + return this; + } + + /** + * Get dueDate + * @return dueDate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDueDate() { + return dueDate; + } + + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + + public SchedulePaymentRequest adminId(String adminId) { + + this.adminId = adminId; + return this; + } + + /** + * Get adminId + * @return adminId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getAdminId() { + return adminId; + } + + + public void setAdminId(String adminId) { + this.adminId = adminId; + } + + + public SchedulePaymentRequest memberId(String memberId) { + + this.memberId = memberId; + return this; + } + + /** + * Get memberId + * @return memberId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getMemberId() { + return memberId; + } + + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchedulePaymentRequest schedulePaymentRequest = (SchedulePaymentRequest) o; + return Objects.equals(this.type, schedulePaymentRequest.type) && + Objects.equals(this.description, schedulePaymentRequest.description) && + Objects.equals(this.recurring, schedulePaymentRequest.recurring) && + Objects.equals(this.charge, schedulePaymentRequest.charge) && + Objects.equals(this.dueDate, schedulePaymentRequest.dueDate) && + Objects.equals(this.adminId, schedulePaymentRequest.adminId) && + Objects.equals(this.memberId, schedulePaymentRequest.memberId); + } + + @Override + public int hashCode() { + return Objects.hash(type, description, recurring, charge, dueDate, adminId, memberId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchedulePaymentRequest {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" charge: ").append(toIndentedString(charge)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append(" adminId: ").append(toIndentedString(adminId)).append("\n"); + sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/SchedulePaymentResponse.java b/gen/src/main/java/org/openapitools/client/model/SchedulePaymentResponse.java new file mode 100644 index 00000000..2f74b890 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/SchedulePaymentResponse.java @@ -0,0 +1,303 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; + +/** + * SchedulePaymentResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class SchedulePaymentResponse { + public static final String SERIALIZED_NAME_PAYMENT_ID = "paymentId"; + @SerializedName(SERIALIZED_NAME_PAYMENT_ID) + private String paymentId; + + public static final String SERIALIZED_NAME_CHARGE = "charge"; + @SerializedName(SERIALIZED_NAME_CHARGE) + private BigDecimal charge; + + public static final String SERIALIZED_NAME_TYPE = "type"; + @SerializedName(SERIALIZED_NAME_TYPE) + private String type; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_RECURRING = "recurring"; + @SerializedName(SERIALIZED_NAME_RECURRING) + private Boolean recurring; + + public static final String SERIALIZED_NAME_DUE_DATE = "dueDate"; + @SerializedName(SERIALIZED_NAME_DUE_DATE) + private String dueDate; + + public static final String SERIALIZED_NAME_ADMIN_ID = "adminId"; + @SerializedName(SERIALIZED_NAME_ADMIN_ID) + private String adminId; + + public static final String SERIALIZED_NAME_MEMBER_ID = "memberId"; + @SerializedName(SERIALIZED_NAME_MEMBER_ID) + private String memberId; + + + public SchedulePaymentResponse paymentId(String paymentId) { + + this.paymentId = paymentId; + return this; + } + + /** + * Get paymentId + * @return paymentId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getPaymentId() { + return paymentId; + } + + + public void setPaymentId(String paymentId) { + this.paymentId = paymentId; + } + + + public SchedulePaymentResponse charge(BigDecimal charge) { + + this.charge = charge; + return this; + } + + /** + * Get charge + * @return charge + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public BigDecimal getCharge() { + return charge; + } + + + public void setCharge(BigDecimal charge) { + this.charge = charge; + } + + + public SchedulePaymentResponse type(String type) { + + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getType() { + return type; + } + + + public void setType(String type) { + this.type = type; + } + + + public SchedulePaymentResponse description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public SchedulePaymentResponse recurring(Boolean recurring) { + + this.recurring = recurring; + return this; + } + + /** + * Get recurring + * @return recurring + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Boolean getRecurring() { + return recurring; + } + + + public void setRecurring(Boolean recurring) { + this.recurring = recurring; + } + + + public SchedulePaymentResponse dueDate(String dueDate) { + + this.dueDate = dueDate; + return this; + } + + /** + * Get dueDate + * @return dueDate + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDueDate() { + return dueDate; + } + + + public void setDueDate(String dueDate) { + this.dueDate = dueDate; + } + + + public SchedulePaymentResponse adminId(String adminId) { + + this.adminId = adminId; + return this; + } + + /** + * Get adminId + * @return adminId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getAdminId() { + return adminId; + } + + + public void setAdminId(String adminId) { + this.adminId = adminId; + } + + + public SchedulePaymentResponse memberId(String memberId) { + + this.memberId = memberId; + return this; + } + + /** + * Get memberId + * @return memberId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getMemberId() { + return memberId; + } + + + public void setMemberId(String memberId) { + this.memberId = memberId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SchedulePaymentResponse schedulePaymentResponse = (SchedulePaymentResponse) o; + return Objects.equals(this.paymentId, schedulePaymentResponse.paymentId) && + Objects.equals(this.charge, schedulePaymentResponse.charge) && + Objects.equals(this.type, schedulePaymentResponse.type) && + Objects.equals(this.description, schedulePaymentResponse.description) && + Objects.equals(this.recurring, schedulePaymentResponse.recurring) && + Objects.equals(this.dueDate, schedulePaymentResponse.dueDate) && + Objects.equals(this.adminId, schedulePaymentResponse.adminId) && + Objects.equals(this.memberId, schedulePaymentResponse.memberId); + } + + @Override + public int hashCode() { + return Objects.hash(paymentId, charge, type, description, recurring, dueDate, adminId, memberId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SchedulePaymentResponse {\n"); + sb.append(" paymentId: ").append(toIndentedString(paymentId)).append("\n"); + sb.append(" charge: ").append(toIndentedString(charge)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" recurring: ").append(toIndentedString(recurring)).append("\n"); + sb.append(" dueDate: ").append(toIndentedString(dueDate)).append("\n"); + sb.append(" adminId: ").append(toIndentedString(adminId)).append("\n"); + sb.append(" memberId: ").append(toIndentedString(memberId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/main/java/org/openapitools/client/model/UpdateAmenityRequest.java b/gen/src/main/java/org/openapitools/client/model/UpdateAmenityRequest.java new file mode 100644 index 00000000..6bce3237 --- /dev/null +++ b/gen/src/main/java/org/openapitools/client/model/UpdateAmenityRequest.java @@ -0,0 +1,186 @@ +/* + * 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.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateAmenityRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-09-26T12:06:21.393815800+03:00[Asia/Hebron]") +public class UpdateAmenityRequest { + public static final String SERIALIZED_NAME_NAME = "name"; + @SerializedName(SERIALIZED_NAME_NAME) + private String name; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + private String description; + + public static final String SERIALIZED_NAME_PRICE = "price"; + @SerializedName(SERIALIZED_NAME_PRICE) + private Long price; + + public static final String SERIALIZED_NAME_COMMUNITY_ID = "communityId"; + @SerializedName(SERIALIZED_NAME_COMMUNITY_ID) + private String communityId; + + + public UpdateAmenityRequest name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getName() { + return name; + } + + + public void setName(String name) { + this.name = name; + } + + + public UpdateAmenityRequest description(String description) { + + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getDescription() { + return description; + } + + + public void setDescription(String description) { + this.description = description; + } + + + public UpdateAmenityRequest price(Long price) { + + this.price = price; + return this; + } + + /** + * Get price + * @return price + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public Long getPrice() { + return price; + } + + + public void setPrice(Long price) { + this.price = price; + } + + + public UpdateAmenityRequest communityId(String communityId) { + + this.communityId = communityId; + return this; + } + + /** + * Get communityId + * @return communityId + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "") + + public String getCommunityId() { + return communityId; + } + + + public void setCommunityId(String communityId) { + this.communityId = communityId; + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAmenityRequest updateAmenityRequest = (UpdateAmenityRequest) o; + return Objects.equals(this.name, updateAmenityRequest.name) && + Objects.equals(this.description, updateAmenityRequest.description) && + Objects.equals(this.price, updateAmenityRequest.price) && + Objects.equals(this.communityId, updateAmenityRequest.communityId); + } + + @Override + public int hashCode() { + return Objects.hash(name, description, price, communityId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateAmenityRequest {\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" price: ").append(toIndentedString(price)).append("\n"); + sb.append(" communityId: ").append(toIndentedString(communityId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/gen/src/test/java/org/openapitools/client/api/AmenitiesApiTest.java b/gen/src/test/java/org/openapitools/client/api/AmenitiesApiTest.java new file mode 100644 index 00000000..4ece5bbd --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/AmenitiesApiTest.java @@ -0,0 +1,121 @@ +/* + * 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.ApiException; +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 org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AmenitiesApi + */ +@Ignore +public class AmenitiesApiTest { + + private final AmenitiesApi api = new AmenitiesApi(); + + + /** + * + * + * Adds amenity to community + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addAmenityToCommunityTest() throws ApiException { + String communityId = null; + AddAmenityRequest addAmenityRequest = null; + AddAmenityResponse response = api.addAmenityToCommunity(communityId, addAmenityRequest); + + // TODO: test validations + } + + /** + * + * + * Remove amenity + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteAmenityTest() throws ApiException { + String amenityId = null; + api.deleteAmenity(amenityId); + + // TODO: test validations + } + + /** + * + * + * Get details about the amenity + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getAmenityDetailsTest() throws ApiException { + String amenityId = null; + GetAmenityDetailsResponse response = api.getAmenityDetails(amenityId); + + // TODO: test validations + } + + /** + * + * + * Get all amenities of community + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllAmenitiesTest() throws ApiException { + String communityId = null; + Set response = api.listAllAmenities(communityId); + + // TODO: test validations + } + + /** + * + * + * Update an amenity + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateAmenityTest() throws ApiException { + String amenityId = null; + UpdateAmenityRequest updateAmenityRequest = null; + api.updateAmenity(amenityId, updateAmenityRequest); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/AuthenticationApiTest.java b/gen/src/test/java/org/openapitools/client/api/AuthenticationApiTest.java new file mode 100644 index 00000000..f20f0f05 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/AuthenticationApiTest.java @@ -0,0 +1,51 @@ +/* + * 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.ApiException; +import org.openapitools.client.model.LoginRequest; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AuthenticationApi + */ +@Ignore +public class AuthenticationApiTest { + + private final AuthenticationApi api = new AuthenticationApi(); + + + /** + * + * + * Login user to system + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void loginTest() throws ApiException { + LoginRequest loginRequest = null; + api.login(loginRequest); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/BookingsApiTest.java b/gen/src/test/java/org/openapitools/client/api/BookingsApiTest.java new file mode 100644 index 00000000..b6094756 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/BookingsApiTest.java @@ -0,0 +1,51 @@ +/* + * 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.ApiException; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for BookingsApi + */ +@Ignore +public class BookingsApiTest { + + private final BookingsApi api = new BookingsApi(); + + + /** + * + * + * Remove booking + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteBookingTest() throws ApiException { + String amenityId = null; + String bookingId = null; + api.deleteBooking(amenityId, bookingId); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/CommunitiesApiTest.java b/gen/src/test/java/org/openapitools/client/api/CommunitiesApiTest.java new file mode 100644 index 00000000..aeb365e4 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/CommunitiesApiTest.java @@ -0,0 +1,156 @@ +/* + * 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.ApiException; +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 org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for CommunitiesApi + */ +@Ignore +public class CommunitiesApiTest { + + private final CommunitiesApi api = new CommunitiesApi(); + + + /** + * + * + * Add a new admin to the community given a community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addCommunityAdminsTest() throws ApiException { + String communityId = null; + AddCommunityAdminRequest addCommunityAdminRequest = null; + AddCommunityAdminResponse response = api.addCommunityAdmins(communityId, addCommunityAdminRequest); + + // TODO: test validations + } + + /** + * + * + * Create a new community + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void createCommunityTest() throws ApiException { + CreateCommunityRequest createCommunityRequest = null; + CreateCommunityResponse response = api.createCommunity(createCommunityRequest); + + // TODO: test validations + } + + /** + * + * + * Deletion community with given community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteCommunityTest() throws ApiException { + String communityId = null; + api.deleteCommunity(communityId); + + // TODO: test validations + } + + /** + * + * + * List all communities which are registered + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllCommunityTest() throws ApiException { + Pageable pageable = null; + GetCommunityDetailsResponse response = api.listAllCommunity(pageable); + + // TODO: test validations + } + + /** + * + * + * List all admins of the community given a community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listCommunityAdminsTest() throws ApiException { + String communityId = null; + Pageable pageable = null; + ListCommunityAdminsResponse response = api.listCommunityAdmins(communityId, pageable); + + // TODO: test validations + } + + /** + * + * + * Get details about the community given a community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listCommunityDetailsTest() throws ApiException { + String communityId = null; + GetCommunityDetailsResponse response = api.listCommunityDetails(communityId); + + // TODO: test validations + } + + /** + * + * + * Remove of admin associated with a community + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void removeAdminFromCommunityTest() throws ApiException { + String communityId = null; + String adminId = null; + api.removeAdminFromCommunity(communityId, adminId); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/DocumentsApiTest.java b/gen/src/test/java/org/openapitools/client/api/DocumentsApiTest.java new file mode 100644 index 00000000..dc899592 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/DocumentsApiTest.java @@ -0,0 +1,101 @@ +/* + * 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.ApiException; +import java.io.File; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for DocumentsApi + */ +@Ignore +public class DocumentsApiTest { + + private final DocumentsApi api = new DocumentsApi(); + + + /** + * + * + * Delete house member's documents + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteHouseMemberDocumentTest() throws ApiException { + String memberId = null; + api.deleteHouseMemberDocument(memberId); + + // TODO: test validations + } + + /** + * + * + * Returns house member's documents + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getHouseMemberDocumentTest() throws ApiException { + String memberId = null; + byte[] response = api.getHouseMemberDocument(memberId); + + // TODO: test validations + } + + /** + * + * + * Update house member's documents + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateHouseMemberDocumentTest() throws ApiException { + String memberId = null; + File memberDocument = null; + api.updateHouseMemberDocument(memberId, memberDocument); + + // TODO: test validations + } + + /** + * + * + * Add house member's documents + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void uploadHouseMemberDocumentTest() throws ApiException { + String memberId = null; + File memberDocument = null; + api.uploadHouseMemberDocument(memberId, memberDocument); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/HousesApiTest.java b/gen/src/test/java/org/openapitools/client/api/HousesApiTest.java new file mode 100644 index 00000000..91a3f913 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/HousesApiTest.java @@ -0,0 +1,175 @@ +/* + * 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.ApiException; +import org.openapitools.client.model.AddCommunityHouseRequest; +import org.openapitools.client.model.AddCommunityHouseResponse; +import org.openapitools.client.model.AddHouseMemberRequest; +import org.openapitools.client.model.AddHouseMemberResponse; +import org.openapitools.client.model.GetHouseDetailsResponse; +import org.openapitools.client.model.ListHouseMembersResponse; +import org.openapitools.client.model.Pageable; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for HousesApi + */ +@Ignore +public class HousesApiTest { + + private final HousesApi api = new HousesApi(); + + + /** + * + * + * Add a new house to the community given a community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addCommunityHousesTest() throws ApiException { + String communityId = null; + AddCommunityHouseRequest addCommunityHouseRequest = null; + AddCommunityHouseResponse response = api.addCommunityHouses(communityId, addCommunityHouseRequest); + + // TODO: test validations + } + + /** + * + * + * Add new members to the house given a house id. Responds with member id which were added + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void addHouseMembersTest() throws ApiException { + String houseId = null; + AddHouseMemberRequest addHouseMemberRequest = null; + AddHouseMemberResponse response = api.addHouseMembers(houseId, addHouseMemberRequest); + + // TODO: test validations + } + + /** + * + * + * Deletion of member associated with a house + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteHouseMemberTest() throws ApiException { + String houseId = null; + String memberId = null; + api.deleteHouseMember(houseId, memberId); + + // TODO: test validations + } + + /** + * + * + * Get house detail by a given ID + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getHouseDetailsTest() throws ApiException { + String houseId = null; + GetHouseDetailsResponse response = api.getHouseDetails(houseId); + + // TODO: test validations + } + + /** + * + * + * List all houses of the community given a community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllHousesTest() throws ApiException { + Pageable pageable = null; + GetHouseDetailsResponse response = api.listAllHouses(pageable); + + // TODO: test validations + } + + /** + * + * + * List all members of the house given a house id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllMembersOfHouseTest() throws ApiException { + String houseId = null; + Pageable pageable = null; + ListHouseMembersResponse response = api.listAllMembersOfHouse(houseId, pageable); + + // TODO: test validations + } + + /** + * + * + * List all houses of the community given a community id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listCommunityHousesTest() throws ApiException { + String communityId = null; + Pageable pageable = null; + GetHouseDetailsResponse response = api.listCommunityHouses(communityId, pageable); + + // TODO: test validations + } + + /** + * + * + * Remove of house from the community given a community id and a house id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void removeCommunityHouseTest() throws ApiException { + String communityId = null; + String houseId = null; + api.removeCommunityHouse(communityId, houseId); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/PaymentsApiTest.java b/gen/src/test/java/org/openapitools/client/api/PaymentsApiTest.java new file mode 100644 index 00000000..314e5076 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/PaymentsApiTest.java @@ -0,0 +1,105 @@ +/* + * 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.ApiException; +import org.openapitools.client.model.ListAdminPaymentsResponse; +import org.openapitools.client.model.ListMemberPaymentsResponse; +import org.openapitools.client.model.Pageable; +import org.openapitools.client.model.SchedulePaymentRequest; +import org.openapitools.client.model.SchedulePaymentResponse; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for PaymentsApi + */ +@Ignore +public class PaymentsApiTest { + + private final PaymentsApi api = new PaymentsApi(); + + + /** + * + * + * Get all payments scheduled by the specified admin + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllAdminScheduledPaymentsTest() throws ApiException { + String communityId = null; + String adminId = null; + Pageable pageable = null; + ListAdminPaymentsResponse response = api.listAllAdminScheduledPayments(communityId, adminId, pageable); + + // TODO: test validations + } + + /** + * + * + * Get all payments for the specified member + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllMemberPaymentsTest() throws ApiException { + String memberId = null; + ListMemberPaymentsResponse response = api.listAllMemberPayments(memberId); + + // TODO: test validations + } + + /** + * + * + * Get details about a payment with the given payment id + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listPaymentDetailsTest() throws ApiException { + String paymentId = null; + SchedulePaymentResponse response = api.listPaymentDetails(paymentId); + + // TODO: test validations + } + + /** + * + * + * Schedule a new payment + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void schedulePaymentTest() throws ApiException { + SchedulePaymentRequest schedulePaymentRequest = null; + SchedulePaymentResponse response = api.schedulePayment(schedulePaymentRequest); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/api/UsersApiTest.java b/gen/src/test/java/org/openapitools/client/api/UsersApiTest.java new file mode 100644 index 00000000..488f2ad8 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/api/UsersApiTest.java @@ -0,0 +1,156 @@ +/* + * 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.ApiException; +import org.openapitools.client.model.CreateUserRequest; +import org.openapitools.client.model.CreateUserResponse; +import org.openapitools.client.model.ForgotPasswordRequest; +import org.openapitools.client.model.GetUserDetailsResponse; +import org.openapitools.client.model.GetUserDetailsResponseUser; +import org.openapitools.client.model.ListHouseMembersResponse; +import org.openapitools.client.model.Pageable; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for UsersApi + */ +@Ignore +public class UsersApiTest { + + private final UsersApi api = new UsersApi(); + + + /** + * + * + * Confirm user email + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void confirmEmailTest() throws ApiException { + String userId = null; + String emailConfirmToken = null; + api.confirmEmail(userId, emailConfirmToken); + + // TODO: test validations + } + + /** + * + * + * Get details of a user given userId + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getUserDetailsTest() throws ApiException { + String userId = null; + GetUserDetailsResponseUser response = api.getUserDetails(userId); + + // TODO: test validations + } + + /** + * + * + * Lists all members from all houses of a user + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllHousematesTest() throws ApiException { + String userId = null; + Pageable pageable = null; + ListHouseMembersResponse response = api.listAllHousemates(userId, pageable); + + // TODO: test validations + } + + /** + * + * + * Lists all users + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listAllUsersTest() throws ApiException { + Pageable pageable = null; + GetUserDetailsResponse response = api.listAllUsers(pageable); + + // TODO: test validations + } + + /** + * + * + * Resend email confirm mail + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void resendConfirmEmailMailTest() throws ApiException { + String userId = null; + api.resendConfirmEmailMail(userId); + + // TODO: test validations + } + + /** + * + * + * Create a new user + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void signUpTest() throws ApiException { + CreateUserRequest createUserRequest = null; + CreateUserResponse response = api.signUp(createUserRequest); + + // TODO: test validations + } + + /** + * + * + * Request reset password or reset password + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void usersPasswordPostTest() throws ApiException { + String action = null; + ForgotPasswordRequest forgotPasswordRequest = null; + api.usersPasswordPost(action, forgotPasswordRequest); + + // TODO: test validations + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddAmenityRequestTest.java b/gen/src/test/java/org/openapitools/client/model/AddAmenityRequestTest.java new file mode 100644 index 00000000..927202e6 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddAmenityRequestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.AmenityDto; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddAmenityRequest + */ +public class AddAmenityRequestTest { + private final AddAmenityRequest model = new AddAmenityRequest(); + + /** + * Model tests for AddAmenityRequest + */ + @Test + public void testAddAmenityRequest() { + // TODO: test AddAmenityRequest + } + + /** + * Test the property 'amenities' + */ + @Test + public void amenitiesTest() { + // TODO: test amenities + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddAmenityResponseTest.java b/gen/src/test/java/org/openapitools/client/model/AddAmenityResponseTest.java new file mode 100644 index 00000000..d759f9da --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddAmenityResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.openapitools.client.model.AmenityDto; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddAmenityResponse + */ +public class AddAmenityResponseTest { + private final AddAmenityResponse model = new AddAmenityResponse(); + + /** + * Model tests for AddAmenityResponse + */ + @Test + public void testAddAmenityResponse() { + // TODO: test AddAmenityResponse + } + + /** + * Test the property 'amenities' + */ + @Test + public void amenitiesTest() { + // TODO: test amenities + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddCommunityAdminRequestTest.java b/gen/src/test/java/org/openapitools/client/model/AddCommunityAdminRequestTest.java new file mode 100644 index 00000000..90f1b099 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddCommunityAdminRequestTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddCommunityAdminRequest + */ +public class AddCommunityAdminRequestTest { + private final AddCommunityAdminRequest model = new AddCommunityAdminRequest(); + + /** + * Model tests for AddCommunityAdminRequest + */ + @Test + public void testAddCommunityAdminRequest() { + // TODO: test AddCommunityAdminRequest + } + + /** + * Test the property 'admins' + */ + @Test + public void adminsTest() { + // TODO: test admins + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddCommunityAdminResponseTest.java b/gen/src/test/java/org/openapitools/client/model/AddCommunityAdminResponseTest.java new file mode 100644 index 00000000..727d1a0e --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddCommunityAdminResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddCommunityAdminResponse + */ +public class AddCommunityAdminResponseTest { + private final AddCommunityAdminResponse model = new AddCommunityAdminResponse(); + + /** + * Model tests for AddCommunityAdminResponse + */ + @Test + public void testAddCommunityAdminResponse() { + // TODO: test AddCommunityAdminResponse + } + + /** + * Test the property 'admins' + */ + @Test + public void adminsTest() { + // TODO: test admins + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddCommunityHouseRequestTest.java b/gen/src/test/java/org/openapitools/client/model/AddCommunityHouseRequestTest.java new file mode 100644 index 00000000..22e1d2b6 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddCommunityHouseRequestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.CommunityHouseName; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddCommunityHouseRequest + */ +public class AddCommunityHouseRequestTest { + private final AddCommunityHouseRequest model = new AddCommunityHouseRequest(); + + /** + * Model tests for AddCommunityHouseRequest + */ + @Test + public void testAddCommunityHouseRequest() { + // TODO: test AddCommunityHouseRequest + } + + /** + * Test the property 'houses' + */ + @Test + public void housesTest() { + // TODO: test houses + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddCommunityHouseResponseTest.java b/gen/src/test/java/org/openapitools/client/model/AddCommunityHouseResponseTest.java new file mode 100644 index 00000000..ec2c22b6 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddCommunityHouseResponseTest.java @@ -0,0 +1,54 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddCommunityHouseResponse + */ +public class AddCommunityHouseResponseTest { + private final AddCommunityHouseResponse model = new AddCommunityHouseResponse(); + + /** + * Model tests for AddCommunityHouseResponse + */ + @Test + public void testAddCommunityHouseResponse() { + // TODO: test AddCommunityHouseResponse + } + + /** + * Test the property 'houses' + */ + @Test + public void housesTest() { + // TODO: test houses + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddHouseMemberRequestTest.java b/gen/src/test/java/org/openapitools/client/model/AddHouseMemberRequestTest.java new file mode 100644 index 00000000..77ec6fc9 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddHouseMemberRequestTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.HouseMemberDto; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddHouseMemberRequest + */ +public class AddHouseMemberRequestTest { + private final AddHouseMemberRequest model = new AddHouseMemberRequest(); + + /** + * Model tests for AddHouseMemberRequest + */ + @Test + public void testAddHouseMemberRequest() { + // TODO: test AddHouseMemberRequest + } + + /** + * Test the property 'members' + */ + @Test + public void membersTest() { + // TODO: test members + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AddHouseMemberResponseTest.java b/gen/src/test/java/org/openapitools/client/model/AddHouseMemberResponseTest.java new file mode 100644 index 00000000..e380ad19 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AddHouseMemberResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.HouseMember; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AddHouseMemberResponse + */ +public class AddHouseMemberResponseTest { + private final AddHouseMemberResponse model = new AddHouseMemberResponse(); + + /** + * Model tests for AddHouseMemberResponse + */ + @Test + public void testAddHouseMemberResponse() { + // TODO: test AddHouseMemberResponse + } + + /** + * Test the property 'members' + */ + @Test + public void membersTest() { + // TODO: test members + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AdminPaymentTest.java b/gen/src/test/java/org/openapitools/client/model/AdminPaymentTest.java new file mode 100644 index 00000000..54c2ab12 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AdminPaymentTest.java @@ -0,0 +1,76 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AdminPayment + */ +public class AdminPaymentTest { + private final AdminPayment model = new AdminPayment(); + + /** + * Model tests for AdminPayment + */ + @Test + public void testAdminPayment() { + // TODO: test AdminPayment + } + + /** + * Test the property 'adminId' + */ + @Test + public void adminIdTest() { + // TODO: test adminId + } + + /** + * Test the property 'paymentId' + */ + @Test + public void paymentIdTest() { + // TODO: test paymentId + } + + /** + * Test the property 'charge' + */ + @Test + public void chargeTest() { + // TODO: test charge + } + + /** + * Test the property 'dueDate' + */ + @Test + public void dueDateTest() { + // TODO: test dueDate + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/AmenityDtoTest.java b/gen/src/test/java/org/openapitools/client/model/AmenityDtoTest.java new file mode 100644 index 00000000..04284ca9 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/AmenityDtoTest.java @@ -0,0 +1,92 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for AmenityDto + */ +public class AmenityDtoTest { + private final AmenityDto model = new AmenityDto(); + + /** + * Model tests for AmenityDto + */ + @Test + public void testAmenityDto() { + // TODO: test AmenityDto + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'amenityId' + */ + @Test + public void amenityIdTest() { + // TODO: test amenityId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'price' + */ + @Test + public void priceTest() { + // TODO: test price + } + + /** + * Test the property 'communityId' + */ + @Test + public void communityIdTest() { + // TODO: test communityId + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/CommunityHouseNameTest.java b/gen/src/test/java/org/openapitools/client/model/CommunityHouseNameTest.java new file mode 100644 index 00000000..abe5d050 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/CommunityHouseNameTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CommunityHouseName + */ +public class CommunityHouseNameTest { + private final CommunityHouseName model = new CommunityHouseName(); + + /** + * Model tests for CommunityHouseName + */ + @Test + public void testCommunityHouseName() { + // TODO: test CommunityHouseName + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/CreateCommunityRequestTest.java b/gen/src/test/java/org/openapitools/client/model/CreateCommunityRequestTest.java new file mode 100644 index 00000000..af20b820 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/CreateCommunityRequestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateCommunityRequest + */ +public class CreateCommunityRequestTest { + private final CreateCommunityRequest model = new CreateCommunityRequest(); + + /** + * Model tests for CreateCommunityRequest + */ + @Test + public void testCreateCommunityRequest() { + // TODO: test CreateCommunityRequest + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'district' + */ + @Test + public void districtTest() { + // TODO: test district + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/CreateCommunityResponseTest.java b/gen/src/test/java/org/openapitools/client/model/CreateCommunityResponseTest.java new file mode 100644 index 00000000..0f32ed1f --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/CreateCommunityResponseTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateCommunityResponse + */ +public class CreateCommunityResponseTest { + private final CreateCommunityResponse model = new CreateCommunityResponse(); + + /** + * Model tests for CreateCommunityResponse + */ + @Test + public void testCreateCommunityResponse() { + // TODO: test CreateCommunityResponse + } + + /** + * Test the property 'communityId' + */ + @Test + public void communityIdTest() { + // TODO: test communityId + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/CreateUserRequestTest.java b/gen/src/test/java/org/openapitools/client/model/CreateUserRequestTest.java new file mode 100644 index 00000000..39c61759 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/CreateUserRequestTest.java @@ -0,0 +1,67 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateUserRequest + */ +public class CreateUserRequestTest { + private final CreateUserRequest model = new CreateUserRequest(); + + /** + * Model tests for CreateUserRequest + */ + @Test + public void testCreateUserRequest() { + // TODO: test CreateUserRequest + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/CreateUserResponseTest.java b/gen/src/test/java/org/openapitools/client/model/CreateUserResponseTest.java new file mode 100644 index 00000000..69fbdb70 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/CreateUserResponseTest.java @@ -0,0 +1,67 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for CreateUserResponse + */ +public class CreateUserResponseTest { + private final CreateUserResponse model = new CreateUserResponse(); + + /** + * Model tests for CreateUserResponse + */ + @Test + public void testCreateUserResponse() { + // TODO: test CreateUserResponse + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/ForgotPasswordRequestTest.java b/gen/src/test/java/org/openapitools/client/model/ForgotPasswordRequestTest.java new file mode 100644 index 00000000..fb9f46e4 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/ForgotPasswordRequestTest.java @@ -0,0 +1,67 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ForgotPasswordRequest + */ +public class ForgotPasswordRequestTest { + private final ForgotPasswordRequest model = new ForgotPasswordRequest(); + + /** + * Model tests for ForgotPasswordRequest + */ + @Test + public void testForgotPasswordRequest() { + // TODO: test ForgotPasswordRequest + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'token' + */ + @Test + public void tokenTest() { + // TODO: test token + } + + /** + * Test the property 'newPassword' + */ + @Test + public void newPasswordTest() { + // TODO: test newPassword + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetAmenityDetailsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/GetAmenityDetailsResponseTest.java new file mode 100644 index 00000000..eae61aa9 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetAmenityDetailsResponseTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetAmenityDetailsResponse + */ +public class GetAmenityDetailsResponseTest { + private final GetAmenityDetailsResponse model = new GetAmenityDetailsResponse(); + + /** + * Model tests for GetAmenityDetailsResponse + */ + @Test + public void testGetAmenityDetailsResponse() { + // TODO: test GetAmenityDetailsResponse + } + + /** + * Test the property 'amenityId' + */ + @Test + public void amenityIdTest() { + // TODO: test amenityId + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunityTest.java b/gen/src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunityTest.java new file mode 100644 index 00000000..b7ebaf3c --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseCommunityTest.java @@ -0,0 +1,67 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetCommunityDetailsResponseCommunity + */ +public class GetCommunityDetailsResponseCommunityTest { + private final GetCommunityDetailsResponseCommunity model = new GetCommunityDetailsResponseCommunity(); + + /** + * Model tests for GetCommunityDetailsResponseCommunity + */ + @Test + public void testGetCommunityDetailsResponseCommunity() { + // TODO: test GetCommunityDetailsResponseCommunity + } + + /** + * Test the property 'communityId' + */ + @Test + public void communityIdTest() { + // TODO: test communityId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'district' + */ + @Test + public void districtTest() { + // TODO: test district + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseTest.java new file mode 100644 index 00000000..a3196427 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetCommunityDetailsResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.GetCommunityDetailsResponseCommunity; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetCommunityDetailsResponse + */ +public class GetCommunityDetailsResponseTest { + private final GetCommunityDetailsResponse model = new GetCommunityDetailsResponse(); + + /** + * Model tests for GetCommunityDetailsResponse + */ + @Test + public void testGetCommunityDetailsResponse() { + // TODO: test GetCommunityDetailsResponse + } + + /** + * Test the property 'communities' + */ + @Test + public void communitiesTest() { + // TODO: test communities + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouseTest.java b/gen/src/test/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouseTest.java new file mode 100644 index 00000000..9bc87e57 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetHouseDetailsResponseCommunityHouseTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetHouseDetailsResponseCommunityHouse + */ +public class GetHouseDetailsResponseCommunityHouseTest { + private final GetHouseDetailsResponseCommunityHouse model = new GetHouseDetailsResponseCommunityHouse(); + + /** + * Model tests for GetHouseDetailsResponseCommunityHouse + */ + @Test + public void testGetHouseDetailsResponseCommunityHouse() { + // TODO: test GetHouseDetailsResponseCommunityHouse + } + + /** + * Test the property 'houseId' + */ + @Test + public void houseIdTest() { + // TODO: test houseId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetHouseDetailsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/GetHouseDetailsResponseTest.java new file mode 100644 index 00000000..78d6d20e --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetHouseDetailsResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.GetHouseDetailsResponseCommunityHouse; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetHouseDetailsResponse + */ +public class GetHouseDetailsResponseTest { + private final GetHouseDetailsResponse model = new GetHouseDetailsResponse(); + + /** + * Model tests for GetHouseDetailsResponse + */ + @Test + public void testGetHouseDetailsResponse() { + // TODO: test GetHouseDetailsResponse + } + + /** + * Test the property 'houses' + */ + @Test + public void housesTest() { + // TODO: test houses + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetUserDetailsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/GetUserDetailsResponseTest.java new file mode 100644 index 00000000..7ce10137 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetUserDetailsResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.GetUserDetailsResponseUser; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetUserDetailsResponse + */ +public class GetUserDetailsResponseTest { + private final GetUserDetailsResponse model = new GetUserDetailsResponse(); + + /** + * Model tests for GetUserDetailsResponse + */ + @Test + public void testGetUserDetailsResponse() { + // TODO: test GetUserDetailsResponse + } + + /** + * Test the property 'users' + */ + @Test + public void usersTest() { + // TODO: test users + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/GetUserDetailsResponseUserTest.java b/gen/src/test/java/org/openapitools/client/model/GetUserDetailsResponseUserTest.java new file mode 100644 index 00000000..c312994f --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/GetUserDetailsResponseUserTest.java @@ -0,0 +1,78 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for GetUserDetailsResponseUser + */ +public class GetUserDetailsResponseUserTest { + private final GetUserDetailsResponseUser model = new GetUserDetailsResponseUser(); + + /** + * Model tests for GetUserDetailsResponseUser + */ + @Test + public void testGetUserDetailsResponseUser() { + // TODO: test GetUserDetailsResponseUser + } + + /** + * Test the property 'userId' + */ + @Test + public void userIdTest() { + // TODO: test userId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'communityIds' + */ + @Test + public void communityIdsTest() { + // TODO: test communityIds + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/HouseMemberDtoTest.java b/gen/src/test/java/org/openapitools/client/model/HouseMemberDtoTest.java new file mode 100644 index 00000000..e6feccb0 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/HouseMemberDtoTest.java @@ -0,0 +1,67 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for HouseMemberDto + */ +public class HouseMemberDtoTest { + private final HouseMemberDto model = new HouseMemberDto(); + + /** + * Model tests for HouseMemberDto + */ + @Test + public void testHouseMemberDto() { + // TODO: test HouseMemberDto + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'memberId' + */ + @Test + public void memberIdTest() { + // TODO: test memberId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/HouseMemberTest.java b/gen/src/test/java/org/openapitools/client/model/HouseMemberTest.java new file mode 100644 index 00000000..41d5f5ba --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/HouseMemberTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for HouseMember + */ +public class HouseMemberTest { + private final HouseMember model = new HouseMember(); + + /** + * Model tests for HouseMember + */ + @Test + public void testHouseMember() { + // TODO: test HouseMember + } + + /** + * Test the property 'memberId' + */ + @Test + public void memberIdTest() { + // TODO: test memberId + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/ListAdminPaymentsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/ListAdminPaymentsResponseTest.java new file mode 100644 index 00000000..3a9b0dc4 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/ListAdminPaymentsResponseTest.java @@ -0,0 +1,64 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.AdminPayment; +import org.openapitools.client.model.PageInfo; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListAdminPaymentsResponse + */ +public class ListAdminPaymentsResponseTest { + private final ListAdminPaymentsResponse model = new ListAdminPaymentsResponse(); + + /** + * Model tests for ListAdminPaymentsResponse + */ + @Test + public void testListAdminPaymentsResponse() { + // TODO: test ListAdminPaymentsResponse + } + + /** + * Test the property 'payments' + */ + @Test + public void paymentsTest() { + // TODO: test payments + } + + /** + * Test the property 'pageInfo' + */ + @Test + public void pageInfoTest() { + // TODO: test pageInfo + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdminTest.java b/gen/src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdminTest.java new file mode 100644 index 00000000..6b7e5ae9 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseCommunityAdminTest.java @@ -0,0 +1,51 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListCommunityAdminsResponseCommunityAdmin + */ +public class ListCommunityAdminsResponseCommunityAdminTest { + private final ListCommunityAdminsResponseCommunityAdmin model = new ListCommunityAdminsResponseCommunityAdmin(); + + /** + * Model tests for ListCommunityAdminsResponseCommunityAdmin + */ + @Test + public void testListCommunityAdminsResponseCommunityAdmin() { + // TODO: test ListCommunityAdminsResponseCommunityAdmin + } + + /** + * Test the property 'adminId' + */ + @Test + public void adminIdTest() { + // TODO: test adminId + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseTest.java new file mode 100644 index 00000000..a87b516a --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/ListCommunityAdminsResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.ListCommunityAdminsResponseCommunityAdmin; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListCommunityAdminsResponse + */ +public class ListCommunityAdminsResponseTest { + private final ListCommunityAdminsResponse model = new ListCommunityAdminsResponse(); + + /** + * Model tests for ListCommunityAdminsResponse + */ + @Test + public void testListCommunityAdminsResponse() { + // TODO: test ListCommunityAdminsResponse + } + + /** + * Test the property 'admins' + */ + @Test + public void adminsTest() { + // TODO: test admins + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/ListHouseMembersResponseTest.java b/gen/src/test/java/org/openapitools/client/model/ListHouseMembersResponseTest.java new file mode 100644 index 00000000..c0d5cb0b --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/ListHouseMembersResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.HouseMember; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListHouseMembersResponse + */ +public class ListHouseMembersResponseTest { + private final ListHouseMembersResponse model = new ListHouseMembersResponse(); + + /** + * Model tests for ListHouseMembersResponse + */ + @Test + public void testListHouseMembersResponse() { + // TODO: test ListHouseMembersResponse + } + + /** + * Test the property 'members' + */ + @Test + public void membersTest() { + // TODO: test members + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/ListMemberPaymentsResponseTest.java b/gen/src/test/java/org/openapitools/client/model/ListMemberPaymentsResponseTest.java new file mode 100644 index 00000000..a484179b --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/ListMemberPaymentsResponseTest.java @@ -0,0 +1,55 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; +import org.openapitools.client.model.MemberPayment; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for ListMemberPaymentsResponse + */ +public class ListMemberPaymentsResponseTest { + private final ListMemberPaymentsResponse model = new ListMemberPaymentsResponse(); + + /** + * Model tests for ListMemberPaymentsResponse + */ + @Test + public void testListMemberPaymentsResponse() { + // TODO: test ListMemberPaymentsResponse + } + + /** + * Test the property 'payments' + */ + @Test + public void paymentsTest() { + // TODO: test payments + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/LoginRequestTest.java b/gen/src/test/java/org/openapitools/client/model/LoginRequestTest.java new file mode 100644 index 00000000..551db89b --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/LoginRequestTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for LoginRequest + */ +public class LoginRequestTest { + private final LoginRequest model = new LoginRequest(); + + /** + * Model tests for LoginRequest + */ + @Test + public void testLoginRequest() { + // TODO: test LoginRequest + } + + /** + * Test the property 'email' + */ + @Test + public void emailTest() { + // TODO: test email + } + + /** + * Test the property 'password' + */ + @Test + public void passwordTest() { + // TODO: test password + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/MemberPaymentTest.java b/gen/src/test/java/org/openapitools/client/model/MemberPaymentTest.java new file mode 100644 index 00000000..a1d120be --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/MemberPaymentTest.java @@ -0,0 +1,76 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for MemberPayment + */ +public class MemberPaymentTest { + private final MemberPayment model = new MemberPayment(); + + /** + * Model tests for MemberPayment + */ + @Test + public void testMemberPayment() { + // TODO: test MemberPayment + } + + /** + * Test the property 'memberId' + */ + @Test + public void memberIdTest() { + // TODO: test memberId + } + + /** + * Test the property 'paymentId' + */ + @Test + public void paymentIdTest() { + // TODO: test paymentId + } + + /** + * Test the property 'charge' + */ + @Test + public void chargeTest() { + // TODO: test charge + } + + /** + * Test the property 'dueDate' + */ + @Test + public void dueDateTest() { + // TODO: test dueDate + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/PageInfoTest.java b/gen/src/test/java/org/openapitools/client/model/PageInfoTest.java new file mode 100644 index 00000000..11fdb3c1 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/PageInfoTest.java @@ -0,0 +1,75 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for PageInfo + */ +public class PageInfoTest { + private final PageInfo model = new PageInfo(); + + /** + * Model tests for PageInfo + */ + @Test + public void testPageInfo() { + // TODO: test PageInfo + } + + /** + * Test the property 'currentPage' + */ + @Test + public void currentPageTest() { + // TODO: test currentPage + } + + /** + * Test the property 'pageLimit' + */ + @Test + public void pageLimitTest() { + // TODO: test pageLimit + } + + /** + * Test the property 'totalPages' + */ + @Test + public void totalPagesTest() { + // TODO: test totalPages + } + + /** + * Test the property 'totalElements' + */ + @Test + public void totalElementsTest() { + // TODO: test totalElements + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/PageableTest.java b/gen/src/test/java/org/openapitools/client/model/PageableTest.java new file mode 100644 index 00000000..a5a25a99 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/PageableTest.java @@ -0,0 +1,59 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for Pageable + */ +public class PageableTest { + private final Pageable model = new Pageable(); + + /** + * Model tests for Pageable + */ + @Test + public void testPageable() { + // TODO: test Pageable + } + + /** + * Test the property 'page' + */ + @Test + public void pageTest() { + // TODO: test page + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/SchedulePaymentRequestTest.java b/gen/src/test/java/org/openapitools/client/model/SchedulePaymentRequestTest.java new file mode 100644 index 00000000..546a44cd --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/SchedulePaymentRequestTest.java @@ -0,0 +1,100 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SchedulePaymentRequest + */ +public class SchedulePaymentRequestTest { + private final SchedulePaymentRequest model = new SchedulePaymentRequest(); + + /** + * Model tests for SchedulePaymentRequest + */ + @Test + public void testSchedulePaymentRequest() { + // TODO: test SchedulePaymentRequest + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'charge' + */ + @Test + public void chargeTest() { + // TODO: test charge + } + + /** + * Test the property 'dueDate' + */ + @Test + public void dueDateTest() { + // TODO: test dueDate + } + + /** + * Test the property 'adminId' + */ + @Test + public void adminIdTest() { + // TODO: test adminId + } + + /** + * Test the property 'memberId' + */ + @Test + public void memberIdTest() { + // TODO: test memberId + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/SchedulePaymentResponseTest.java b/gen/src/test/java/org/openapitools/client/model/SchedulePaymentResponseTest.java new file mode 100644 index 00000000..f0a3e642 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/SchedulePaymentResponseTest.java @@ -0,0 +1,108 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for SchedulePaymentResponse + */ +public class SchedulePaymentResponseTest { + private final SchedulePaymentResponse model = new SchedulePaymentResponse(); + + /** + * Model tests for SchedulePaymentResponse + */ + @Test + public void testSchedulePaymentResponse() { + // TODO: test SchedulePaymentResponse + } + + /** + * Test the property 'paymentId' + */ + @Test + public void paymentIdTest() { + // TODO: test paymentId + } + + /** + * Test the property 'charge' + */ + @Test + public void chargeTest() { + // TODO: test charge + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'recurring' + */ + @Test + public void recurringTest() { + // TODO: test recurring + } + + /** + * Test the property 'dueDate' + */ + @Test + public void dueDateTest() { + // TODO: test dueDate + } + + /** + * Test the property 'adminId' + */ + @Test + public void adminIdTest() { + // TODO: test adminId + } + + /** + * Test the property 'memberId' + */ + @Test + public void memberIdTest() { + // TODO: test memberId + } + +} diff --git a/gen/src/test/java/org/openapitools/client/model/UpdateAmenityRequestTest.java b/gen/src/test/java/org/openapitools/client/model/UpdateAmenityRequestTest.java new file mode 100644 index 00000000..8fc28a28 --- /dev/null +++ b/gen/src/test/java/org/openapitools/client/model/UpdateAmenityRequestTest.java @@ -0,0 +1,75 @@ +/* + * 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.model; + +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + + +/** + * Model tests for UpdateAmenityRequest + */ +public class UpdateAmenityRequestTest { + private final UpdateAmenityRequest model = new UpdateAmenityRequest(); + + /** + * Model tests for UpdateAmenityRequest + */ + @Test + public void testUpdateAmenityRequest() { + // TODO: test UpdateAmenityRequest + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'description' + */ + @Test + public void descriptionTest() { + // TODO: test description + } + + /** + * Test the property 'price' + */ + @Test + public void priceTest() { + // TODO: test price + } + + /** + * Test the property 'communityId' + */ + @Test + public void communityIdTest() { + // TODO: test communityId + } + +}