From 1372f4e7e178df6452faf96d64191727cbcc023a Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Thu, 26 Jun 2025 20:02:13 +0200 Subject: [PATCH 01/20] feat: basic code gen script --- api/scripts/gen_code.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 api/scripts/gen_code.sh diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh new file mode 100644 index 00000000..561de05f --- /dev/null +++ b/api/scripts/gen_code.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +# +openapi-generator-cli generate -g spring -i api/openapi.yaml --additional-properties=useTags=true,buildTool=gradle,interfaceOnly=true -o server/matching/generated \ No newline at end of file From c423569f944fddef49dc13ca4e9b920aa5553103 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Thu, 26 Jun 2025 20:02:27 +0200 Subject: [PATCH 02/20] fix: correct docker-compose paths --- deployment/docker/compose.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deployment/docker/compose.yml b/deployment/docker/compose.yml index 5f02809b..ba1f5131 100644 --- a/deployment/docker/compose.yml +++ b/deployment/docker/compose.yml @@ -35,7 +35,7 @@ services: - backend genai-service: - build: ../../genai + build: ../../server/genai container_name: meetatmensa-genai expose: - "80" @@ -49,7 +49,7 @@ services: - "80:80" match-database: - build: ../../database/matchdb + build: ../../server/database/matchdb container_name: meetatmensa-matchdb # TODO: Implement password passed via secret environment: @@ -62,7 +62,7 @@ services: - backend user-database: - build: ../../database/userdb + build: ../../server/database/userdb container_name: meetatmensa-userdb # TODO: Implement password passed via secret environment: From f97c16abb4388676ce00c912b18dd3a5f749caca Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 12:51:20 +0200 Subject: [PATCH 03/20] gen: generated code for matching-service --- .../generated/.openapi-generator-ignore | 23 ++ .../generated/.openapi-generator/FILES | 25 ++ .../generated/.openapi-generator/VERSION | 1 + server/matching/generated/README.md | 27 ++ server/matching/generated/pom.xml | 88 +++++ .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/GenAiApi.java | 97 +++++ .../org/openapitools/api/MatchingApi.java | 352 ++++++++++++++++++ .../java/org/openapitools/api/UserApi.java | 231 ++++++++++++ .../model/ConversationStarter.java | 85 +++++ .../model/ConversationStarter1.java | 87 +++++ ...V2GenaiConversationStarter200Response.java | 87 +++++ ...tApiV2GenaiConversationStarterRequest.java | 99 +++++ ...ApiV2MatchingMatchesUserID200Response.java | 99 +++++ ...piV2MatchingRequestsUserID200Response.java | 99 +++++ .../java/org/openapitools/model/Group.java | 261 +++++++++++++ .../java/org/openapitools/model/Match.java | 215 +++++++++++ .../openapitools/model/MatchPreferences.java | 135 +++++++ .../openapitools/model/MatchPreferences1.java | 135 +++++++ .../openapitools/model/MatchPreferences2.java | 135 +++++++ .../org/openapitools/model/MatchRequest.java | 340 +++++++++++++++++ .../org/openapitools/model/MatchStatus.java | 153 ++++++++ .../PostApiV2MatchingRequestRequest.java | 251 +++++++++++++ .../model/PostApiV2UserRegisterRequest.java | 315 ++++++++++++++++ ...tApiV2MatchingRequestRequestIdRequest.java | 236 ++++++++++++ .../model/PutApiV2UserUserIDRequest.java | 296 +++++++++++++++ .../java/org/openapitools/model/User.java | 339 +++++++++++++++++ 27 files changed, 4230 insertions(+) create mode 100644 server/matching/generated/.openapi-generator-ignore create mode 100644 server/matching/generated/.openapi-generator/FILES create mode 100644 server/matching/generated/.openapi-generator/VERSION create mode 100644 server/matching/generated/README.md create mode 100644 server/matching/generated/pom.xml create mode 100644 server/matching/generated/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/api/UserApi.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/Group.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/Match.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java create mode 100644 server/matching/generated/src/main/java/org/openapitools/model/User.java diff --git a/server/matching/generated/.openapi-generator-ignore b/server/matching/generated/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/server/matching/generated/.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/server/matching/generated/.openapi-generator/FILES b/server/matching/generated/.openapi-generator/FILES new file mode 100644 index 00000000..04110a35 --- /dev/null +++ b/server/matching/generated/.openapi-generator/FILES @@ -0,0 +1,25 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/GenAiApi.java +src/main/java/org/openapitools/api/MatchingApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/ConversationStarter.java +src/main/java/org/openapitools/model/ConversationStarter1.java +src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java +src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java +src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java +src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java +src/main/java/org/openapitools/model/Group.java +src/main/java/org/openapitools/model/Match.java +src/main/java/org/openapitools/model/MatchPreferences.java +src/main/java/org/openapitools/model/MatchPreferences1.java +src/main/java/org/openapitools/model/MatchPreferences2.java +src/main/java/org/openapitools/model/MatchRequest.java +src/main/java/org/openapitools/model/MatchStatus.java +src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java +src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java +src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java +src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java +src/main/java/org/openapitools/model/User.java diff --git a/server/matching/generated/.openapi-generator/VERSION b/server/matching/generated/.openapi-generator/VERSION new file mode 100644 index 00000000..e465da43 --- /dev/null +++ b/server/matching/generated/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/server/matching/generated/README.md b/server/matching/generated/README.md new file mode 100644 index 00000000..d43a1de3 --- /dev/null +++ b/server/matching/generated/README.md @@ -0,0 +1,27 @@ + +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/server/matching/generated/pom.xml b/server/matching/generated/pom.xml new file mode 100644 index 00000000..ed9595b2 --- /dev/null +++ b/server/matching/generated/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + org.openapitools + openapi-spring + jar + openapi-spring + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + UTF-8 + 1.6.14 + 5.3.1 + + + org.springframework.boot + spring-boot-starter-parent + 2.7.15 + + + + src/main/java + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/server/matching/generated/src/main/java/org/openapitools/api/ApiUtil.java b/server/matching/generated/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 00000000..1245b1dd --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java b/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java new file mode 100644 index 00000000..791141b1 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java @@ -0,0 +1,97 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.GetApiV2GenaiConversationStarter200Response; +import org.openapitools.model.GetApiV2GenaiConversationStarterRequest; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "GenAI", description = "Paths belonging to the GenAI microservice") +public interface GenAiApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /api/v2/genai/conversation-starter : Request conversation starter + * Request a series of conversation starter prompts from the GenAI microservice. Provide infomation about users on request. + * + * @param getApiV2GenaiConversationStarterRequest Request Conversation starter for these users (optional) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2GenaiConversationStarter", + summary = "Request conversation starter", + description = "Request a series of conversation starter prompts from the GenAI microservice. Provide infomation about users on request.", + tags = { "GenAI" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2GenaiConversationStarter200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/genai/conversation-starter", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity getApiV2GenaiConversationStarter( + @Parameter(name = "GetApiV2GenaiConversationStarterRequest", description = "Request Conversation starter for these users") @Valid @RequestBody(required = false) @Nullable GetApiV2GenaiConversationStarterRequest getApiV2GenaiConversationStarterRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"conversationStarters\" : { \"prompt\" : \"prompt\" } }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java b/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java new file mode 100644 index 00000000..8ff5ef60 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java @@ -0,0 +1,352 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.GetApiV2MatchingMatchesUserID200Response; +import org.openapitools.model.GetApiV2MatchingRequestsUserID200Response; +import org.openapitools.model.MatchRequest; +import org.openapitools.model.PostApiV2MatchingRequestRequest; +import org.openapitools.model.PutApiV2MatchingRequestRequestIdRequest; +import java.util.UUID; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "Matching", description = "Paths belonging to the Matching microservice") +public interface MatchingApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /api/v2/matching/request/{request-id} : Delete MatchRequest with {request-id} + * Delete MatchRequest with ID {request-id} from the system + * + * @param requestId UUID associated with a given match request (required) + * @return Request Deleted (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "deleteApiV2MatchingMatchesRequestId", + summary = "Delete MatchRequest with {request-id}", + description = "Delete MatchRequest with ID {request-id} from the system", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "Request Deleted"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api/v2/matching/request/{request-id}" + ) + + default ResponseEntity deleteApiV2MatchingMatchesRequestId( + @Parameter(name = "request-id", description = "UUID associated with a given match request", required = true, in = ParameterIn.PATH) @PathVariable("request-id") UUID requestId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/matches/{user-id} : Retrieve all matches for a {user-id} + * Retrieve all matches for a user with {user-id} from the matching-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingMatchesUserID", + summary = "Retrieve all matches for a {user-id}", + description = "Retrieve all matches for a user with {user-id} from the matching-service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2MatchingMatchesUserID200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/matches/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2MatchingMatchesUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"matches\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"matchID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\", \"group\" : { \"date\" : \"2000-01-23\", \"userStatus\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" } ], \"groupID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"location\" : \"GARCHING\", \"conversationStarters\" : { \"prompt\" : \"prompt\" }, \"time\" : 2 } }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"matchID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\", \"group\" : { \"date\" : \"2000-01-23\", \"userStatus\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" } ], \"groupID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"location\" : \"GARCHING\", \"conversationStarters\" : { \"prompt\" : \"prompt\" }, \"time\" : 2 } } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/requests/{user-id} : Retrieve all MatchRequests for a {user-id} + * Retrieve all MatchRequests for a user with {user-id} from the matching-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRequestsUserID", + summary = "Retrieve all MatchRequests for a {user-id}", + description = "Retrieve all MatchRequests for a user with {user-id} from the matching-service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2MatchingRequestsUserID200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/requests/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2MatchingRequestsUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"matches\" : [ { \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" }, { \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/rsvp/{match-id}/accept : Accept invitation to a given match + * Accept invitation to a given match + * + * @param matchId UUID associated with a given match (required) + * @return OK (status code 200) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRsvpMatchIdAccept", + summary = "Accept invitation to a given match", + description = "Accept invitation to a given match", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/rsvp/{match-id}/accept" + ) + + default ResponseEntity getApiV2MatchingRsvpMatchIdAccept( + @Parameter(name = "match-id", description = "UUID associated with a given match", required = true, in = ParameterIn.PATH) @PathVariable("match-id") UUID matchId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/rsvp/{match-id}/reject : Reject invitation to a given match + * Reject invitation to a given match + * + * @param matchId UUID associated with a given match (required) + * @return OK (status code 200) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRsvpMatchIdReject", + summary = "Reject invitation to a given match", + description = "Reject invitation to a given match", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/rsvp/{match-id}/reject" + ) + + default ResponseEntity getApiV2MatchingRsvpMatchIdReject( + @Parameter(name = "match-id", description = "UUID associated with a given match", required = true, in = ParameterIn.PATH) @PathVariable("match-id") UUID matchId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /api/v2/matching/request/submit : Submit matching Request + * Submit a new matching request to the Matching-Service + * + * @param postApiV2MatchingRequestRequest (optional) + * @return Request submitted sucessfully (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + */ + @Operation( + operationId = "postApiV2MatchingRequest", + summary = "Submit matching Request", + description = "Submit a new matching request to the Matching-Service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "Request submitted sucessfully"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api/v2/matching/request/submit", + consumes = { "application/json" } + ) + + default ResponseEntity postApiV2MatchingRequest( + @Parameter(name = "PostApiV2MatchingRequestRequest", description = "") @Valid @RequestBody(required = false) @Nullable PostApiV2MatchingRequestRequest postApiV2MatchingRequestRequest + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api/v2/matching/request/{request-id} : Update MatchRequest with {request-id} + * Update all information in the MatchRequest with ID {request-id} + * + * @param requestId UUID associated with a given match request (required) + * @param putApiV2MatchingRequestRequestIdRequest (optional) + * @return MatchRequest cannot be updated since it has already been fulfilled! (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + * or Not Acceptable (status code 406) + */ + @Operation( + operationId = "putApiV2MatchingRequestRequestId", + summary = "Update MatchRequest with {request-id}", + description = "Update all information in the MatchRequest with ID {request-id}", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "MatchRequest cannot be updated since it has already been fulfilled!", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = MatchRequest.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. "), + @ApiResponse(responseCode = "406", description = "Not Acceptable") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api/v2/matching/request/{request-id}", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity putApiV2MatchingRequestRequestId( + @Parameter(name = "request-id", description = "UUID associated with a given match request", required = true, in = ParameterIn.PATH) @PathVariable("request-id") UUID requestId, + @Parameter(name = "PutApiV2MatchingRequestRequestIdRequest", description = "") @Valid @RequestBody(required = false) @Nullable PutApiV2MatchingRequestRequestIdRequest putApiV2MatchingRequestRequestIdRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java b/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 00000000..02c13e07 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,231 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.PostApiV2UserRegisterRequest; +import org.openapitools.model.PutApiV2UserUserIDRequest; +import java.util.UUID; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "User", description = "Paths belonging to the User microservice") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /api/v2/user/{user-id} : Delete User with {user-id} + * Remove all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @return User deleted (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or The request was malformed or contained invalid parameters. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "deleteApiV2UserUserID", + summary = "Delete User with {user-id}", + description = "Remove all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "User deleted"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api/v2/user/{user-id}" + ) + + default ResponseEntity deleteApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/user/{user-id} : Retrieve User with {user-id} + * Fetch all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2UserUserID", + summary = "Retrieve User with {user-id}", + description = "Fetch all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/user/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"birthday\" : \"2000-01-23\", \"firstname\" : \"Max\", \"degreeStart\" : 2024, \"gender\" : \"other\", \"degree\" : \"msc_informatics\", \"bio\" : \"bio\", \"interests\" : [ \"interests\", \"interests\" ], \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"email\" : \"email\", \"lastname\" : \"Mustermann\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /api/v2/user/register : Register new User + * Register a new user and respond with it's {user-id} + * + * @param postApiV2UserRegisterRequest (optional) + * @return Successfully created user (status code 201) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or Conflict (status code 409) + */ + @Operation( + operationId = "postApiV2UserRegister", + summary = "Register new User", + description = "Register a new user and respond with it's {user-id}", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "201", description = "Successfully created user", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = UUID.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "409", description = "Conflict") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api/v2/user/register", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity postApiV2UserRegister( + @Parameter(name = "PostApiV2UserRegisterRequest", description = "") @Valid @RequestBody(required = false) @Nullable PostApiV2UserRegisterRequest postApiV2UserRegisterRequest + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api/v2/user/{user-id} : Update User with {user-id} + * Update all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @param putApiV2UserUserIDRequest (optional) + * @return User updated successfully (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "putApiV2UserUserID", + summary = "Update User with {user-id}", + description = "Update all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "User updated successfully", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api/v2/user/{user-id}", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity putApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId, + @Parameter(name = "PutApiV2UserUserIDRequest", description = "") @Valid @RequestBody(required = false) @Nullable PutApiV2UserUserIDRequest putApiV2UserUserIDRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"birthday\" : \"2000-01-23\", \"firstname\" : \"Max\", \"degreeStart\" : 2024, \"gender\" : \"other\", \"degree\" : \"msc_informatics\", \"bio\" : \"bio\", \"interests\" : [ \"interests\", \"interests\" ], \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"email\" : \"email\", \"lastname\" : \"Mustermann\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java new file mode 100644 index 00000000..5de2589d --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a conversation starter in the meet@mensa system + */ + +@Schema(name = "ConversationStarter", description = "Object representing a conversation starter in the meet@mensa system") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class ConversationStarter { + + private @Nullable String prompt; + + public ConversationStarter prompt(@Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + + @Schema(name = "prompt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("prompt") + public @Nullable String getPrompt() { + return prompt; + } + + public void setPrompt(@Nullable String prompt) { + this.prompt = prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationStarter conversationStarter = (ConversationStarter) o; + return Objects.equals(this.prompt, conversationStarter.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationStarter {\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).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/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java new file mode 100644 index 00000000..e930a631 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a conversation starter in the meet@mensa system + */ + +@Schema(name = "ConversationStarter_1", description = "Object representing a conversation starter in the meet@mensa system") +@JsonTypeName("ConversationStarter_1") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class ConversationStarter1 { + + private @Nullable String prompt; + + public ConversationStarter1 prompt(@Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + + @Schema(name = "prompt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("prompt") + public @Nullable String getPrompt() { + return prompt; + } + + public void setPrompt(@Nullable String prompt) { + this.prompt = prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationStarter1 conversationStarter1 = (ConversationStarter1) o; + return Objects.equals(this.prompt, conversationStarter1.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationStarter1 {\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).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/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java new file mode 100644 index 00000000..75c9986e --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.ConversationStarter1; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2GenaiConversationStarter200Response + */ + +@JsonTypeName("get_api_v2_genai_conversation_starter_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2GenaiConversationStarter200Response { + + private @Nullable ConversationStarter1 conversationStarters; + + public GetApiV2GenaiConversationStarter200Response conversationStarters(@Nullable ConversationStarter1 conversationStarters) { + this.conversationStarters = conversationStarters; + return this; + } + + /** + * Get conversationStarters + * @return conversationStarters + */ + @Valid + @Schema(name = "conversationStarters", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("conversationStarters") + public @Nullable ConversationStarter1 getConversationStarters() { + return conversationStarters; + } + + public void setConversationStarters(@Nullable ConversationStarter1 conversationStarters) { + this.conversationStarters = conversationStarters; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2GenaiConversationStarter200Response getApiV2GenaiConversationStarter200Response = (GetApiV2GenaiConversationStarter200Response) o; + return Objects.equals(this.conversationStarters, getApiV2GenaiConversationStarter200Response.conversationStarters); + } + + @Override + public int hashCode() { + return Objects.hash(conversationStarters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2GenaiConversationStarter200Response {\n"); + sb.append(" conversationStarters: ").append(toIndentedString(conversationStarters)).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/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java new file mode 100644 index 00000000..9c803eb1 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.User; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2GenaiConversationStarterRequest + */ + +@JsonTypeName("get_api_v2_genai_conversation_starter_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2GenaiConversationStarterRequest { + + @Valid + private List<@Valid User> users = new ArrayList<>(); + + public GetApiV2GenaiConversationStarterRequest users(List<@Valid User> users) { + this.users = users; + return this; + } + + public GetApiV2GenaiConversationStarterRequest addUsersItem(User usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Get users + * @return users + */ + @Valid + @Schema(name = "users", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("users") + public List<@Valid User> getUsers() { + return users; + } + + public void setUsers(List<@Valid User> users) { + this.users = users; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2GenaiConversationStarterRequest getApiV2GenaiConversationStarterRequest = (GetApiV2GenaiConversationStarterRequest) o; + return Objects.equals(this.users, getApiV2GenaiConversationStarterRequest.users); + } + + @Override + public int hashCode() { + return Objects.hash(users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2GenaiConversationStarterRequest {\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/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java new file mode 100644 index 00000000..c78e27fe --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.Match; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2MatchingMatchesUserID200Response + */ + +@JsonTypeName("get_api_v2_matching_matches_userID_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2MatchingMatchesUserID200Response { + + @Valid + private List<@Valid Match> matches = new ArrayList<>(); + + public GetApiV2MatchingMatchesUserID200Response matches(List<@Valid Match> matches) { + this.matches = matches; + return this; + } + + public GetApiV2MatchingMatchesUserID200Response addMatchesItem(Match matchesItem) { + if (this.matches == null) { + this.matches = new ArrayList<>(); + } + this.matches.add(matchesItem); + return this; + } + + /** + * Get matches + * @return matches + */ + @Valid + @Schema(name = "matches", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("matches") + public List<@Valid Match> getMatches() { + return matches; + } + + public void setMatches(List<@Valid Match> matches) { + this.matches = matches; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2MatchingMatchesUserID200Response getApiV2MatchingMatchesUserID200Response = (GetApiV2MatchingMatchesUserID200Response) o; + return Objects.equals(this.matches, getApiV2MatchingMatchesUserID200Response.matches); + } + + @Override + public int hashCode() { + return Objects.hash(matches); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2MatchingMatchesUserID200Response {\n"); + sb.append(" matches: ").append(toIndentedString(matches)).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/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java new file mode 100644 index 00000000..455120d2 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.MatchRequest; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2MatchingRequestsUserID200Response + */ + +@JsonTypeName("get_api_v2_matching_requests_userID_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2MatchingRequestsUserID200Response { + + @Valid + private List<@Valid MatchRequest> matches = new ArrayList<>(); + + public GetApiV2MatchingRequestsUserID200Response matches(List<@Valid MatchRequest> matches) { + this.matches = matches; + return this; + } + + public GetApiV2MatchingRequestsUserID200Response addMatchesItem(MatchRequest matchesItem) { + if (this.matches == null) { + this.matches = new ArrayList<>(); + } + this.matches.add(matchesItem); + return this; + } + + /** + * Get matches + * @return matches + */ + @Valid + @Schema(name = "matches", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("matches") + public List<@Valid MatchRequest> getMatches() { + return matches; + } + + public void setMatches(List<@Valid MatchRequest> matches) { + this.matches = matches; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2MatchingRequestsUserID200Response getApiV2MatchingRequestsUserID200Response = (GetApiV2MatchingRequestsUserID200Response) o; + return Objects.equals(this.matches, getApiV2MatchingRequestsUserID200Response.matches); + } + + @Override + public int hashCode() { + return Objects.hash(matches); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2MatchingRequestsUserID200Response {\n"); + sb.append(" matches: ").append(toIndentedString(matches)).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/server/matching/generated/src/main/java/org/openapitools/model/Group.java b/server/matching/generated/src/main/java/org/openapitools/model/Group.java new file mode 100644 index 00000000..1a551163 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/Group.java @@ -0,0 +1,261 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.ConversationStarter; +import org.openapitools.model.MatchStatus; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a group that has been matched in the Meet@Mensa system. + */ + +@Schema(name = "Group", description = "Object representing a group that has been matched in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class Group { + + private @Nullable UUID groupID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate date; + + private @Nullable Integer time; + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable LocationEnum location; + + @Valid + private List<@Valid MatchStatus> userStatus = new ArrayList<>(); + + private @Nullable ConversationStarter conversationStarters; + + public Group groupID(@Nullable UUID groupID) { + this.groupID = groupID; + return this; + } + + /** + * The unique ID of a Group in the Meet@Mensa system. + * @return groupID + */ + @Valid + @Schema(name = "groupID", description = "The unique ID of a Group in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("groupID") + public @Nullable UUID getGroupID() { + return groupID; + } + + public void setGroupID(@Nullable UUID groupID) { + this.groupID = groupID; + } + + public Group date(@Nullable LocalDate date) { + this.date = date; + return this; + } + + /** + * Date the group is scheduled to meet at + * @return date + */ + @Valid + @Schema(name = "date", description = "Date the group is scheduled to meet at", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public @Nullable LocalDate getDate() { + return date; + } + + public void setDate(@Nullable LocalDate date) { + this.date = date; + } + + public Group time(@Nullable Integer time) { + this.time = time; + return this; + } + + /** + * Timeslot the group is scheduled to meet at + * minimum: 1 + * maximum: 16 + * @return time + */ + @Min(1) @Max(16) + @Schema(name = "time", description = "Timeslot the group is scheduled to meet at", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("time") + public @Nullable Integer getTime() { + return time; + } + + public void setTime(@Nullable Integer time) { + this.time = time; + } + + public Group location(@Nullable LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("location") + public @Nullable LocationEnum getLocation() { + return location; + } + + public void setLocation(@Nullable LocationEnum location) { + this.location = location; + } + + public Group userStatus(List<@Valid MatchStatus> userStatus) { + this.userStatus = userStatus; + return this; + } + + public Group addUserStatusItem(MatchStatus userStatusItem) { + if (this.userStatus == null) { + this.userStatus = new ArrayList<>(); + } + this.userStatus.add(userStatusItem); + return this; + } + + /** + * Get userStatus + * @return userStatus + */ + @Valid @Size(min = 2) + @Schema(name = "userStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userStatus") + public List<@Valid MatchStatus> getUserStatus() { + return userStatus; + } + + public void setUserStatus(List<@Valid MatchStatus> userStatus) { + this.userStatus = userStatus; + } + + public Group conversationStarters(@Nullable ConversationStarter conversationStarters) { + this.conversationStarters = conversationStarters; + return this; + } + + /** + * Get conversationStarters + * @return conversationStarters + */ + @Valid + @Schema(name = "conversationStarters", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("conversationStarters") + public @Nullable ConversationStarter getConversationStarters() { + return conversationStarters; + } + + public void setConversationStarters(@Nullable ConversationStarter conversationStarters) { + this.conversationStarters = conversationStarters; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Group group = (Group) o; + return Objects.equals(this.groupID, group.groupID) && + Objects.equals(this.date, group.date) && + Objects.equals(this.time, group.time) && + Objects.equals(this.location, group.location) && + Objects.equals(this.userStatus, group.userStatus) && + Objects.equals(this.conversationStarters, group.conversationStarters); + } + + @Override + public int hashCode() { + return Objects.hash(groupID, date, time, location, userStatus, conversationStarters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Group {\n"); + sb.append(" groupID: ").append(toIndentedString(groupID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append(" conversationStarters: ").append(toIndentedString(conversationStarters)).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/server/matching/generated/src/main/java/org/openapitools/model/Match.java b/server/matching/generated/src/main/java/org/openapitools/model/Match.java new file mode 100644 index 00000000..669ed3ce --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/Match.java @@ -0,0 +1,215 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.UUID; +import org.openapitools.model.Group; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a single match for a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "Match", description = "Object representing a single match for a given user on a given date in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class Match { + + private UUID matchID; + + private UUID userID; + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + */ + public enum StatusEnum { + UNSENT("UNSENT"), + + SENT("SENT"), + + CONFIRMED("CONFIRMED"), + + REJECTED("REJECTED"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + private Group group; + + public Match() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Match(UUID matchID, UUID userID, StatusEnum status, Group group) { + this.matchID = matchID; + this.userID = userID; + this.status = status; + this.group = group; + } + + public Match matchID(UUID matchID) { + this.matchID = matchID; + return this; + } + + /** + * The unique ID of a Group in the Meet@Mensa system. + * @return matchID + */ + @NotNull @Valid + @Schema(name = "matchID", description = "The unique ID of a Group in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("matchID") + public UUID getMatchID() { + return matchID; + } + + public void setMatchID(UUID matchID) { + this.matchID = matchID; + } + + public Match userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public Match status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + * @return status + */ + @NotNull + @Schema(name = "status", description = "Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past |", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Match group(Group group) { + this.group = group; + return this; + } + + /** + * Get group + * @return group + */ + @NotNull @Valid + @Schema(name = "group", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("group") + public Group getGroup() { + return group; + } + + public void setGroup(Group group) { + this.group = group; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Match match = (Match) o; + return Objects.equals(this.matchID, match.matchID) && + Objects.equals(this.userID, match.userID) && + Objects.equals(this.status, match.status) && + Objects.equals(this.group, match.group); + } + + @Override + public int hashCode() { + return Objects.hash(matchID, userID, status, group); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Match {\n"); + sb.append(" matchID: ").append(toIndentedString(matchID)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).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/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java new file mode 100644 index 00000000..5b007c29 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences matchPreferences = (MatchPreferences) o; + return Objects.equals(this.degreePref, matchPreferences.degreePref) && + Objects.equals(this.agePref, matchPreferences.agePref) && + Objects.equals(this.genderPref, matchPreferences.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java new file mode 100644 index 00000000..a352d0dd --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences_1", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences_1") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences1 { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences1 degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences1 agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences1 genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences1 matchPreferences1 = (MatchPreferences1) o; + return Objects.equals(this.degreePref, matchPreferences1.degreePref) && + Objects.equals(this.agePref, matchPreferences1.agePref) && + Objects.equals(this.genderPref, matchPreferences1.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences1 {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java new file mode 100644 index 00000000..e34fad24 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences_2", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences_2") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences2 { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences2 degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences2 agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences2 genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences2 matchPreferences2 = (MatchPreferences2) o; + return Objects.equals(this.degreePref, matchPreferences2.degreePref) && + Objects.equals(this.agePref, matchPreferences2.agePref) && + Objects.equals(this.genderPref, matchPreferences2.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences2 {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java new file mode 100644 index 00000000..415d5c66 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java @@ -0,0 +1,340 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences1; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "MatchRequest", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchRequest { + + private UUID requestID; + + private UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private LocationEnum location; + + private MatchPreferences1 preferences; + + /** + * Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | + */ + public enum StatusEnum { + PENDING("PENDING"), + + MATCHED("MATCHED"), + + UNMATCHABLE("UNMATCHABLE"), + + REMATCH("REMATCH"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + public MatchRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MatchRequest(UUID requestID, UUID userID, LocalDate date, List<@Min(1) @Max(16)Integer> timeslot, LocationEnum location, MatchPreferences1 preferences, StatusEnum status) { + this.requestID = requestID; + this.userID = userID; + this.date = date; + this.timeslot = timeslot; + this.location = location; + this.preferences = preferences; + this.status = status; + } + + public MatchRequest requestID(UUID requestID) { + this.requestID = requestID; + return this; + } + + /** + * The unique ID of a MatchRequest in the Meet@Mensa system. + * @return requestID + */ + @NotNull @Valid + @Schema(name = "requestID", description = "The unique ID of a MatchRequest in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("requestID") + public UUID getRequestID() { + return requestID; + } + + public void setRequestID(UUID requestID) { + this.requestID = requestID; + } + + public MatchRequest userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public MatchRequest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @NotNull @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public MatchRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public MatchRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + @NotNull + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public MatchRequest location(LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + @NotNull + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("location") + public LocationEnum getLocation() { + return location; + } + + public void setLocation(LocationEnum location) { + this.location = location; + } + + public MatchRequest preferences(MatchPreferences1 preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @NotNull @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("preferences") + public MatchPreferences1 getPreferences() { + return preferences; + } + + public void setPreferences(MatchPreferences1 preferences) { + this.preferences = preferences; + } + + public MatchRequest status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | + * @return status + */ + @NotNull + @Schema(name = "status", description = "Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchRequest matchRequest = (MatchRequest) o; + return Objects.equals(this.requestID, matchRequest.requestID) && + Objects.equals(this.userID, matchRequest.userID) && + Objects.equals(this.date, matchRequest.date) && + Objects.equals(this.timeslot, matchRequest.timeslot) && + Objects.equals(this.location, matchRequest.location) && + Objects.equals(this.preferences, matchRequest.preferences) && + Objects.equals(this.status, matchRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(requestID, userID, date, timeslot, location, preferences, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchRequest {\n"); + sb.append(" requestID: ").append(toIndentedString(requestID)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java new file mode 100644 index 00000000..bd9c6424 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java @@ -0,0 +1,153 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.UUID; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * MatchStatus + */ + +@JsonTypeName("matchStatus") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchStatus { + + private @Nullable UUID userID; + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + */ + public enum StatusEnum { + UNSENT("UNSENT"), + + SENT("SENT"), + + CONFIRMED("CONFIRMED"), + + REJECTED("REJECTED"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable StatusEnum status; + + public MatchStatus userID(@Nullable UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userID") + public @Nullable UUID getUserID() { + return userID; + } + + public void setUserID(@Nullable UUID userID) { + this.userID = userID; + } + + public MatchStatus status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + * @return status + */ + + @Schema(name = "status", description = "Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past |", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchStatus matchStatus = (MatchStatus) o; + return Objects.equals(this.userID, matchStatus.userID) && + Objects.equals(this.status, matchStatus.status); + } + + @Override + public int hashCode() { + return Objects.hash(userID, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchStatus {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java new file mode 100644 index 00000000..e458f400 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java @@ -0,0 +1,251 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "post_api_v2_matching_request_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@JsonTypeName("post_api_v2_matching_request_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PostApiV2MatchingRequestRequest { + + private UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private LocationEnum location; + + private MatchPreferences preferences; + + public PostApiV2MatchingRequestRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PostApiV2MatchingRequestRequest(UUID userID, LocalDate date, List<@Min(1) @Max(16)Integer> timeslot, LocationEnum location, MatchPreferences preferences) { + this.userID = userID; + this.date = date; + this.timeslot = timeslot; + this.location = location; + this.preferences = preferences; + } + + public PostApiV2MatchingRequestRequest userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public PostApiV2MatchingRequestRequest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @NotNull @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public PostApiV2MatchingRequestRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public PostApiV2MatchingRequestRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + @NotNull + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public PostApiV2MatchingRequestRequest location(LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + @NotNull + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("location") + public LocationEnum getLocation() { + return location; + } + + public void setLocation(LocationEnum location) { + this.location = location; + } + + public PostApiV2MatchingRequestRequest preferences(MatchPreferences preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @NotNull @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("preferences") + public MatchPreferences getPreferences() { + return preferences; + } + + public void setPreferences(MatchPreferences preferences) { + this.preferences = preferences; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostApiV2MatchingRequestRequest postApiV2MatchingRequestRequest = (PostApiV2MatchingRequestRequest) o; + return Objects.equals(this.userID, postApiV2MatchingRequestRequest.userID) && + Objects.equals(this.date, postApiV2MatchingRequestRequest.date) && + Objects.equals(this.timeslot, postApiV2MatchingRequestRequest.timeslot) && + Objects.equals(this.location, postApiV2MatchingRequestRequest.location) && + Objects.equals(this.preferences, postApiV2MatchingRequestRequest.preferences); + } + + @Override + public int hashCode() { + return Objects.hash(userID, date, timeslot, location, preferences); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostApiV2MatchingRequestRequest {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).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/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java new file mode 100644 index 00000000..f29d3e9c --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java @@ -0,0 +1,315 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "post_api_v2_user_register_request", description = "Object representing a student user in the Meet@Mensa system.") +@JsonTypeName("post_api_v2_user_register_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PostApiV2UserRegisterRequest { + + private String email; + + private String firstname; + + private String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate birthday; + + private String gender = "other"; + + private String degree; + + private Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private String bio; + + public PostApiV2UserRegisterRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PostApiV2UserRegisterRequest(String email, String firstname, String lastname, LocalDate birthday, String gender, String degree, Integer degreeStart, List interests, String bio) { + this.email = email; + this.firstname = firstname; + this.lastname = lastname; + this.birthday = birthday; + this.gender = gender; + this.degree = degree; + this.degreeStart = degreeStart; + this.interests = interests; + this.bio = bio; + } + + public PostApiV2UserRegisterRequest email(String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @NotNull @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public PostApiV2UserRegisterRequest firstname(String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + @NotNull + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("firstname") + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public PostApiV2UserRegisterRequest lastname(String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + @NotNull + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("lastname") + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public PostApiV2UserRegisterRequest birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @NotNull @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("birthday") + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public PostApiV2UserRegisterRequest gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + @NotNull + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public PostApiV2UserRegisterRequest degree(String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + @NotNull + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degree") + public String getDegree() { + return degree; + } + + public void setDegree(String degree) { + this.degree = degree; + } + + public PostApiV2UserRegisterRequest degreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @NotNull @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degreeStart") + public Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public PostApiV2UserRegisterRequest interests(List interests) { + this.interests = interests; + return this; + } + + public PostApiV2UserRegisterRequest addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + @NotNull + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public PostApiV2UserRegisterRequest bio(String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + @NotNull + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("bio") + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostApiV2UserRegisterRequest postApiV2UserRegisterRequest = (PostApiV2UserRegisterRequest) o; + return Objects.equals(this.email, postApiV2UserRegisterRequest.email) && + Objects.equals(this.firstname, postApiV2UserRegisterRequest.firstname) && + Objects.equals(this.lastname, postApiV2UserRegisterRequest.lastname) && + Objects.equals(this.birthday, postApiV2UserRegisterRequest.birthday) && + Objects.equals(this.gender, postApiV2UserRegisterRequest.gender) && + Objects.equals(this.degree, postApiV2UserRegisterRequest.degree) && + Objects.equals(this.degreeStart, postApiV2UserRegisterRequest.degreeStart) && + Objects.equals(this.interests, postApiV2UserRegisterRequest.interests) && + Objects.equals(this.bio, postApiV2UserRegisterRequest.bio); + } + + @Override + public int hashCode() { + return Objects.hash(email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostApiV2UserRegisterRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java new file mode 100644 index 00000000..0eba6959 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java @@ -0,0 +1,236 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences2; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "put_api_v2_matching_request_request_id_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@JsonTypeName("put_api_v2_matching_request_request_id_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PutApiV2MatchingRequestRequestIdRequest { + + private @Nullable UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable LocationEnum location; + + private @Nullable MatchPreferences2 preferences; + + public PutApiV2MatchingRequestRequestIdRequest userID(@Nullable UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userID") + public @Nullable UUID getUserID() { + return userID; + } + + public void setUserID(@Nullable UUID userID) { + this.userID = userID; + } + + public PutApiV2MatchingRequestRequestIdRequest date(@Nullable LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public @Nullable LocalDate getDate() { + return date; + } + + public void setDate(@Nullable LocalDate date) { + this.date = date; + } + + public PutApiV2MatchingRequestRequestIdRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public PutApiV2MatchingRequestRequestIdRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public PutApiV2MatchingRequestRequestIdRequest location(@Nullable LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("location") + public @Nullable LocationEnum getLocation() { + return location; + } + + public void setLocation(@Nullable LocationEnum location) { + this.location = location; + } + + public PutApiV2MatchingRequestRequestIdRequest preferences(@Nullable MatchPreferences2 preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("preferences") + public @Nullable MatchPreferences2 getPreferences() { + return preferences; + } + + public void setPreferences(@Nullable MatchPreferences2 preferences) { + this.preferences = preferences; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutApiV2MatchingRequestRequestIdRequest putApiV2MatchingRequestRequestIdRequest = (PutApiV2MatchingRequestRequestIdRequest) o; + return Objects.equals(this.userID, putApiV2MatchingRequestRequestIdRequest.userID) && + Objects.equals(this.date, putApiV2MatchingRequestRequestIdRequest.date) && + Objects.equals(this.timeslot, putApiV2MatchingRequestRequestIdRequest.timeslot) && + Objects.equals(this.location, putApiV2MatchingRequestRequestIdRequest.location) && + Objects.equals(this.preferences, putApiV2MatchingRequestRequestIdRequest.preferences); + } + + @Override + public int hashCode() { + return Objects.hash(userID, date, timeslot, location, preferences); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutApiV2MatchingRequestRequestIdRequest {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).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/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java new file mode 100644 index 00000000..b19518a5 --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java @@ -0,0 +1,296 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "put_api_v2_user_userID_request", description = "Object representing a student user in the Meet@Mensa system.") +@JsonTypeName("put_api_v2_user_userID_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PutApiV2UserUserIDRequest { + + private @Nullable String email; + + private @Nullable String firstname; + + private @Nullable String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate birthday; + + private String gender = "other"; + + private @Nullable String degree; + + private @Nullable Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private @Nullable String bio; + + public PutApiV2UserUserIDRequest email(@Nullable String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("email") + public @Nullable String getEmail() { + return email; + } + + public void setEmail(@Nullable String email) { + this.email = email; + } + + public PutApiV2UserUserIDRequest firstname(@Nullable String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("firstname") + public @Nullable String getFirstname() { + return firstname; + } + + public void setFirstname(@Nullable String firstname) { + this.firstname = firstname; + } + + public PutApiV2UserUserIDRequest lastname(@Nullable String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastname") + public @Nullable String getLastname() { + return lastname; + } + + public void setLastname(@Nullable String lastname) { + this.lastname = lastname; + } + + public PutApiV2UserUserIDRequest birthday(@Nullable LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("birthday") + public @Nullable LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(@Nullable LocalDate birthday) { + this.birthday = birthday; + } + + public PutApiV2UserUserIDRequest gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public PutApiV2UserUserIDRequest degree(@Nullable String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degree") + public @Nullable String getDegree() { + return degree; + } + + public void setDegree(@Nullable String degree) { + this.degree = degree; + } + + public PutApiV2UserUserIDRequest degreeStart(@Nullable Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreeStart") + public @Nullable Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(@Nullable Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public PutApiV2UserUserIDRequest interests(List interests) { + this.interests = interests; + return this; + } + + public PutApiV2UserUserIDRequest addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public PutApiV2UserUserIDRequest bio(@Nullable String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("bio") + public @Nullable String getBio() { + return bio; + } + + public void setBio(@Nullable String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutApiV2UserUserIDRequest putApiV2UserUserIDRequest = (PutApiV2UserUserIDRequest) o; + return Objects.equals(this.email, putApiV2UserUserIDRequest.email) && + Objects.equals(this.firstname, putApiV2UserUserIDRequest.firstname) && + Objects.equals(this.lastname, putApiV2UserUserIDRequest.lastname) && + Objects.equals(this.birthday, putApiV2UserUserIDRequest.birthday) && + Objects.equals(this.gender, putApiV2UserUserIDRequest.gender) && + Objects.equals(this.degree, putApiV2UserUserIDRequest.degree) && + Objects.equals(this.degreeStart, putApiV2UserUserIDRequest.degreeStart) && + Objects.equals(this.interests, putApiV2UserUserIDRequest.interests) && + Objects.equals(this.bio, putApiV2UserUserIDRequest.bio); + } + + @Override + public int hashCode() { + return Objects.hash(email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutApiV2UserUserIDRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/matching/generated/src/main/java/org/openapitools/model/User.java b/server/matching/generated/src/main/java/org/openapitools/model/User.java new file mode 100644 index 00000000..9af7322b --- /dev/null +++ b/server/matching/generated/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,339 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "User", description = "Object representing a student user in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class User { + + private UUID userID; + + private String email; + + private String firstname; + + private String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate birthday; + + private String gender = "other"; + + private String degree; + + private Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private String bio; + + public User() { + super(); + } + + /** + * Constructor with only required parameters + */ + public User(UUID userID, String email, String firstname, String lastname, LocalDate birthday, String gender, String degree, Integer degreeStart, List interests, String bio) { + this.userID = userID; + this.email = email; + this.firstname = firstname; + this.lastname = lastname; + this.birthday = birthday; + this.gender = gender; + this.degree = degree; + this.degreeStart = degreeStart; + this.interests = interests; + this.bio = bio; + } + + public User userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @NotNull @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User firstname(String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + @NotNull + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("firstname") + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public User lastname(String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + @NotNull + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("lastname") + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public User birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @NotNull @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("birthday") + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public User gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + @NotNull + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public User degree(String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + @NotNull + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degree") + public String getDegree() { + return degree; + } + + public void setDegree(String degree) { + this.degree = degree; + } + + public User degreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @NotNull @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degreeStart") + public Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public User interests(List interests) { + this.interests = interests; + return this; + } + + public User addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + @NotNull + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public User bio(String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + @NotNull + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("bio") + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.userID, user.userID) && + Objects.equals(this.email, user.email) && + Objects.equals(this.firstname, user.firstname) && + Objects.equals(this.lastname, user.lastname) && + Objects.equals(this.birthday, user.birthday) && + Objects.equals(this.gender, user.gender) && + Objects.equals(this.degree, user.degree) && + Objects.equals(this.degreeStart, user.degreeStart) && + Objects.equals(this.interests, user.interests) && + Objects.equals(this.bio, user.bio); + } + + @Override + public int hashCode() { + return Objects.hash(userID, email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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 "); + } +} + From 23e9545d9d553dea44c1f31ad03924fcec6615ec Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 12:58:06 +0200 Subject: [PATCH 04/20] gen: generated gradle build files --- server/matching/generated/build.gradle | 55 ++++ server/matching/generated/gradle.properties | 7 + .../generated/gradle/libs.versions.toml | 26 ++ .../gradle/wrapper/gradle-wrapper.properties | 7 + server/matching/generated/gradlew | 251 ++++++++++++++++++ server/matching/generated/gradlew.bat | 94 +++++++ server/matching/generated/settings.gradle | 7 + 7 files changed, 447 insertions(+) create mode 100644 server/matching/generated/build.gradle create mode 100644 server/matching/generated/gradle.properties create mode 100644 server/matching/generated/gradle/libs.versions.toml create mode 100644 server/matching/generated/gradle/wrapper/gradle-wrapper.properties create mode 100644 server/matching/generated/gradlew create mode 100644 server/matching/generated/gradlew.bat create mode 100644 server/matching/generated/settings.gradle diff --git a/server/matching/generated/build.gradle b/server/matching/generated/build.gradle new file mode 100644 index 00000000..1442a2a1 --- /dev/null +++ b/server/matching/generated/build.gradle @@ -0,0 +1,55 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This project uses @Incubating APIs which are subject to change. + */ + +plugins { + id 'java-library' + id 'maven-publish' +} + +repositories { + mavenLocal() + maven { + url = uri('https://repo.maven.apache.org/maven2/') + } +} + +dependencies { + api libs.org.springframework.boot.spring.boot.starter.web + api libs.org.springframework.data.spring.data.commons + api libs.org.springdoc.springdoc.openapi.ui + api libs.com.google.code.findbugs.jsr305 + api libs.com.fasterxml.jackson.dataformat.jackson.dataformat.yaml + api libs.com.fasterxml.jackson.datatype.jackson.datatype.jsr310 + api libs.org.openapitools.jackson.databind.nullable + api libs.org.springframework.boot.spring.boot.starter.validation + api libs.com.fasterxml.jackson.core.jackson.databind + testImplementation libs.org.springframework.boot.spring.boot.starter.test +} + +group = 'org.openapitools' +version = '1.0.0' +description = 'openapi-spring' +java.sourceCompatibility = JavaVersion.VERSION_1_8 + +java { + withSourcesJar() +} + +publishing { + publications { + maven(MavenPublication) { + from(components.java) + } + } +} + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Javadoc) { + options.encoding = 'UTF-8' +} diff --git a/server/matching/generated/gradle.properties b/server/matching/generated/gradle.properties new file mode 100644 index 00000000..51540088 --- /dev/null +++ b/server/matching/generated/gradle.properties @@ -0,0 +1,7 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties + +org.gradle.configuration-cache=true +org.gradle.parallel=true +org.gradle.caching=true + diff --git a/server/matching/generated/gradle/libs.versions.toml b/server/matching/generated/gradle/libs.versions.toml new file mode 100644 index 00000000..71008423 --- /dev/null +++ b/server/matching/generated/gradle/libs.versions.toml @@ -0,0 +1,26 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +com-fasterxml-jackson-core-jackson-databind = "2.13.5" +com-fasterxml-jackson-dataformat-jackson-dataformat-yaml = "2.13.5" +com-fasterxml-jackson-datatype-jackson-datatype-jsr310 = "2.13.5" +com-google-code-findbugs-jsr305 = "3.0.2" +org-openapitools-jackson-databind-nullable = "0.2.6" +org-springdoc-springdoc-openapi-ui = "1.6.14" +org-springframework-boot-spring-boot-starter-test = "2.7.15" +org-springframework-boot-spring-boot-starter-validation = "2.7.15" +org-springframework-boot-spring-boot-starter-web = "2.7.15" +org-springframework-data-spring-data-commons = "2.7.15" + +[libraries] +com-fasterxml-jackson-core-jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "com-fasterxml-jackson-core-jackson-databind" } +com-fasterxml-jackson-dataformat-jackson-dataformat-yaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "com-fasterxml-jackson-dataformat-jackson-dataformat-yaml" } +com-fasterxml-jackson-datatype-jackson-datatype-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "com-fasterxml-jackson-datatype-jackson-datatype-jsr310" } +com-google-code-findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "com-google-code-findbugs-jsr305" } +org-openapitools-jackson-databind-nullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "org-openapitools-jackson-databind-nullable" } +org-springdoc-springdoc-openapi-ui = { module = "org.springdoc:springdoc-openapi-ui", version.ref = "org-springdoc-springdoc-openapi-ui" } +org-springframework-boot-spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "org-springframework-boot-spring-boot-starter-test" } +org-springframework-boot-spring-boot-starter-validation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "org-springframework-boot-spring-boot-starter-validation" } +org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" } +org-springframework-data-spring-data-commons = { module = "org.springframework.data:spring-data-commons", version.ref = "org-springframework-data-spring-data-commons" } diff --git a/server/matching/generated/gradle/wrapper/gradle-wrapper.properties b/server/matching/generated/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..ff23a68d --- /dev/null +++ b/server/matching/generated/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/server/matching/generated/gradlew b/server/matching/generated/gradlew new file mode 100644 index 00000000..23d15a93 --- /dev/null +++ b/server/matching/generated/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original 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. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# 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 ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/server/matching/generated/gradlew.bat b/server/matching/generated/gradlew.bat new file mode 100644 index 00000000..db3a6ac2 --- /dev/null +++ b/server/matching/generated/gradlew.bat @@ -0,0 +1,94 @@ +@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 +@rem SPDX-License-Identifier: Apache-2.0 +@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=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/server/matching/generated/settings.gradle b/server/matching/generated/settings.gradle new file mode 100644 index 00000000..606d01eb --- /dev/null +++ b/server/matching/generated/settings.gradle @@ -0,0 +1,7 @@ +/* + * This file was generated by the Gradle 'init' task. + * + * This project uses @Incubating APIs which are subject to change. + */ + +rootProject.name = 'openapi-spring' From 11078966cef6ad7a3d7360d9d61303da9c34f568 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 13:44:30 +0200 Subject: [PATCH 05/20] feat: added build dependencies We use a composite build using gradle --- server/matching/build.gradle | 1 + server/matching/settings.gradle | 1 + 2 files changed, 2 insertions(+) diff --git a/server/matching/build.gradle b/server/matching/build.gradle index 895ff883..4bf86e06 100644 --- a/server/matching/build.gradle +++ b/server/matching/build.gradle @@ -18,6 +18,7 @@ repositories { } dependencies { + implementation 'org.openapitools:openapi-spring' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/server/matching/settings.gradle b/server/matching/settings.gradle index 506315f6..5692e86b 100644 --- a/server/matching/settings.gradle +++ b/server/matching/settings.gradle @@ -1 +1,2 @@ rootProject.name = 'matching' +includeBuild('generated') \ No newline at end of file From 651f8a9b8587d37c8883baeb9306c1fd4c0fa3eb Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 13:46:54 +0200 Subject: [PATCH 06/20] feat: add initial import of generated code --- .../controller/MatchingController.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 server/matching/src/main/java/meet_at_mensa/matching/controller/MatchingController.java diff --git a/server/matching/src/main/java/meet_at_mensa/matching/controller/MatchingController.java b/server/matching/src/main/java/meet_at_mensa/matching/controller/MatchingController.java new file mode 100644 index 00000000..61aff03c --- /dev/null +++ b/server/matching/src/main/java/meet_at_mensa/matching/controller/MatchingController.java @@ -0,0 +1,24 @@ +package meet_at_mensa.matching.controller; + +import org.springframework.beans.factory.annotation.Autowired; + +import org.springframework.web.bind.annotation.RestController; + +import org.openapitools.api.MatchingApi; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.server.ResponseStatusException; + +import org.springframework.http.HttpStatus; + +import java.util.UUID; +import java.util.Map; + +@RestController +public class MatchingController implements MatchingApi { + +} \ No newline at end of file From e82a09d2a4e44d4fd45b78312388e58c0f4f5fc1 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 13:50:56 +0200 Subject: [PATCH 07/20] gen: regen gradle with stable settings --- server/matching/generated/build.gradle | 2 -- server/matching/generated/gradle.properties | 2 -- server/matching/generated/settings.gradle | 2 -- 3 files changed, 6 deletions(-) diff --git a/server/matching/generated/build.gradle b/server/matching/generated/build.gradle index 1442a2a1..6dffee36 100644 --- a/server/matching/generated/build.gradle +++ b/server/matching/generated/build.gradle @@ -1,7 +1,5 @@ /* * This file was generated by the Gradle 'init' task. - * - * This project uses @Incubating APIs which are subject to change. */ plugins { diff --git a/server/matching/generated/gradle.properties b/server/matching/generated/gradle.properties index 51540088..377538c9 100644 --- a/server/matching/generated/gradle.properties +++ b/server/matching/generated/gradle.properties @@ -2,6 +2,4 @@ # https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties org.gradle.configuration-cache=true -org.gradle.parallel=true -org.gradle.caching=true diff --git a/server/matching/generated/settings.gradle b/server/matching/generated/settings.gradle index 606d01eb..d635eddd 100644 --- a/server/matching/generated/settings.gradle +++ b/server/matching/generated/settings.gradle @@ -1,7 +1,5 @@ /* * This file was generated by the Gradle 'init' task. - * - * This project uses @Incubating APIs which are subject to change. */ rootProject.name = 'openapi-spring' From ecddeeecd80e2e258194d3a58bf6a63674b22d40 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:10:42 +0200 Subject: [PATCH 08/20] feat: added custom script for generating code and build files --- api/scripts/gen_code.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh index 561de05f..c149a5a0 100644 --- a/api/scripts/gen_code.sh +++ b/api/scripts/gen_code.sh @@ -1,4 +1,26 @@ #!/bin/bash -# -openapi-generator-cli generate -g spring -i api/openapi.yaml --additional-properties=useTags=true,buildTool=gradle,interfaceOnly=true -o server/matching/generated \ No newline at end of file + +for path in matching user; do + + # echo generating code + echo "Generating code for $path..." + + # generate code based on OpenAPI specification + openapi-generator-cli generate \ + -g spring \ + -i api/openapi.yaml \ + -o server/{$path}/generated \ + --additional-properties=useTags=true,interfaceOnly=true + + # echo generating gradle + echo "Generating gradle project files for $path..." + + # generate gradle build files. + gradle init \ + --type pom \ + --dsl groovy \ + --no-incubating + --project-dir server/{$path}/generated + +done \ No newline at end of file From 523872ccca4c0708484ab5c00ca46f7d0b071ed8 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:14:33 +0200 Subject: [PATCH 09/20] fix: add missing line char to script --- api/scripts/gen_code.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh index c149a5a0..fc5c0c01 100644 --- a/api/scripts/gen_code.sh +++ b/api/scripts/gen_code.sh @@ -20,7 +20,7 @@ for path in matching user; do gradle init \ --type pom \ --dsl groovy \ - --no-incubating + --no-incubating \ --project-dir server/{$path}/generated done \ No newline at end of file From bf5e2666fe4432e2c91bd6cbb5aa4e1039966928 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:14:46 +0200 Subject: [PATCH 10/20] feat: fail script on any one failure --- api/scripts/gen_code.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh index fc5c0c01..fab36574 100644 --- a/api/scripts/gen_code.sh +++ b/api/scripts/gen_code.sh @@ -1,5 +1,7 @@ #!/bin/bash +# fail command if any part fails +set -euo pipefail for path in matching user; do From 0e43fed3101f7057b11a6582baecb4bdd24bf386 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:18:18 +0200 Subject: [PATCH 11/20] fix: remove unnecessary {} from gen script --- api/scripts/gen_code.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh index fab36574..2894e8e8 100644 --- a/api/scripts/gen_code.sh +++ b/api/scripts/gen_code.sh @@ -12,7 +12,7 @@ for path in matching user; do openapi-generator-cli generate \ -g spring \ -i api/openapi.yaml \ - -o server/{$path}/generated \ + -o server/$path/generated \ --additional-properties=useTags=true,interfaceOnly=true # echo generating gradle @@ -23,6 +23,6 @@ for path in matching user; do --type pom \ --dsl groovy \ --no-incubating \ - --project-dir server/{$path}/generated + --project-dir server/$path/generated done \ No newline at end of file From 677630437ed23c1b08caae6f049b9d0c9b0d7fb6 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:31:00 +0200 Subject: [PATCH 12/20] feat: added dependency to dockerfile for matching service --- server/matching/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/matching/Dockerfile b/server/matching/Dockerfile index 151fe28c..dc27e616 100644 --- a/server/matching/Dockerfile +++ b/server/matching/Dockerfile @@ -6,6 +6,11 @@ WORKDIR /app COPY build.gradle settings.gradle ./ COPY src ./src +# Copy only necessary files for generated dependencies +COPY generated/build.gradle generated/settings.gradle ./generated/ +COPY generated/src ./generated/src +COPY generated/gradle/libs.versions.toml ./generated/gradle/ + # Build the application RUN gradle clean bootJar --no-daemon From 31a60dc476f26102d8f003377415409b098f7fab Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:32:06 +0200 Subject: [PATCH 13/20] gen: checked in generated code for user microservice --- .../generated/.openapi-generator/FILES | 1 - .../java/org/openapitools/api/GenAiApi.java | 2 +- .../org/openapitools/api/MatchingApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../model/ConversationStarter.java | 2 +- .../model/ConversationStarter1.java | 2 +- ...V2GenaiConversationStarter200Response.java | 2 +- ...tApiV2GenaiConversationStarterRequest.java | 2 +- ...ApiV2MatchingMatchesUserID200Response.java | 2 +- ...piV2MatchingRequestsUserID200Response.java | 2 +- .../java/org/openapitools/model/Group.java | 2 +- .../java/org/openapitools/model/Match.java | 2 +- .../openapitools/model/MatchPreferences.java | 2 +- .../openapitools/model/MatchPreferences1.java | 2 +- .../openapitools/model/MatchPreferences2.java | 2 +- .../org/openapitools/model/MatchRequest.java | 2 +- .../org/openapitools/model/MatchStatus.java | 2 +- .../PostApiV2MatchingRequestRequest.java | 2 +- .../model/PostApiV2UserRegisterRequest.java | 2 +- ...tApiV2MatchingRequestRequestIdRequest.java | 2 +- .../model/PutApiV2UserUserIDRequest.java | 2 +- .../java/org/openapitools/model/User.java | 2 +- .../user/generated/.openapi-generator-ignore | 23 ++ .../user/generated/.openapi-generator/FILES | 25 ++ .../user/generated/.openapi-generator/VERSION | 1 + server/user/generated/README.md | 27 ++ server/user/generated/build.gradle | 53 +++ server/user/generated/gradle.properties | 5 + .../user/generated/gradle/libs.versions.toml | 26 ++ .../gradle/wrapper/gradle-wrapper.properties | 7 + server/user/generated/gradlew | 251 +++++++++++++ server/user/generated/gradlew.bat | 94 +++++ server/user/generated/pom.xml | 88 +++++ server/user/generated/settings.gradle | 5 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/GenAiApi.java | 97 +++++ .../org/openapitools/api/MatchingApi.java | 352 ++++++++++++++++++ .../java/org/openapitools/api/UserApi.java | 231 ++++++++++++ .../model/ConversationStarter.java | 85 +++++ .../model/ConversationStarter1.java | 87 +++++ ...V2GenaiConversationStarter200Response.java | 87 +++++ ...tApiV2GenaiConversationStarterRequest.java | 99 +++++ ...ApiV2MatchingMatchesUserID200Response.java | 99 +++++ ...piV2MatchingRequestsUserID200Response.java | 99 +++++ .../java/org/openapitools/model/Group.java | 261 +++++++++++++ .../java/org/openapitools/model/Match.java | 215 +++++++++++ .../openapitools/model/MatchPreferences.java | 135 +++++++ .../openapitools/model/MatchPreferences1.java | 135 +++++++ .../openapitools/model/MatchPreferences2.java | 135 +++++++ .../org/openapitools/model/MatchRequest.java | 340 +++++++++++++++++ .../org/openapitools/model/MatchStatus.java | 153 ++++++++ .../PostApiV2MatchingRequestRequest.java | 251 +++++++++++++ .../model/PostApiV2UserRegisterRequest.java | 315 ++++++++++++++++ ...tApiV2MatchingRequestRequestIdRequest.java | 236 ++++++++++++ .../model/PutApiV2UserUserIDRequest.java | 296 +++++++++++++++ .../java/org/openapitools/model/User.java | 339 +++++++++++++++++ 56 files changed, 4692 insertions(+), 22 deletions(-) create mode 100644 server/user/generated/.openapi-generator-ignore create mode 100644 server/user/generated/.openapi-generator/FILES create mode 100644 server/user/generated/.openapi-generator/VERSION create mode 100644 server/user/generated/README.md create mode 100644 server/user/generated/build.gradle create mode 100644 server/user/generated/gradle.properties create mode 100644 server/user/generated/gradle/libs.versions.toml create mode 100644 server/user/generated/gradle/wrapper/gradle-wrapper.properties create mode 100644 server/user/generated/gradlew create mode 100644 server/user/generated/gradlew.bat create mode 100644 server/user/generated/pom.xml create mode 100644 server/user/generated/settings.gradle create mode 100644 server/user/generated/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java create mode 100644 server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java create mode 100644 server/user/generated/src/main/java/org/openapitools/api/UserApi.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/Group.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/Match.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java create mode 100644 server/user/generated/src/main/java/org/openapitools/model/User.java diff --git a/server/matching/generated/.openapi-generator/FILES b/server/matching/generated/.openapi-generator/FILES index 04110a35..59bd3066 100644 --- a/server/matching/generated/.openapi-generator/FILES +++ b/server/matching/generated/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/ApiUtil.java diff --git a/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java b/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java index 791141b1..76c1d3f2 100644 --- a/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java +++ b/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java @@ -35,7 +35,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "GenAI", description = "Paths belonging to the GenAI microservice") public interface GenAiApi { diff --git a/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java b/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java index 8ff5ef60..ff4ba6a2 100644 --- a/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java +++ b/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java @@ -39,7 +39,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "Matching", description = "Paths belonging to the Matching microservice") public interface MatchingApi { diff --git a/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java b/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java index 02c13e07..0ff9f5fc 100644 --- a/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java +++ b/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java @@ -37,7 +37,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "User", description = "Paths belonging to the User microservice") public interface UserApi { diff --git a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java index 5de2589d..73a17aa5 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java @@ -20,7 +20,7 @@ */ @Schema(name = "ConversationStarter", description = "Object representing a conversation starter in the meet@mensa system") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class ConversationStarter { private @Nullable String prompt; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java index e930a631..0319a3e3 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java @@ -22,7 +22,7 @@ @Schema(name = "ConversationStarter_1", description = "Object representing a conversation starter in the meet@mensa system") @JsonTypeName("ConversationStarter_1") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class ConversationStarter1 { private @Nullable String prompt; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java index 75c9986e..61b46cf9 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java @@ -22,7 +22,7 @@ */ @JsonTypeName("get_api_v2_genai_conversation_starter_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2GenaiConversationStarter200Response { private @Nullable ConversationStarter1 conversationStarters; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java index 9c803eb1..ff0db011 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_genai_conversation_starter_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2GenaiConversationStarterRequest { @Valid diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java index c78e27fe..520247ae 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_matching_matches_userID_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2MatchingMatchesUserID200Response { @Valid diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java index 455120d2..cbe3b5b8 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_matching_requests_userID_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2MatchingRequestsUserID200Response { @Valid diff --git a/server/matching/generated/src/main/java/org/openapitools/model/Group.java b/server/matching/generated/src/main/java/org/openapitools/model/Group.java index 1a551163..ac3a1445 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/Group.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/Group.java @@ -29,7 +29,7 @@ */ @Schema(name = "Group", description = "Object representing a group that has been matched in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class Group { private @Nullable UUID groupID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/Match.java b/server/matching/generated/src/main/java/org/openapitools/model/Match.java index 669ed3ce..449497e6 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/Match.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/Match.java @@ -23,7 +23,7 @@ */ @Schema(name = "Match", description = "Object representing a single match for a given user on a given date in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class Match { private UUID matchID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java index 5b007c29..0d08c306 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences { private @Nullable Boolean degreePref; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java index a352d0dd..2611019c 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences_1", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences_1") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences1 { private @Nullable Boolean degreePref; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java index e34fad24..6ca08e17 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences_2", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences_2") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences2 { private @Nullable Boolean degreePref; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java index 415d5c66..6ec7bbc8 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java @@ -28,7 +28,7 @@ */ @Schema(name = "MatchRequest", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchRequest { private UUID requestID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java index bd9c6424..7b1f5d35 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java @@ -23,7 +23,7 @@ */ @JsonTypeName("matchStatus") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchStatus { private @Nullable UUID userID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java index e458f400..bbce081d 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java @@ -30,7 +30,7 @@ @Schema(name = "post_api_v2_matching_request_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") @JsonTypeName("post_api_v2_matching_request_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PostApiV2MatchingRequestRequest { private UUID userID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java index f29d3e9c..33f1a5a5 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java @@ -27,7 +27,7 @@ @Schema(name = "post_api_v2_user_register_request", description = "Object representing a student user in the Meet@Mensa system.") @JsonTypeName("post_api_v2_user_register_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PostApiV2UserRegisterRequest { private String email; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java index 0eba6959..52a7c5ab 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java @@ -30,7 +30,7 @@ @Schema(name = "put_api_v2_matching_request_request_id_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") @JsonTypeName("put_api_v2_matching_request_request_id_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PutApiV2MatchingRequestRequestIdRequest { private @Nullable UUID userID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java index b19518a5..c25a255a 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java @@ -27,7 +27,7 @@ @Schema(name = "put_api_v2_user_userID_request", description = "Object representing a student user in the Meet@Mensa system.") @JsonTypeName("put_api_v2_user_userID_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PutApiV2UserUserIDRequest { private @Nullable String email; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/User.java b/server/matching/generated/src/main/java/org/openapitools/model/User.java index 9af7322b..d2336ee8 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/User.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/User.java @@ -26,7 +26,7 @@ */ @Schema(name = "User", description = "Object representing a student user in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T12:43:43.325359245+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class User { private UUID userID; diff --git a/server/user/generated/.openapi-generator-ignore b/server/user/generated/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/server/user/generated/.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/server/user/generated/.openapi-generator/FILES b/server/user/generated/.openapi-generator/FILES new file mode 100644 index 00000000..04110a35 --- /dev/null +++ b/server/user/generated/.openapi-generator/FILES @@ -0,0 +1,25 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/GenAiApi.java +src/main/java/org/openapitools/api/MatchingApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/ConversationStarter.java +src/main/java/org/openapitools/model/ConversationStarter1.java +src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java +src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java +src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java +src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java +src/main/java/org/openapitools/model/Group.java +src/main/java/org/openapitools/model/Match.java +src/main/java/org/openapitools/model/MatchPreferences.java +src/main/java/org/openapitools/model/MatchPreferences1.java +src/main/java/org/openapitools/model/MatchPreferences2.java +src/main/java/org/openapitools/model/MatchRequest.java +src/main/java/org/openapitools/model/MatchStatus.java +src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java +src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java +src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java +src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java +src/main/java/org/openapitools/model/User.java diff --git a/server/user/generated/.openapi-generator/VERSION b/server/user/generated/.openapi-generator/VERSION new file mode 100644 index 00000000..e465da43 --- /dev/null +++ b/server/user/generated/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/server/user/generated/README.md b/server/user/generated/README.md new file mode 100644 index 00000000..d43a1de3 --- /dev/null +++ b/server/user/generated/README.md @@ -0,0 +1,27 @@ + +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/server/user/generated/build.gradle b/server/user/generated/build.gradle new file mode 100644 index 00000000..6dffee36 --- /dev/null +++ b/server/user/generated/build.gradle @@ -0,0 +1,53 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'java-library' + id 'maven-publish' +} + +repositories { + mavenLocal() + maven { + url = uri('https://repo.maven.apache.org/maven2/') + } +} + +dependencies { + api libs.org.springframework.boot.spring.boot.starter.web + api libs.org.springframework.data.spring.data.commons + api libs.org.springdoc.springdoc.openapi.ui + api libs.com.google.code.findbugs.jsr305 + api libs.com.fasterxml.jackson.dataformat.jackson.dataformat.yaml + api libs.com.fasterxml.jackson.datatype.jackson.datatype.jsr310 + api libs.org.openapitools.jackson.databind.nullable + api libs.org.springframework.boot.spring.boot.starter.validation + api libs.com.fasterxml.jackson.core.jackson.databind + testImplementation libs.org.springframework.boot.spring.boot.starter.test +} + +group = 'org.openapitools' +version = '1.0.0' +description = 'openapi-spring' +java.sourceCompatibility = JavaVersion.VERSION_1_8 + +java { + withSourcesJar() +} + +publishing { + publications { + maven(MavenPublication) { + from(components.java) + } + } +} + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Javadoc) { + options.encoding = 'UTF-8' +} diff --git a/server/user/generated/gradle.properties b/server/user/generated/gradle.properties new file mode 100644 index 00000000..377538c9 --- /dev/null +++ b/server/user/generated/gradle.properties @@ -0,0 +1,5 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties + +org.gradle.configuration-cache=true + diff --git a/server/user/generated/gradle/libs.versions.toml b/server/user/generated/gradle/libs.versions.toml new file mode 100644 index 00000000..71008423 --- /dev/null +++ b/server/user/generated/gradle/libs.versions.toml @@ -0,0 +1,26 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +com-fasterxml-jackson-core-jackson-databind = "2.13.5" +com-fasterxml-jackson-dataformat-jackson-dataformat-yaml = "2.13.5" +com-fasterxml-jackson-datatype-jackson-datatype-jsr310 = "2.13.5" +com-google-code-findbugs-jsr305 = "3.0.2" +org-openapitools-jackson-databind-nullable = "0.2.6" +org-springdoc-springdoc-openapi-ui = "1.6.14" +org-springframework-boot-spring-boot-starter-test = "2.7.15" +org-springframework-boot-spring-boot-starter-validation = "2.7.15" +org-springframework-boot-spring-boot-starter-web = "2.7.15" +org-springframework-data-spring-data-commons = "2.7.15" + +[libraries] +com-fasterxml-jackson-core-jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "com-fasterxml-jackson-core-jackson-databind" } +com-fasterxml-jackson-dataformat-jackson-dataformat-yaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "com-fasterxml-jackson-dataformat-jackson-dataformat-yaml" } +com-fasterxml-jackson-datatype-jackson-datatype-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "com-fasterxml-jackson-datatype-jackson-datatype-jsr310" } +com-google-code-findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "com-google-code-findbugs-jsr305" } +org-openapitools-jackson-databind-nullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "org-openapitools-jackson-databind-nullable" } +org-springdoc-springdoc-openapi-ui = { module = "org.springdoc:springdoc-openapi-ui", version.ref = "org-springdoc-springdoc-openapi-ui" } +org-springframework-boot-spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "org-springframework-boot-spring-boot-starter-test" } +org-springframework-boot-spring-boot-starter-validation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "org-springframework-boot-spring-boot-starter-validation" } +org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" } +org-springframework-data-spring-data-commons = { module = "org.springframework.data:spring-data-commons", version.ref = "org-springframework-data-spring-data-commons" } diff --git a/server/user/generated/gradle/wrapper/gradle-wrapper.properties b/server/user/generated/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..ff23a68d --- /dev/null +++ b/server/user/generated/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/server/user/generated/gradlew b/server/user/generated/gradlew new file mode 100644 index 00000000..23d15a93 --- /dev/null +++ b/server/user/generated/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original 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. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# 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 ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/server/user/generated/gradlew.bat b/server/user/generated/gradlew.bat new file mode 100644 index 00000000..db3a6ac2 --- /dev/null +++ b/server/user/generated/gradlew.bat @@ -0,0 +1,94 @@ +@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 +@rem SPDX-License-Identifier: Apache-2.0 +@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=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/server/user/generated/pom.xml b/server/user/generated/pom.xml new file mode 100644 index 00000000..ed9595b2 --- /dev/null +++ b/server/user/generated/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + org.openapitools + openapi-spring + jar + openapi-spring + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + UTF-8 + 1.6.14 + 5.3.1 + + + org.springframework.boot + spring-boot-starter-parent + 2.7.15 + + + + src/main/java + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/server/user/generated/settings.gradle b/server/user/generated/settings.gradle new file mode 100644 index 00000000..d635eddd --- /dev/null +++ b/server/user/generated/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'openapi-spring' diff --git a/server/user/generated/src/main/java/org/openapitools/api/ApiUtil.java b/server/user/generated/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 00000000..1245b1dd --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java b/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java new file mode 100644 index 00000000..b3322d46 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java @@ -0,0 +1,97 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.GetApiV2GenaiConversationStarter200Response; +import org.openapitools.model.GetApiV2GenaiConversationStarterRequest; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "GenAI", description = "Paths belonging to the GenAI microservice") +public interface GenAiApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /api/v2/genai/conversation-starter : Request conversation starter + * Request a series of conversation starter prompts from the GenAI microservice. Provide infomation about users on request. + * + * @param getApiV2GenaiConversationStarterRequest Request Conversation starter for these users (optional) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2GenaiConversationStarter", + summary = "Request conversation starter", + description = "Request a series of conversation starter prompts from the GenAI microservice. Provide infomation about users on request.", + tags = { "GenAI" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2GenaiConversationStarter200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/genai/conversation-starter", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity getApiV2GenaiConversationStarter( + @Parameter(name = "GetApiV2GenaiConversationStarterRequest", description = "Request Conversation starter for these users") @Valid @RequestBody(required = false) @Nullable GetApiV2GenaiConversationStarterRequest getApiV2GenaiConversationStarterRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"conversationStarters\" : { \"prompt\" : \"prompt\" } }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java b/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java new file mode 100644 index 00000000..54830ea4 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java @@ -0,0 +1,352 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.GetApiV2MatchingMatchesUserID200Response; +import org.openapitools.model.GetApiV2MatchingRequestsUserID200Response; +import org.openapitools.model.MatchRequest; +import org.openapitools.model.PostApiV2MatchingRequestRequest; +import org.openapitools.model.PutApiV2MatchingRequestRequestIdRequest; +import java.util.UUID; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "Matching", description = "Paths belonging to the Matching microservice") +public interface MatchingApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /api/v2/matching/request/{request-id} : Delete MatchRequest with {request-id} + * Delete MatchRequest with ID {request-id} from the system + * + * @param requestId UUID associated with a given match request (required) + * @return Request Deleted (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "deleteApiV2MatchingMatchesRequestId", + summary = "Delete MatchRequest with {request-id}", + description = "Delete MatchRequest with ID {request-id} from the system", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "Request Deleted"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api/v2/matching/request/{request-id}" + ) + + default ResponseEntity deleteApiV2MatchingMatchesRequestId( + @Parameter(name = "request-id", description = "UUID associated with a given match request", required = true, in = ParameterIn.PATH) @PathVariable("request-id") UUID requestId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/matches/{user-id} : Retrieve all matches for a {user-id} + * Retrieve all matches for a user with {user-id} from the matching-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingMatchesUserID", + summary = "Retrieve all matches for a {user-id}", + description = "Retrieve all matches for a user with {user-id} from the matching-service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2MatchingMatchesUserID200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/matches/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2MatchingMatchesUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"matches\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"matchID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\", \"group\" : { \"date\" : \"2000-01-23\", \"userStatus\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" } ], \"groupID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"location\" : \"GARCHING\", \"conversationStarters\" : { \"prompt\" : \"prompt\" }, \"time\" : 2 } }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"matchID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\", \"group\" : { \"date\" : \"2000-01-23\", \"userStatus\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" } ], \"groupID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"location\" : \"GARCHING\", \"conversationStarters\" : { \"prompt\" : \"prompt\" }, \"time\" : 2 } } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/requests/{user-id} : Retrieve all MatchRequests for a {user-id} + * Retrieve all MatchRequests for a user with {user-id} from the matching-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRequestsUserID", + summary = "Retrieve all MatchRequests for a {user-id}", + description = "Retrieve all MatchRequests for a user with {user-id} from the matching-service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2MatchingRequestsUserID200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/requests/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2MatchingRequestsUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"matches\" : [ { \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" }, { \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/rsvp/{match-id}/accept : Accept invitation to a given match + * Accept invitation to a given match + * + * @param matchId UUID associated with a given match (required) + * @return OK (status code 200) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRsvpMatchIdAccept", + summary = "Accept invitation to a given match", + description = "Accept invitation to a given match", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/rsvp/{match-id}/accept" + ) + + default ResponseEntity getApiV2MatchingRsvpMatchIdAccept( + @Parameter(name = "match-id", description = "UUID associated with a given match", required = true, in = ParameterIn.PATH) @PathVariable("match-id") UUID matchId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/rsvp/{match-id}/reject : Reject invitation to a given match + * Reject invitation to a given match + * + * @param matchId UUID associated with a given match (required) + * @return OK (status code 200) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRsvpMatchIdReject", + summary = "Reject invitation to a given match", + description = "Reject invitation to a given match", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/rsvp/{match-id}/reject" + ) + + default ResponseEntity getApiV2MatchingRsvpMatchIdReject( + @Parameter(name = "match-id", description = "UUID associated with a given match", required = true, in = ParameterIn.PATH) @PathVariable("match-id") UUID matchId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /api/v2/matching/request/submit : Submit matching Request + * Submit a new matching request to the Matching-Service + * + * @param postApiV2MatchingRequestRequest (optional) + * @return Request submitted sucessfully (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + */ + @Operation( + operationId = "postApiV2MatchingRequest", + summary = "Submit matching Request", + description = "Submit a new matching request to the Matching-Service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "Request submitted sucessfully"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api/v2/matching/request/submit", + consumes = { "application/json" } + ) + + default ResponseEntity postApiV2MatchingRequest( + @Parameter(name = "PostApiV2MatchingRequestRequest", description = "") @Valid @RequestBody(required = false) @Nullable PostApiV2MatchingRequestRequest postApiV2MatchingRequestRequest + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api/v2/matching/request/{request-id} : Update MatchRequest with {request-id} + * Update all information in the MatchRequest with ID {request-id} + * + * @param requestId UUID associated with a given match request (required) + * @param putApiV2MatchingRequestRequestIdRequest (optional) + * @return MatchRequest cannot be updated since it has already been fulfilled! (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + * or Not Acceptable (status code 406) + */ + @Operation( + operationId = "putApiV2MatchingRequestRequestId", + summary = "Update MatchRequest with {request-id}", + description = "Update all information in the MatchRequest with ID {request-id}", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "MatchRequest cannot be updated since it has already been fulfilled!", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = MatchRequest.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. "), + @ApiResponse(responseCode = "406", description = "Not Acceptable") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api/v2/matching/request/{request-id}", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity putApiV2MatchingRequestRequestId( + @Parameter(name = "request-id", description = "UUID associated with a given match request", required = true, in = ParameterIn.PATH) @PathVariable("request-id") UUID requestId, + @Parameter(name = "PutApiV2MatchingRequestRequestIdRequest", description = "") @Valid @RequestBody(required = false) @Nullable PutApiV2MatchingRequestRequestIdRequest putApiV2MatchingRequestRequestIdRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/user/generated/src/main/java/org/openapitools/api/UserApi.java b/server/user/generated/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 00000000..63034df4 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,231 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.PostApiV2UserRegisterRequest; +import org.openapitools.model.PutApiV2UserUserIDRequest; +import java.util.UUID; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "User", description = "Paths belonging to the User microservice") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /api/v2/user/{user-id} : Delete User with {user-id} + * Remove all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @return User deleted (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or The request was malformed or contained invalid parameters. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "deleteApiV2UserUserID", + summary = "Delete User with {user-id}", + description = "Remove all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "User deleted"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api/v2/user/{user-id}" + ) + + default ResponseEntity deleteApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/user/{user-id} : Retrieve User with {user-id} + * Fetch all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2UserUserID", + summary = "Retrieve User with {user-id}", + description = "Fetch all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/user/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"birthday\" : \"2000-01-23\", \"firstname\" : \"Max\", \"degreeStart\" : 2024, \"gender\" : \"other\", \"degree\" : \"msc_informatics\", \"bio\" : \"bio\", \"interests\" : [ \"interests\", \"interests\" ], \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"email\" : \"email\", \"lastname\" : \"Mustermann\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /api/v2/user/register : Register new User + * Register a new user and respond with it's {user-id} + * + * @param postApiV2UserRegisterRequest (optional) + * @return Successfully created user (status code 201) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or Conflict (status code 409) + */ + @Operation( + operationId = "postApiV2UserRegister", + summary = "Register new User", + description = "Register a new user and respond with it's {user-id}", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "201", description = "Successfully created user", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = UUID.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "409", description = "Conflict") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api/v2/user/register", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity postApiV2UserRegister( + @Parameter(name = "PostApiV2UserRegisterRequest", description = "") @Valid @RequestBody(required = false) @Nullable PostApiV2UserRegisterRequest postApiV2UserRegisterRequest + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api/v2/user/{user-id} : Update User with {user-id} + * Update all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @param putApiV2UserUserIDRequest (optional) + * @return User updated successfully (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "putApiV2UserUserID", + summary = "Update User with {user-id}", + description = "Update all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "User updated successfully", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api/v2/user/{user-id}", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity putApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId, + @Parameter(name = "PutApiV2UserUserIDRequest", description = "") @Valid @RequestBody(required = false) @Nullable PutApiV2UserUserIDRequest putApiV2UserUserIDRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"birthday\" : \"2000-01-23\", \"firstname\" : \"Max\", \"degreeStart\" : 2024, \"gender\" : \"other\", \"degree\" : \"msc_informatics\", \"bio\" : \"bio\", \"interests\" : [ \"interests\", \"interests\" ], \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"email\" : \"email\", \"lastname\" : \"Mustermann\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java new file mode 100644 index 00000000..030d61a0 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a conversation starter in the meet@mensa system + */ + +@Schema(name = "ConversationStarter", description = "Object representing a conversation starter in the meet@mensa system") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class ConversationStarter { + + private @Nullable String prompt; + + public ConversationStarter prompt(@Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + + @Schema(name = "prompt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("prompt") + public @Nullable String getPrompt() { + return prompt; + } + + public void setPrompt(@Nullable String prompt) { + this.prompt = prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationStarter conversationStarter = (ConversationStarter) o; + return Objects.equals(this.prompt, conversationStarter.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationStarter {\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).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/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java new file mode 100644 index 00000000..3b4692cb --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a conversation starter in the meet@mensa system + */ + +@Schema(name = "ConversationStarter_1", description = "Object representing a conversation starter in the meet@mensa system") +@JsonTypeName("ConversationStarter_1") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class ConversationStarter1 { + + private @Nullable String prompt; + + public ConversationStarter1 prompt(@Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + + @Schema(name = "prompt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("prompt") + public @Nullable String getPrompt() { + return prompt; + } + + public void setPrompt(@Nullable String prompt) { + this.prompt = prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationStarter1 conversationStarter1 = (ConversationStarter1) o; + return Objects.equals(this.prompt, conversationStarter1.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationStarter1 {\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).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/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java new file mode 100644 index 00000000..2038a322 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.ConversationStarter1; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2GenaiConversationStarter200Response + */ + +@JsonTypeName("get_api_v2_genai_conversation_starter_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2GenaiConversationStarter200Response { + + private @Nullable ConversationStarter1 conversationStarters; + + public GetApiV2GenaiConversationStarter200Response conversationStarters(@Nullable ConversationStarter1 conversationStarters) { + this.conversationStarters = conversationStarters; + return this; + } + + /** + * Get conversationStarters + * @return conversationStarters + */ + @Valid + @Schema(name = "conversationStarters", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("conversationStarters") + public @Nullable ConversationStarter1 getConversationStarters() { + return conversationStarters; + } + + public void setConversationStarters(@Nullable ConversationStarter1 conversationStarters) { + this.conversationStarters = conversationStarters; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2GenaiConversationStarter200Response getApiV2GenaiConversationStarter200Response = (GetApiV2GenaiConversationStarter200Response) o; + return Objects.equals(this.conversationStarters, getApiV2GenaiConversationStarter200Response.conversationStarters); + } + + @Override + public int hashCode() { + return Objects.hash(conversationStarters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2GenaiConversationStarter200Response {\n"); + sb.append(" conversationStarters: ").append(toIndentedString(conversationStarters)).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/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java new file mode 100644 index 00000000..f5584f93 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.User; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2GenaiConversationStarterRequest + */ + +@JsonTypeName("get_api_v2_genai_conversation_starter_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2GenaiConversationStarterRequest { + + @Valid + private List<@Valid User> users = new ArrayList<>(); + + public GetApiV2GenaiConversationStarterRequest users(List<@Valid User> users) { + this.users = users; + return this; + } + + public GetApiV2GenaiConversationStarterRequest addUsersItem(User usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Get users + * @return users + */ + @Valid + @Schema(name = "users", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("users") + public List<@Valid User> getUsers() { + return users; + } + + public void setUsers(List<@Valid User> users) { + this.users = users; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2GenaiConversationStarterRequest getApiV2GenaiConversationStarterRequest = (GetApiV2GenaiConversationStarterRequest) o; + return Objects.equals(this.users, getApiV2GenaiConversationStarterRequest.users); + } + + @Override + public int hashCode() { + return Objects.hash(users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2GenaiConversationStarterRequest {\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/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java new file mode 100644 index 00000000..f33039d8 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.Match; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2MatchingMatchesUserID200Response + */ + +@JsonTypeName("get_api_v2_matching_matches_userID_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2MatchingMatchesUserID200Response { + + @Valid + private List<@Valid Match> matches = new ArrayList<>(); + + public GetApiV2MatchingMatchesUserID200Response matches(List<@Valid Match> matches) { + this.matches = matches; + return this; + } + + public GetApiV2MatchingMatchesUserID200Response addMatchesItem(Match matchesItem) { + if (this.matches == null) { + this.matches = new ArrayList<>(); + } + this.matches.add(matchesItem); + return this; + } + + /** + * Get matches + * @return matches + */ + @Valid + @Schema(name = "matches", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("matches") + public List<@Valid Match> getMatches() { + return matches; + } + + public void setMatches(List<@Valid Match> matches) { + this.matches = matches; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2MatchingMatchesUserID200Response getApiV2MatchingMatchesUserID200Response = (GetApiV2MatchingMatchesUserID200Response) o; + return Objects.equals(this.matches, getApiV2MatchingMatchesUserID200Response.matches); + } + + @Override + public int hashCode() { + return Objects.hash(matches); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2MatchingMatchesUserID200Response {\n"); + sb.append(" matches: ").append(toIndentedString(matches)).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/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java new file mode 100644 index 00000000..d2d93c21 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.MatchRequest; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2MatchingRequestsUserID200Response + */ + +@JsonTypeName("get_api_v2_matching_requests_userID_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2MatchingRequestsUserID200Response { + + @Valid + private List<@Valid MatchRequest> matches = new ArrayList<>(); + + public GetApiV2MatchingRequestsUserID200Response matches(List<@Valid MatchRequest> matches) { + this.matches = matches; + return this; + } + + public GetApiV2MatchingRequestsUserID200Response addMatchesItem(MatchRequest matchesItem) { + if (this.matches == null) { + this.matches = new ArrayList<>(); + } + this.matches.add(matchesItem); + return this; + } + + /** + * Get matches + * @return matches + */ + @Valid + @Schema(name = "matches", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("matches") + public List<@Valid MatchRequest> getMatches() { + return matches; + } + + public void setMatches(List<@Valid MatchRequest> matches) { + this.matches = matches; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2MatchingRequestsUserID200Response getApiV2MatchingRequestsUserID200Response = (GetApiV2MatchingRequestsUserID200Response) o; + return Objects.equals(this.matches, getApiV2MatchingRequestsUserID200Response.matches); + } + + @Override + public int hashCode() { + return Objects.hash(matches); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2MatchingRequestsUserID200Response {\n"); + sb.append(" matches: ").append(toIndentedString(matches)).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/server/user/generated/src/main/java/org/openapitools/model/Group.java b/server/user/generated/src/main/java/org/openapitools/model/Group.java new file mode 100644 index 00000000..58e3ed91 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/Group.java @@ -0,0 +1,261 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.ConversationStarter; +import org.openapitools.model.MatchStatus; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a group that has been matched in the Meet@Mensa system. + */ + +@Schema(name = "Group", description = "Object representing a group that has been matched in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class Group { + + private @Nullable UUID groupID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate date; + + private @Nullable Integer time; + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable LocationEnum location; + + @Valid + private List<@Valid MatchStatus> userStatus = new ArrayList<>(); + + private @Nullable ConversationStarter conversationStarters; + + public Group groupID(@Nullable UUID groupID) { + this.groupID = groupID; + return this; + } + + /** + * The unique ID of a Group in the Meet@Mensa system. + * @return groupID + */ + @Valid + @Schema(name = "groupID", description = "The unique ID of a Group in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("groupID") + public @Nullable UUID getGroupID() { + return groupID; + } + + public void setGroupID(@Nullable UUID groupID) { + this.groupID = groupID; + } + + public Group date(@Nullable LocalDate date) { + this.date = date; + return this; + } + + /** + * Date the group is scheduled to meet at + * @return date + */ + @Valid + @Schema(name = "date", description = "Date the group is scheduled to meet at", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public @Nullable LocalDate getDate() { + return date; + } + + public void setDate(@Nullable LocalDate date) { + this.date = date; + } + + public Group time(@Nullable Integer time) { + this.time = time; + return this; + } + + /** + * Timeslot the group is scheduled to meet at + * minimum: 1 + * maximum: 16 + * @return time + */ + @Min(1) @Max(16) + @Schema(name = "time", description = "Timeslot the group is scheduled to meet at", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("time") + public @Nullable Integer getTime() { + return time; + } + + public void setTime(@Nullable Integer time) { + this.time = time; + } + + public Group location(@Nullable LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("location") + public @Nullable LocationEnum getLocation() { + return location; + } + + public void setLocation(@Nullable LocationEnum location) { + this.location = location; + } + + public Group userStatus(List<@Valid MatchStatus> userStatus) { + this.userStatus = userStatus; + return this; + } + + public Group addUserStatusItem(MatchStatus userStatusItem) { + if (this.userStatus == null) { + this.userStatus = new ArrayList<>(); + } + this.userStatus.add(userStatusItem); + return this; + } + + /** + * Get userStatus + * @return userStatus + */ + @Valid @Size(min = 2) + @Schema(name = "userStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userStatus") + public List<@Valid MatchStatus> getUserStatus() { + return userStatus; + } + + public void setUserStatus(List<@Valid MatchStatus> userStatus) { + this.userStatus = userStatus; + } + + public Group conversationStarters(@Nullable ConversationStarter conversationStarters) { + this.conversationStarters = conversationStarters; + return this; + } + + /** + * Get conversationStarters + * @return conversationStarters + */ + @Valid + @Schema(name = "conversationStarters", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("conversationStarters") + public @Nullable ConversationStarter getConversationStarters() { + return conversationStarters; + } + + public void setConversationStarters(@Nullable ConversationStarter conversationStarters) { + this.conversationStarters = conversationStarters; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Group group = (Group) o; + return Objects.equals(this.groupID, group.groupID) && + Objects.equals(this.date, group.date) && + Objects.equals(this.time, group.time) && + Objects.equals(this.location, group.location) && + Objects.equals(this.userStatus, group.userStatus) && + Objects.equals(this.conversationStarters, group.conversationStarters); + } + + @Override + public int hashCode() { + return Objects.hash(groupID, date, time, location, userStatus, conversationStarters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Group {\n"); + sb.append(" groupID: ").append(toIndentedString(groupID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append(" conversationStarters: ").append(toIndentedString(conversationStarters)).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/server/user/generated/src/main/java/org/openapitools/model/Match.java b/server/user/generated/src/main/java/org/openapitools/model/Match.java new file mode 100644 index 00000000..ec0fdc55 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/Match.java @@ -0,0 +1,215 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.UUID; +import org.openapitools.model.Group; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a single match for a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "Match", description = "Object representing a single match for a given user on a given date in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class Match { + + private UUID matchID; + + private UUID userID; + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + */ + public enum StatusEnum { + UNSENT("UNSENT"), + + SENT("SENT"), + + CONFIRMED("CONFIRMED"), + + REJECTED("REJECTED"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + private Group group; + + public Match() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Match(UUID matchID, UUID userID, StatusEnum status, Group group) { + this.matchID = matchID; + this.userID = userID; + this.status = status; + this.group = group; + } + + public Match matchID(UUID matchID) { + this.matchID = matchID; + return this; + } + + /** + * The unique ID of a Group in the Meet@Mensa system. + * @return matchID + */ + @NotNull @Valid + @Schema(name = "matchID", description = "The unique ID of a Group in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("matchID") + public UUID getMatchID() { + return matchID; + } + + public void setMatchID(UUID matchID) { + this.matchID = matchID; + } + + public Match userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public Match status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + * @return status + */ + @NotNull + @Schema(name = "status", description = "Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past |", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Match group(Group group) { + this.group = group; + return this; + } + + /** + * Get group + * @return group + */ + @NotNull @Valid + @Schema(name = "group", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("group") + public Group getGroup() { + return group; + } + + public void setGroup(Group group) { + this.group = group; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Match match = (Match) o; + return Objects.equals(this.matchID, match.matchID) && + Objects.equals(this.userID, match.userID) && + Objects.equals(this.status, match.status) && + Objects.equals(this.group, match.group); + } + + @Override + public int hashCode() { + return Objects.hash(matchID, userID, status, group); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Match {\n"); + sb.append(" matchID: ").append(toIndentedString(matchID)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).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/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java new file mode 100644 index 00000000..bd077702 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences matchPreferences = (MatchPreferences) o; + return Objects.equals(this.degreePref, matchPreferences.degreePref) && + Objects.equals(this.agePref, matchPreferences.agePref) && + Objects.equals(this.genderPref, matchPreferences.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java new file mode 100644 index 00000000..fc510114 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences_1", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences_1") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences1 { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences1 degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences1 agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences1 genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences1 matchPreferences1 = (MatchPreferences1) o; + return Objects.equals(this.degreePref, matchPreferences1.degreePref) && + Objects.equals(this.agePref, matchPreferences1.agePref) && + Objects.equals(this.genderPref, matchPreferences1.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences1 {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java new file mode 100644 index 00000000..cb547f01 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences_2", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences_2") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences2 { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences2 degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences2 agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences2 genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences2 matchPreferences2 = (MatchPreferences2) o; + return Objects.equals(this.degreePref, matchPreferences2.degreePref) && + Objects.equals(this.agePref, matchPreferences2.agePref) && + Objects.equals(this.genderPref, matchPreferences2.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences2 {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java b/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java new file mode 100644 index 00000000..28a6a55d --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java @@ -0,0 +1,340 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences1; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "MatchRequest", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchRequest { + + private UUID requestID; + + private UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private LocationEnum location; + + private MatchPreferences1 preferences; + + /** + * Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | + */ + public enum StatusEnum { + PENDING("PENDING"), + + MATCHED("MATCHED"), + + UNMATCHABLE("UNMATCHABLE"), + + REMATCH("REMATCH"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + public MatchRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MatchRequest(UUID requestID, UUID userID, LocalDate date, List<@Min(1) @Max(16)Integer> timeslot, LocationEnum location, MatchPreferences1 preferences, StatusEnum status) { + this.requestID = requestID; + this.userID = userID; + this.date = date; + this.timeslot = timeslot; + this.location = location; + this.preferences = preferences; + this.status = status; + } + + public MatchRequest requestID(UUID requestID) { + this.requestID = requestID; + return this; + } + + /** + * The unique ID of a MatchRequest in the Meet@Mensa system. + * @return requestID + */ + @NotNull @Valid + @Schema(name = "requestID", description = "The unique ID of a MatchRequest in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("requestID") + public UUID getRequestID() { + return requestID; + } + + public void setRequestID(UUID requestID) { + this.requestID = requestID; + } + + public MatchRequest userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public MatchRequest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @NotNull @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public MatchRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public MatchRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + @NotNull + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public MatchRequest location(LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + @NotNull + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("location") + public LocationEnum getLocation() { + return location; + } + + public void setLocation(LocationEnum location) { + this.location = location; + } + + public MatchRequest preferences(MatchPreferences1 preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @NotNull @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("preferences") + public MatchPreferences1 getPreferences() { + return preferences; + } + + public void setPreferences(MatchPreferences1 preferences) { + this.preferences = preferences; + } + + public MatchRequest status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | + * @return status + */ + @NotNull + @Schema(name = "status", description = "Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchRequest matchRequest = (MatchRequest) o; + return Objects.equals(this.requestID, matchRequest.requestID) && + Objects.equals(this.userID, matchRequest.userID) && + Objects.equals(this.date, matchRequest.date) && + Objects.equals(this.timeslot, matchRequest.timeslot) && + Objects.equals(this.location, matchRequest.location) && + Objects.equals(this.preferences, matchRequest.preferences) && + Objects.equals(this.status, matchRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(requestID, userID, date, timeslot, location, preferences, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchRequest {\n"); + sb.append(" requestID: ").append(toIndentedString(requestID)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java b/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java new file mode 100644 index 00000000..eb580924 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java @@ -0,0 +1,153 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.UUID; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * MatchStatus + */ + +@JsonTypeName("matchStatus") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchStatus { + + private @Nullable UUID userID; + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + */ + public enum StatusEnum { + UNSENT("UNSENT"), + + SENT("SENT"), + + CONFIRMED("CONFIRMED"), + + REJECTED("REJECTED"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable StatusEnum status; + + public MatchStatus userID(@Nullable UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userID") + public @Nullable UUID getUserID() { + return userID; + } + + public void setUserID(@Nullable UUID userID) { + this.userID = userID; + } + + public MatchStatus status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + * @return status + */ + + @Schema(name = "status", description = "Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past |", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchStatus matchStatus = (MatchStatus) o; + return Objects.equals(this.userID, matchStatus.userID) && + Objects.equals(this.status, matchStatus.status); + } + + @Override + public int hashCode() { + return Objects.hash(userID, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchStatus {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java new file mode 100644 index 00000000..8ad9ccad --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java @@ -0,0 +1,251 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "post_api_v2_matching_request_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@JsonTypeName("post_api_v2_matching_request_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PostApiV2MatchingRequestRequest { + + private UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private LocationEnum location; + + private MatchPreferences preferences; + + public PostApiV2MatchingRequestRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PostApiV2MatchingRequestRequest(UUID userID, LocalDate date, List<@Min(1) @Max(16)Integer> timeslot, LocationEnum location, MatchPreferences preferences) { + this.userID = userID; + this.date = date; + this.timeslot = timeslot; + this.location = location; + this.preferences = preferences; + } + + public PostApiV2MatchingRequestRequest userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public PostApiV2MatchingRequestRequest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @NotNull @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public PostApiV2MatchingRequestRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public PostApiV2MatchingRequestRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + @NotNull + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public PostApiV2MatchingRequestRequest location(LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + @NotNull + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("location") + public LocationEnum getLocation() { + return location; + } + + public void setLocation(LocationEnum location) { + this.location = location; + } + + public PostApiV2MatchingRequestRequest preferences(MatchPreferences preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @NotNull @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("preferences") + public MatchPreferences getPreferences() { + return preferences; + } + + public void setPreferences(MatchPreferences preferences) { + this.preferences = preferences; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostApiV2MatchingRequestRequest postApiV2MatchingRequestRequest = (PostApiV2MatchingRequestRequest) o; + return Objects.equals(this.userID, postApiV2MatchingRequestRequest.userID) && + Objects.equals(this.date, postApiV2MatchingRequestRequest.date) && + Objects.equals(this.timeslot, postApiV2MatchingRequestRequest.timeslot) && + Objects.equals(this.location, postApiV2MatchingRequestRequest.location) && + Objects.equals(this.preferences, postApiV2MatchingRequestRequest.preferences); + } + + @Override + public int hashCode() { + return Objects.hash(userID, date, timeslot, location, preferences); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostApiV2MatchingRequestRequest {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).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/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java new file mode 100644 index 00000000..66d701b3 --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java @@ -0,0 +1,315 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "post_api_v2_user_register_request", description = "Object representing a student user in the Meet@Mensa system.") +@JsonTypeName("post_api_v2_user_register_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PostApiV2UserRegisterRequest { + + private String email; + + private String firstname; + + private String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate birthday; + + private String gender = "other"; + + private String degree; + + private Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private String bio; + + public PostApiV2UserRegisterRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PostApiV2UserRegisterRequest(String email, String firstname, String lastname, LocalDate birthday, String gender, String degree, Integer degreeStart, List interests, String bio) { + this.email = email; + this.firstname = firstname; + this.lastname = lastname; + this.birthday = birthday; + this.gender = gender; + this.degree = degree; + this.degreeStart = degreeStart; + this.interests = interests; + this.bio = bio; + } + + public PostApiV2UserRegisterRequest email(String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @NotNull @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public PostApiV2UserRegisterRequest firstname(String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + @NotNull + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("firstname") + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public PostApiV2UserRegisterRequest lastname(String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + @NotNull + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("lastname") + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public PostApiV2UserRegisterRequest birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @NotNull @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("birthday") + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public PostApiV2UserRegisterRequest gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + @NotNull + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public PostApiV2UserRegisterRequest degree(String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + @NotNull + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degree") + public String getDegree() { + return degree; + } + + public void setDegree(String degree) { + this.degree = degree; + } + + public PostApiV2UserRegisterRequest degreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @NotNull @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degreeStart") + public Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public PostApiV2UserRegisterRequest interests(List interests) { + this.interests = interests; + return this; + } + + public PostApiV2UserRegisterRequest addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + @NotNull + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public PostApiV2UserRegisterRequest bio(String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + @NotNull + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("bio") + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostApiV2UserRegisterRequest postApiV2UserRegisterRequest = (PostApiV2UserRegisterRequest) o; + return Objects.equals(this.email, postApiV2UserRegisterRequest.email) && + Objects.equals(this.firstname, postApiV2UserRegisterRequest.firstname) && + Objects.equals(this.lastname, postApiV2UserRegisterRequest.lastname) && + Objects.equals(this.birthday, postApiV2UserRegisterRequest.birthday) && + Objects.equals(this.gender, postApiV2UserRegisterRequest.gender) && + Objects.equals(this.degree, postApiV2UserRegisterRequest.degree) && + Objects.equals(this.degreeStart, postApiV2UserRegisterRequest.degreeStart) && + Objects.equals(this.interests, postApiV2UserRegisterRequest.interests) && + Objects.equals(this.bio, postApiV2UserRegisterRequest.bio); + } + + @Override + public int hashCode() { + return Objects.hash(email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostApiV2UserRegisterRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java new file mode 100644 index 00000000..6e58dcaf --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java @@ -0,0 +1,236 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences2; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "put_api_v2_matching_request_request_id_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@JsonTypeName("put_api_v2_matching_request_request_id_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PutApiV2MatchingRequestRequestIdRequest { + + private @Nullable UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable LocationEnum location; + + private @Nullable MatchPreferences2 preferences; + + public PutApiV2MatchingRequestRequestIdRequest userID(@Nullable UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userID") + public @Nullable UUID getUserID() { + return userID; + } + + public void setUserID(@Nullable UUID userID) { + this.userID = userID; + } + + public PutApiV2MatchingRequestRequestIdRequest date(@Nullable LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public @Nullable LocalDate getDate() { + return date; + } + + public void setDate(@Nullable LocalDate date) { + this.date = date; + } + + public PutApiV2MatchingRequestRequestIdRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public PutApiV2MatchingRequestRequestIdRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public PutApiV2MatchingRequestRequestIdRequest location(@Nullable LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("location") + public @Nullable LocationEnum getLocation() { + return location; + } + + public void setLocation(@Nullable LocationEnum location) { + this.location = location; + } + + public PutApiV2MatchingRequestRequestIdRequest preferences(@Nullable MatchPreferences2 preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("preferences") + public @Nullable MatchPreferences2 getPreferences() { + return preferences; + } + + public void setPreferences(@Nullable MatchPreferences2 preferences) { + this.preferences = preferences; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutApiV2MatchingRequestRequestIdRequest putApiV2MatchingRequestRequestIdRequest = (PutApiV2MatchingRequestRequestIdRequest) o; + return Objects.equals(this.userID, putApiV2MatchingRequestRequestIdRequest.userID) && + Objects.equals(this.date, putApiV2MatchingRequestRequestIdRequest.date) && + Objects.equals(this.timeslot, putApiV2MatchingRequestRequestIdRequest.timeslot) && + Objects.equals(this.location, putApiV2MatchingRequestRequestIdRequest.location) && + Objects.equals(this.preferences, putApiV2MatchingRequestRequestIdRequest.preferences); + } + + @Override + public int hashCode() { + return Objects.hash(userID, date, timeslot, location, preferences); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutApiV2MatchingRequestRequestIdRequest {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).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/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java new file mode 100644 index 00000000..bcd820bd --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java @@ -0,0 +1,296 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "put_api_v2_user_userID_request", description = "Object representing a student user in the Meet@Mensa system.") +@JsonTypeName("put_api_v2_user_userID_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PutApiV2UserUserIDRequest { + + private @Nullable String email; + + private @Nullable String firstname; + + private @Nullable String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate birthday; + + private String gender = "other"; + + private @Nullable String degree; + + private @Nullable Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private @Nullable String bio; + + public PutApiV2UserUserIDRequest email(@Nullable String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("email") + public @Nullable String getEmail() { + return email; + } + + public void setEmail(@Nullable String email) { + this.email = email; + } + + public PutApiV2UserUserIDRequest firstname(@Nullable String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("firstname") + public @Nullable String getFirstname() { + return firstname; + } + + public void setFirstname(@Nullable String firstname) { + this.firstname = firstname; + } + + public PutApiV2UserUserIDRequest lastname(@Nullable String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastname") + public @Nullable String getLastname() { + return lastname; + } + + public void setLastname(@Nullable String lastname) { + this.lastname = lastname; + } + + public PutApiV2UserUserIDRequest birthday(@Nullable LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("birthday") + public @Nullable LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(@Nullable LocalDate birthday) { + this.birthday = birthday; + } + + public PutApiV2UserUserIDRequest gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public PutApiV2UserUserIDRequest degree(@Nullable String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degree") + public @Nullable String getDegree() { + return degree; + } + + public void setDegree(@Nullable String degree) { + this.degree = degree; + } + + public PutApiV2UserUserIDRequest degreeStart(@Nullable Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreeStart") + public @Nullable Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(@Nullable Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public PutApiV2UserUserIDRequest interests(List interests) { + this.interests = interests; + return this; + } + + public PutApiV2UserUserIDRequest addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public PutApiV2UserUserIDRequest bio(@Nullable String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("bio") + public @Nullable String getBio() { + return bio; + } + + public void setBio(@Nullable String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutApiV2UserUserIDRequest putApiV2UserUserIDRequest = (PutApiV2UserUserIDRequest) o; + return Objects.equals(this.email, putApiV2UserUserIDRequest.email) && + Objects.equals(this.firstname, putApiV2UserUserIDRequest.firstname) && + Objects.equals(this.lastname, putApiV2UserUserIDRequest.lastname) && + Objects.equals(this.birthday, putApiV2UserUserIDRequest.birthday) && + Objects.equals(this.gender, putApiV2UserUserIDRequest.gender) && + Objects.equals(this.degree, putApiV2UserUserIDRequest.degree) && + Objects.equals(this.degreeStart, putApiV2UserUserIDRequest.degreeStart) && + Objects.equals(this.interests, putApiV2UserUserIDRequest.interests) && + Objects.equals(this.bio, putApiV2UserUserIDRequest.bio); + } + + @Override + public int hashCode() { + return Objects.hash(email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutApiV2UserUserIDRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/user/generated/src/main/java/org/openapitools/model/User.java b/server/user/generated/src/main/java/org/openapitools/model/User.java new file mode 100644 index 00000000..99f7184c --- /dev/null +++ b/server/user/generated/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,339 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "User", description = "Object representing a student user in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class User { + + private UUID userID; + + private String email; + + private String firstname; + + private String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate birthday; + + private String gender = "other"; + + private String degree; + + private Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private String bio; + + public User() { + super(); + } + + /** + * Constructor with only required parameters + */ + public User(UUID userID, String email, String firstname, String lastname, LocalDate birthday, String gender, String degree, Integer degreeStart, List interests, String bio) { + this.userID = userID; + this.email = email; + this.firstname = firstname; + this.lastname = lastname; + this.birthday = birthday; + this.gender = gender; + this.degree = degree; + this.degreeStart = degreeStart; + this.interests = interests; + this.bio = bio; + } + + public User userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @NotNull @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User firstname(String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + @NotNull + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("firstname") + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public User lastname(String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + @NotNull + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("lastname") + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public User birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @NotNull @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("birthday") + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public User gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + @NotNull + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public User degree(String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + @NotNull + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degree") + public String getDegree() { + return degree; + } + + public void setDegree(String degree) { + this.degree = degree; + } + + public User degreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @NotNull @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degreeStart") + public Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public User interests(List interests) { + this.interests = interests; + return this; + } + + public User addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + @NotNull + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public User bio(String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + @NotNull + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("bio") + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.userID, user.userID) && + Objects.equals(this.email, user.email) && + Objects.equals(this.firstname, user.firstname) && + Objects.equals(this.lastname, user.lastname) && + Objects.equals(this.birthday, user.birthday) && + Objects.equals(this.gender, user.gender) && + Objects.equals(this.degree, user.degree) && + Objects.equals(this.degreeStart, user.degreeStart) && + Objects.equals(this.interests, user.interests) && + Objects.equals(this.bio, user.bio); + } + + @Override + public int hashCode() { + return Objects.hash(userID, email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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 "); + } +} + From 4372e98d751525d622153d68fd53c5f0e9ded126 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:33:06 +0200 Subject: [PATCH 14/20] feat: added dependency support for user-microservice --- server/user/Dockerfile | 5 +++++ server/user/build.gradle | 1 + server/user/settings.gradle | 1 + 3 files changed, 7 insertions(+) diff --git a/server/user/Dockerfile b/server/user/Dockerfile index 151fe28c..dc27e616 100644 --- a/server/user/Dockerfile +++ b/server/user/Dockerfile @@ -6,6 +6,11 @@ WORKDIR /app COPY build.gradle settings.gradle ./ COPY src ./src +# Copy only necessary files for generated dependencies +COPY generated/build.gradle generated/settings.gradle ./generated/ +COPY generated/src ./generated/src +COPY generated/gradle/libs.versions.toml ./generated/gradle/ + # Build the application RUN gradle clean bootJar --no-daemon diff --git a/server/user/build.gradle b/server/user/build.gradle index 895ff883..4bf86e06 100644 --- a/server/user/build.gradle +++ b/server/user/build.gradle @@ -18,6 +18,7 @@ repositories { } dependencies { + implementation 'org.openapitools:openapi-spring' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/server/user/settings.gradle b/server/user/settings.gradle index 9d37ea2c..d5b867eb 100644 --- a/server/user/settings.gradle +++ b/server/user/settings.gradle @@ -1 +1,2 @@ rootProject.name = 'user' +includeBuild('generated') \ No newline at end of file From fc06a993a5b580028284b09b7d56a00a87f94fab Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:50:55 +0200 Subject: [PATCH 15/20] feat: updated gen script to include gateway microservice --- api/scripts/gen_code.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh index 2894e8e8..c81c582a 100644 --- a/api/scripts/gen_code.sh +++ b/api/scripts/gen_code.sh @@ -3,7 +3,7 @@ # fail command if any part fails set -euo pipefail -for path in matching user; do +for path in matching user gateway; do # echo generating code echo "Generating code for $path..." From 175f216e71e4f0280051c4f4c8ce43d5caaf8f10 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:51:28 +0200 Subject: [PATCH 16/20] gen: check in generated code and build files for gateway service --- .../generated/.openapi-generator-ignore | 23 ++ .../generated/.openapi-generator/FILES | 25 ++ .../generated/.openapi-generator/VERSION | 1 + server/gateway/generated/README.md | 27 ++ server/gateway/generated/build.gradle | 53 +++ server/gateway/generated/gradle.properties | 5 + .../generated/gradle/libs.versions.toml | 26 ++ .../gradle/wrapper/gradle-wrapper.properties | 7 + server/gateway/generated/gradlew | 251 +++++++++++++ server/gateway/generated/gradlew.bat | 94 +++++ server/gateway/generated/pom.xml | 88 +++++ server/gateway/generated/settings.gradle | 5 + .../java/org/openapitools/api/ApiUtil.java | 19 + .../java/org/openapitools/api/GenAiApi.java | 97 +++++ .../org/openapitools/api/MatchingApi.java | 352 ++++++++++++++++++ .../java/org/openapitools/api/UserApi.java | 231 ++++++++++++ .../model/ConversationStarter.java | 85 +++++ .../model/ConversationStarter1.java | 87 +++++ ...V2GenaiConversationStarter200Response.java | 87 +++++ ...tApiV2GenaiConversationStarterRequest.java | 99 +++++ ...ApiV2MatchingMatchesUserID200Response.java | 99 +++++ ...piV2MatchingRequestsUserID200Response.java | 99 +++++ .../java/org/openapitools/model/Group.java | 261 +++++++++++++ .../java/org/openapitools/model/Match.java | 215 +++++++++++ .../openapitools/model/MatchPreferences.java | 135 +++++++ .../openapitools/model/MatchPreferences1.java | 135 +++++++ .../openapitools/model/MatchPreferences2.java | 135 +++++++ .../org/openapitools/model/MatchRequest.java | 340 +++++++++++++++++ .../org/openapitools/model/MatchStatus.java | 153 ++++++++ .../PostApiV2MatchingRequestRequest.java | 251 +++++++++++++ .../model/PostApiV2UserRegisterRequest.java | 315 ++++++++++++++++ ...tApiV2MatchingRequestRequestIdRequest.java | 236 ++++++++++++ .../model/PutApiV2UserUserIDRequest.java | 296 +++++++++++++++ .../java/org/openapitools/model/User.java | 339 +++++++++++++++++ .../java/org/openapitools/api/GenAiApi.java | 2 +- .../org/openapitools/api/MatchingApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../model/ConversationStarter.java | 2 +- .../model/ConversationStarter1.java | 2 +- ...V2GenaiConversationStarter200Response.java | 2 +- ...tApiV2GenaiConversationStarterRequest.java | 2 +- ...ApiV2MatchingMatchesUserID200Response.java | 2 +- ...piV2MatchingRequestsUserID200Response.java | 2 +- .../java/org/openapitools/model/Group.java | 2 +- .../java/org/openapitools/model/Match.java | 2 +- .../openapitools/model/MatchPreferences.java | 2 +- .../openapitools/model/MatchPreferences1.java | 2 +- .../openapitools/model/MatchPreferences2.java | 2 +- .../org/openapitools/model/MatchRequest.java | 2 +- .../org/openapitools/model/MatchStatus.java | 2 +- .../PostApiV2MatchingRequestRequest.java | 2 +- .../model/PostApiV2UserRegisterRequest.java | 2 +- ...tApiV2MatchingRequestRequestIdRequest.java | 2 +- .../model/PutApiV2UserUserIDRequest.java | 2 +- .../java/org/openapitools/model/User.java | 2 +- .../user/generated/.openapi-generator/FILES | 1 - .../java/org/openapitools/api/GenAiApi.java | 2 +- .../org/openapitools/api/MatchingApi.java | 2 +- .../java/org/openapitools/api/UserApi.java | 2 +- .../model/ConversationStarter.java | 2 +- .../model/ConversationStarter1.java | 2 +- ...V2GenaiConversationStarter200Response.java | 2 +- ...tApiV2GenaiConversationStarterRequest.java | 2 +- ...ApiV2MatchingMatchesUserID200Response.java | 2 +- ...piV2MatchingRequestsUserID200Response.java | 2 +- .../java/org/openapitools/model/Group.java | 2 +- .../java/org/openapitools/model/Match.java | 2 +- .../openapitools/model/MatchPreferences.java | 2 +- .../openapitools/model/MatchPreferences1.java | 2 +- .../openapitools/model/MatchPreferences2.java | 2 +- .../org/openapitools/model/MatchRequest.java | 2 +- .../org/openapitools/model/MatchStatus.java | 2 +- .../PostApiV2MatchingRequestRequest.java | 2 +- .../model/PostApiV2UserRegisterRequest.java | 2 +- ...tApiV2MatchingRequestRequestIdRequest.java | 2 +- .../model/PutApiV2UserUserIDRequest.java | 2 +- .../java/org/openapitools/model/User.java | 2 +- 77 files changed, 4713 insertions(+), 43 deletions(-) create mode 100644 server/gateway/generated/.openapi-generator-ignore create mode 100644 server/gateway/generated/.openapi-generator/FILES create mode 100644 server/gateway/generated/.openapi-generator/VERSION create mode 100644 server/gateway/generated/README.md create mode 100644 server/gateway/generated/build.gradle create mode 100644 server/gateway/generated/gradle.properties create mode 100644 server/gateway/generated/gradle/libs.versions.toml create mode 100644 server/gateway/generated/gradle/wrapper/gradle-wrapper.properties create mode 100644 server/gateway/generated/gradlew create mode 100644 server/gateway/generated/gradlew.bat create mode 100644 server/gateway/generated/pom.xml create mode 100644 server/gateway/generated/settings.gradle create mode 100644 server/gateway/generated/src/main/java/org/openapitools/api/ApiUtil.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/api/GenAiApi.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/api/MatchingApi.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/api/UserApi.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter1.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/Group.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/Match.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences1.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences2.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/MatchRequest.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/MatchStatus.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java create mode 100644 server/gateway/generated/src/main/java/org/openapitools/model/User.java diff --git a/server/gateway/generated/.openapi-generator-ignore b/server/gateway/generated/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/server/gateway/generated/.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/server/gateway/generated/.openapi-generator/FILES b/server/gateway/generated/.openapi-generator/FILES new file mode 100644 index 00000000..04110a35 --- /dev/null +++ b/server/gateway/generated/.openapi-generator/FILES @@ -0,0 +1,25 @@ +.openapi-generator-ignore +README.md +pom.xml +src/main/java/org/openapitools/api/ApiUtil.java +src/main/java/org/openapitools/api/GenAiApi.java +src/main/java/org/openapitools/api/MatchingApi.java +src/main/java/org/openapitools/api/UserApi.java +src/main/java/org/openapitools/model/ConversationStarter.java +src/main/java/org/openapitools/model/ConversationStarter1.java +src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java +src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java +src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java +src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java +src/main/java/org/openapitools/model/Group.java +src/main/java/org/openapitools/model/Match.java +src/main/java/org/openapitools/model/MatchPreferences.java +src/main/java/org/openapitools/model/MatchPreferences1.java +src/main/java/org/openapitools/model/MatchPreferences2.java +src/main/java/org/openapitools/model/MatchRequest.java +src/main/java/org/openapitools/model/MatchStatus.java +src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java +src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java +src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java +src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java +src/main/java/org/openapitools/model/User.java diff --git a/server/gateway/generated/.openapi-generator/VERSION b/server/gateway/generated/.openapi-generator/VERSION new file mode 100644 index 00000000..e465da43 --- /dev/null +++ b/server/gateway/generated/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.14.0 diff --git a/server/gateway/generated/README.md b/server/gateway/generated/README.md new file mode 100644 index 00000000..d43a1de3 --- /dev/null +++ b/server/gateway/generated/README.md @@ -0,0 +1,27 @@ + +# OpenAPI generated API stub + +Spring Framework stub + + +## Overview +This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. +By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub. +This is an example of building API stub interfaces in Java using the Spring framework. + +The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints +by adding ```@Controller``` classes that implement the interface. Eg: +```java +@Controller +public class PetController implements PetApi { +// implement all PetApi methods +} +``` + +You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg: +```java +@FeignClient(name="pet", url="http://petstore.swagger.io/v2") +public interface PetClient extends PetApi { + +} +``` diff --git a/server/gateway/generated/build.gradle b/server/gateway/generated/build.gradle new file mode 100644 index 00000000..6dffee36 --- /dev/null +++ b/server/gateway/generated/build.gradle @@ -0,0 +1,53 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +plugins { + id 'java-library' + id 'maven-publish' +} + +repositories { + mavenLocal() + maven { + url = uri('https://repo.maven.apache.org/maven2/') + } +} + +dependencies { + api libs.org.springframework.boot.spring.boot.starter.web + api libs.org.springframework.data.spring.data.commons + api libs.org.springdoc.springdoc.openapi.ui + api libs.com.google.code.findbugs.jsr305 + api libs.com.fasterxml.jackson.dataformat.jackson.dataformat.yaml + api libs.com.fasterxml.jackson.datatype.jackson.datatype.jsr310 + api libs.org.openapitools.jackson.databind.nullable + api libs.org.springframework.boot.spring.boot.starter.validation + api libs.com.fasterxml.jackson.core.jackson.databind + testImplementation libs.org.springframework.boot.spring.boot.starter.test +} + +group = 'org.openapitools' +version = '1.0.0' +description = 'openapi-spring' +java.sourceCompatibility = JavaVersion.VERSION_1_8 + +java { + withSourcesJar() +} + +publishing { + publications { + maven(MavenPublication) { + from(components.java) + } + } +} + +tasks.withType(JavaCompile) { + options.encoding = 'UTF-8' +} + +tasks.withType(Javadoc) { + options.encoding = 'UTF-8' +} diff --git a/server/gateway/generated/gradle.properties b/server/gateway/generated/gradle.properties new file mode 100644 index 00000000..377538c9 --- /dev/null +++ b/server/gateway/generated/gradle.properties @@ -0,0 +1,5 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties + +org.gradle.configuration-cache=true + diff --git a/server/gateway/generated/gradle/libs.versions.toml b/server/gateway/generated/gradle/libs.versions.toml new file mode 100644 index 00000000..71008423 --- /dev/null +++ b/server/gateway/generated/gradle/libs.versions.toml @@ -0,0 +1,26 @@ +# This file was generated by the Gradle 'init' task. +# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format + +[versions] +com-fasterxml-jackson-core-jackson-databind = "2.13.5" +com-fasterxml-jackson-dataformat-jackson-dataformat-yaml = "2.13.5" +com-fasterxml-jackson-datatype-jackson-datatype-jsr310 = "2.13.5" +com-google-code-findbugs-jsr305 = "3.0.2" +org-openapitools-jackson-databind-nullable = "0.2.6" +org-springdoc-springdoc-openapi-ui = "1.6.14" +org-springframework-boot-spring-boot-starter-test = "2.7.15" +org-springframework-boot-spring-boot-starter-validation = "2.7.15" +org-springframework-boot-spring-boot-starter-web = "2.7.15" +org-springframework-data-spring-data-commons = "2.7.15" + +[libraries] +com-fasterxml-jackson-core-jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "com-fasterxml-jackson-core-jackson-databind" } +com-fasterxml-jackson-dataformat-jackson-dataformat-yaml = { module = "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", version.ref = "com-fasterxml-jackson-dataformat-jackson-dataformat-yaml" } +com-fasterxml-jackson-datatype-jackson-datatype-jsr310 = { module = "com.fasterxml.jackson.datatype:jackson-datatype-jsr310", version.ref = "com-fasterxml-jackson-datatype-jackson-datatype-jsr310" } +com-google-code-findbugs-jsr305 = { module = "com.google.code.findbugs:jsr305", version.ref = "com-google-code-findbugs-jsr305" } +org-openapitools-jackson-databind-nullable = { module = "org.openapitools:jackson-databind-nullable", version.ref = "org-openapitools-jackson-databind-nullable" } +org-springdoc-springdoc-openapi-ui = { module = "org.springdoc:springdoc-openapi-ui", version.ref = "org-springdoc-springdoc-openapi-ui" } +org-springframework-boot-spring-boot-starter-test = { module = "org.springframework.boot:spring-boot-starter-test", version.ref = "org-springframework-boot-spring-boot-starter-test" } +org-springframework-boot-spring-boot-starter-validation = { module = "org.springframework.boot:spring-boot-starter-validation", version.ref = "org-springframework-boot-spring-boot-starter-validation" } +org-springframework-boot-spring-boot-starter-web = { module = "org.springframework.boot:spring-boot-starter-web", version.ref = "org-springframework-boot-spring-boot-starter-web" } +org-springframework-data-spring-data-commons = { module = "org.springframework.data:spring-data-commons", version.ref = "org-springframework-data-spring-data-commons" } diff --git a/server/gateway/generated/gradle/wrapper/gradle-wrapper.properties b/server/gateway/generated/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..ff23a68d --- /dev/null +++ b/server/gateway/generated/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/server/gateway/generated/gradlew b/server/gateway/generated/gradlew new file mode 100644 index 00000000..23d15a93 --- /dev/null +++ b/server/gateway/generated/gradlew @@ -0,0 +1,251 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original 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. +# +# SPDX-License-Identifier: Apache-2.0 +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# 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 ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH="\\\"\\\"" + + +# 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 + if ! command -v java >/dev/null 2>&1 + then + 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 +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# 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"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/server/gateway/generated/gradlew.bat b/server/gateway/generated/gradlew.bat new file mode 100644 index 00000000..db3a6ac2 --- /dev/null +++ b/server/gateway/generated/gradlew.bat @@ -0,0 +1,94 @@ +@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 +@rem SPDX-License-Identifier: Apache-2.0 +@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=. +@rem This is normally unused +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% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 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! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/server/gateway/generated/pom.xml b/server/gateway/generated/pom.xml new file mode 100644 index 00000000..ed9595b2 --- /dev/null +++ b/server/gateway/generated/pom.xml @@ -0,0 +1,88 @@ + + 4.0.0 + org.openapitools + openapi-spring + jar + openapi-spring + 1.0.0 + + 1.8 + ${java.version} + ${java.version} + UTF-8 + 1.6.14 + 5.3.1 + + + org.springframework.boot + spring-boot-starter-parent + 2.7.15 + + + + src/main/java + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.data + spring-data-commons + + + + org.springdoc + springdoc-openapi-ui + ${springdoc.version} + + + + com.google.code.findbugs + jsr305 + 3.0.2 + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + org.openapitools + jackson-databind-nullable + 0.2.6 + + + + org.springframework.boot + spring-boot-starter-validation + + + com.fasterxml.jackson.core + jackson-databind + + + org.springframework.boot + spring-boot-starter-test + test + + + diff --git a/server/gateway/generated/settings.gradle b/server/gateway/generated/settings.gradle new file mode 100644 index 00000000..d635eddd --- /dev/null +++ b/server/gateway/generated/settings.gradle @@ -0,0 +1,5 @@ +/* + * This file was generated by the Gradle 'init' task. + */ + +rootProject.name = 'openapi-spring' diff --git a/server/gateway/generated/src/main/java/org/openapitools/api/ApiUtil.java b/server/gateway/generated/src/main/java/org/openapitools/api/ApiUtil.java new file mode 100644 index 00000000..1245b1dd --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/api/ApiUtil.java @@ -0,0 +1,19 @@ +package org.openapitools.api; + +import org.springframework.web.context.request.NativeWebRequest; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class ApiUtil { + public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { + try { + HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); + res.setCharacterEncoding("UTF-8"); + res.addHeader("Content-Type", contentType); + res.getWriter().print(example); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/server/gateway/generated/src/main/java/org/openapitools/api/GenAiApi.java b/server/gateway/generated/src/main/java/org/openapitools/api/GenAiApi.java new file mode 100644 index 00000000..279a4301 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/api/GenAiApi.java @@ -0,0 +1,97 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.GetApiV2GenaiConversationStarter200Response; +import org.openapitools.model.GetApiV2GenaiConversationStarterRequest; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "GenAI", description = "Paths belonging to the GenAI microservice") +public interface GenAiApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * GET /api/v2/genai/conversation-starter : Request conversation starter + * Request a series of conversation starter prompts from the GenAI microservice. Provide infomation about users on request. + * + * @param getApiV2GenaiConversationStarterRequest Request Conversation starter for these users (optional) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2GenaiConversationStarter", + summary = "Request conversation starter", + description = "Request a series of conversation starter prompts from the GenAI microservice. Provide infomation about users on request.", + tags = { "GenAI" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2GenaiConversationStarter200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/genai/conversation-starter", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity getApiV2GenaiConversationStarter( + @Parameter(name = "GetApiV2GenaiConversationStarterRequest", description = "Request Conversation starter for these users") @Valid @RequestBody(required = false) @Nullable GetApiV2GenaiConversationStarterRequest getApiV2GenaiConversationStarterRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"conversationStarters\" : { \"prompt\" : \"prompt\" } }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/gateway/generated/src/main/java/org/openapitools/api/MatchingApi.java b/server/gateway/generated/src/main/java/org/openapitools/api/MatchingApi.java new file mode 100644 index 00000000..82f1df83 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/api/MatchingApi.java @@ -0,0 +1,352 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.GetApiV2MatchingMatchesUserID200Response; +import org.openapitools.model.GetApiV2MatchingRequestsUserID200Response; +import org.openapitools.model.MatchRequest; +import org.openapitools.model.PostApiV2MatchingRequestRequest; +import org.openapitools.model.PutApiV2MatchingRequestRequestIdRequest; +import java.util.UUID; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "Matching", description = "Paths belonging to the Matching microservice") +public interface MatchingApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /api/v2/matching/request/{request-id} : Delete MatchRequest with {request-id} + * Delete MatchRequest with ID {request-id} from the system + * + * @param requestId UUID associated with a given match request (required) + * @return Request Deleted (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "deleteApiV2MatchingMatchesRequestId", + summary = "Delete MatchRequest with {request-id}", + description = "Delete MatchRequest with ID {request-id} from the system", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "Request Deleted"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api/v2/matching/request/{request-id}" + ) + + default ResponseEntity deleteApiV2MatchingMatchesRequestId( + @Parameter(name = "request-id", description = "UUID associated with a given match request", required = true, in = ParameterIn.PATH) @PathVariable("request-id") UUID requestId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/matches/{user-id} : Retrieve all matches for a {user-id} + * Retrieve all matches for a user with {user-id} from the matching-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingMatchesUserID", + summary = "Retrieve all matches for a {user-id}", + description = "Retrieve all matches for a user with {user-id} from the matching-service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2MatchingMatchesUserID200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/matches/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2MatchingMatchesUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"matches\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"matchID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\", \"group\" : { \"date\" : \"2000-01-23\", \"userStatus\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" } ], \"groupID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"location\" : \"GARCHING\", \"conversationStarters\" : { \"prompt\" : \"prompt\" }, \"time\" : 2 } }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"matchID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\", \"group\" : { \"date\" : \"2000-01-23\", \"userStatus\" : [ { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" }, { \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"UNSENT\" } ], \"groupID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"location\" : \"GARCHING\", \"conversationStarters\" : { \"prompt\" : \"prompt\" }, \"time\" : 2 } } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/requests/{user-id} : Retrieve all MatchRequests for a {user-id} + * Retrieve all MatchRequests for a user with {user-id} from the matching-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRequestsUserID", + summary = "Retrieve all MatchRequests for a {user-id}", + description = "Retrieve all MatchRequests for a user with {user-id} from the matching-service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = GetApiV2MatchingRequestsUserID200Response.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/requests/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2MatchingRequestsUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"matches\" : [ { \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" }, { \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" } ] }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/rsvp/{match-id}/accept : Accept invitation to a given match + * Accept invitation to a given match + * + * @param matchId UUID associated with a given match (required) + * @return OK (status code 200) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRsvpMatchIdAccept", + summary = "Accept invitation to a given match", + description = "Accept invitation to a given match", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/rsvp/{match-id}/accept" + ) + + default ResponseEntity getApiV2MatchingRsvpMatchIdAccept( + @Parameter(name = "match-id", description = "UUID associated with a given match", required = true, in = ParameterIn.PATH) @PathVariable("match-id") UUID matchId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/matching/rsvp/{match-id}/reject : Reject invitation to a given match + * Reject invitation to a given match + * + * @param matchId UUID associated with a given match (required) + * @return OK (status code 200) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2MatchingRsvpMatchIdReject", + summary = "Reject invitation to a given match", + description = "Reject invitation to a given match", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK"), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/matching/rsvp/{match-id}/reject" + ) + + default ResponseEntity getApiV2MatchingRsvpMatchIdReject( + @Parameter(name = "match-id", description = "UUID associated with a given match", required = true, in = ParameterIn.PATH) @PathVariable("match-id") UUID matchId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /api/v2/matching/request/submit : Submit matching Request + * Submit a new matching request to the Matching-Service + * + * @param postApiV2MatchingRequestRequest (optional) + * @return Request submitted sucessfully (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + */ + @Operation( + operationId = "postApiV2MatchingRequest", + summary = "Submit matching Request", + description = "Submit a new matching request to the Matching-Service", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "Request submitted sucessfully"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api/v2/matching/request/submit", + consumes = { "application/json" } + ) + + default ResponseEntity postApiV2MatchingRequest( + @Parameter(name = "PostApiV2MatchingRequestRequest", description = "") @Valid @RequestBody(required = false) @Nullable PostApiV2MatchingRequestRequest postApiV2MatchingRequestRequest + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api/v2/matching/request/{request-id} : Update MatchRequest with {request-id} + * Update all information in the MatchRequest with ID {request-id} + * + * @param requestId UUID associated with a given match request (required) + * @param putApiV2MatchingRequestRequestIdRequest (optional) + * @return MatchRequest cannot be updated since it has already been fulfilled! (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + * or Not Acceptable (status code 406) + */ + @Operation( + operationId = "putApiV2MatchingRequestRequestId", + summary = "Update MatchRequest with {request-id}", + description = "Update all information in the MatchRequest with ID {request-id}", + tags = { "Matching" }, + responses = { + @ApiResponse(responseCode = "200", description = "MatchRequest cannot be updated since it has already been fulfilled!", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = MatchRequest.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. "), + @ApiResponse(responseCode = "406", description = "Not Acceptable") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api/v2/matching/request/{request-id}", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity putApiV2MatchingRequestRequestId( + @Parameter(name = "request-id", description = "UUID associated with a given match request", required = true, in = ParameterIn.PATH) @PathVariable("request-id") UUID requestId, + @Parameter(name = "PutApiV2MatchingRequestRequestIdRequest", description = "") @Valid @RequestBody(required = false) @Nullable PutApiV2MatchingRequestRequestIdRequest putApiV2MatchingRequestRequestIdRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"date\" : \"2000-01-23\", \"preferences\" : { \"degreePref\" : true, \"agePref\" : true, \"genderPref\" : true }, \"requestID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"timeslot\" : [ 2, 2 ], \"location\" : \"GARCHING\", \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"status\" : \"PENDING\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/gateway/generated/src/main/java/org/openapitools/api/UserApi.java b/server/gateway/generated/src/main/java/org/openapitools/api/UserApi.java new file mode 100644 index 00000000..fa5f87b7 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/api/UserApi.java @@ -0,0 +1,231 @@ +/** + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.14.0). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +package org.openapitools.api; + +import org.openapitools.model.PostApiV2UserRegisterRequest; +import org.openapitools.model.PutApiV2UserUserIDRequest; +import java.util.UUID; +import org.openapitools.model.User; +import io.swagger.v3.oas.annotations.ExternalDocumentation; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.ArraySchema; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.enums.ParameterIn; +import io.swagger.v3.oas.annotations.media.ExampleObject; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.lang.Nullable; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.multipart.MultipartFile; + +import javax.validation.Valid; +import javax.validation.constraints.*; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Generated; + +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Validated +@Tag(name = "User", description = "Paths belonging to the User microservice") +public interface UserApi { + + default Optional getRequest() { + return Optional.empty(); + } + + /** + * DELETE /api/v2/user/{user-id} : Delete User with {user-id} + * Remove all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @return User deleted (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or The request was malformed or contained invalid parameters. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "deleteApiV2UserUserID", + summary = "Delete User with {user-id}", + description = "Remove all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "User deleted"), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.DELETE, + value = "/api/v2/user/{user-id}" + ) + + default ResponseEntity deleteApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * GET /api/v2/user/{user-id} : Retrieve User with {user-id} + * Fetch all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @return OK (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "getApiV2UserUserID", + summary = "Retrieve User with {user-id}", + description = "Fetch all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "OK", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.GET, + value = "/api/v2/user/{user-id}", + produces = { "application/json" } + ) + + default ResponseEntity getApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"birthday\" : \"2000-01-23\", \"firstname\" : \"Max\", \"degreeStart\" : 2024, \"gender\" : \"other\", \"degree\" : \"msc_informatics\", \"bio\" : \"bio\", \"interests\" : [ \"interests\", \"interests\" ], \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"email\" : \"email\", \"lastname\" : \"Mustermann\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * POST /api/v2/user/register : Register new User + * Register a new user and respond with it's {user-id} + * + * @param postApiV2UserRegisterRequest (optional) + * @return Successfully created user (status code 201) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or Conflict (status code 409) + */ + @Operation( + operationId = "postApiV2UserRegister", + summary = "Register new User", + description = "Register a new user and respond with it's {user-id}", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "201", description = "Successfully created user", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = UUID.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "409", description = "Conflict") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.POST, + value = "/api/v2/user/register", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity postApiV2UserRegister( + @Parameter(name = "PostApiV2UserRegisterRequest", description = "") @Valid @RequestBody(required = false) @Nullable PostApiV2UserRegisterRequest postApiV2UserRegisterRequest + ) { + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + + + /** + * PUT /api/v2/user/{user-id} : Update User with {user-id} + * Update all information about user with ID {user-id} from user-service + * + * @param userId UUID associated with a given user (required) + * @param putApiV2UserUserIDRequest (optional) + * @return User updated successfully (status code 200) + * or The request was malformed or contained invalid parameters. (status code 400) + * or Authentication failed due to missing or invalid OAuth2 token. (status code 401) + * or The requested resource was not found. (status code 404) + */ + @Operation( + operationId = "putApiV2UserUserID", + summary = "Update User with {user-id}", + description = "Update all information about user with ID {user-id} from user-service", + tags = { "User" }, + responses = { + @ApiResponse(responseCode = "200", description = "User updated successfully", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = User.class)) + }), + @ApiResponse(responseCode = "400", description = "The request was malformed or contained invalid parameters. "), + @ApiResponse(responseCode = "401", description = "Authentication failed due to missing or invalid OAuth2 token. "), + @ApiResponse(responseCode = "404", description = "The requested resource was not found. ") + }, + security = { + @SecurityRequirement(name = "auth0") + } + ) + @RequestMapping( + method = RequestMethod.PUT, + value = "/api/v2/user/{user-id}", + produces = { "application/json" }, + consumes = { "application/json" } + ) + + default ResponseEntity putApiV2UserUserID( + @Parameter(name = "user-id", description = "UUID associated with a given user", required = true, in = ParameterIn.PATH) @PathVariable("user-id") UUID userId, + @Parameter(name = "PutApiV2UserUserIDRequest", description = "") @Valid @RequestBody(required = false) @Nullable PutApiV2UserUserIDRequest putApiV2UserUserIDRequest + ) { + getRequest().ifPresent(request -> { + for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { + if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { + String exampleString = "{ \"birthday\" : \"2000-01-23\", \"firstname\" : \"Max\", \"degreeStart\" : 2024, \"gender\" : \"other\", \"degree\" : \"msc_informatics\", \"bio\" : \"bio\", \"interests\" : [ \"interests\", \"interests\" ], \"userID\" : \"046b6c7f-0b8a-43b9-b35d-6489e6daee91\", \"email\" : \"email\", \"lastname\" : \"Mustermann\" }"; + ApiUtil.setExampleResponse(request, "application/json", exampleString); + break; + } + } + }); + return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); + + } + +} diff --git a/server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter.java b/server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter.java new file mode 100644 index 00000000..3fc2ec77 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter.java @@ -0,0 +1,85 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a conversation starter in the meet@mensa system + */ + +@Schema(name = "ConversationStarter", description = "Object representing a conversation starter in the meet@mensa system") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class ConversationStarter { + + private @Nullable String prompt; + + public ConversationStarter prompt(@Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + + @Schema(name = "prompt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("prompt") + public @Nullable String getPrompt() { + return prompt; + } + + public void setPrompt(@Nullable String prompt) { + this.prompt = prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationStarter conversationStarter = (ConversationStarter) o; + return Objects.equals(this.prompt, conversationStarter.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationStarter {\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).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/server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter1.java b/server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter1.java new file mode 100644 index 00000000..7658abf7 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/ConversationStarter1.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a conversation starter in the meet@mensa system + */ + +@Schema(name = "ConversationStarter_1", description = "Object representing a conversation starter in the meet@mensa system") +@JsonTypeName("ConversationStarter_1") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class ConversationStarter1 { + + private @Nullable String prompt; + + public ConversationStarter1 prompt(@Nullable String prompt) { + this.prompt = prompt; + return this; + } + + /** + * Get prompt + * @return prompt + */ + + @Schema(name = "prompt", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("prompt") + public @Nullable String getPrompt() { + return prompt; + } + + public void setPrompt(@Nullable String prompt) { + this.prompt = prompt; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConversationStarter1 conversationStarter1 = (ConversationStarter1) o; + return Objects.equals(this.prompt, conversationStarter1.prompt); + } + + @Override + public int hashCode() { + return Objects.hash(prompt); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConversationStarter1 {\n"); + sb.append(" prompt: ").append(toIndentedString(prompt)).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/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java new file mode 100644 index 00000000..34b7c8de --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java @@ -0,0 +1,87 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.openapitools.model.ConversationStarter1; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2GenaiConversationStarter200Response + */ + +@JsonTypeName("get_api_v2_genai_conversation_starter_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2GenaiConversationStarter200Response { + + private @Nullable ConversationStarter1 conversationStarters; + + public GetApiV2GenaiConversationStarter200Response conversationStarters(@Nullable ConversationStarter1 conversationStarters) { + this.conversationStarters = conversationStarters; + return this; + } + + /** + * Get conversationStarters + * @return conversationStarters + */ + @Valid + @Schema(name = "conversationStarters", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("conversationStarters") + public @Nullable ConversationStarter1 getConversationStarters() { + return conversationStarters; + } + + public void setConversationStarters(@Nullable ConversationStarter1 conversationStarters) { + this.conversationStarters = conversationStarters; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2GenaiConversationStarter200Response getApiV2GenaiConversationStarter200Response = (GetApiV2GenaiConversationStarter200Response) o; + return Objects.equals(this.conversationStarters, getApiV2GenaiConversationStarter200Response.conversationStarters); + } + + @Override + public int hashCode() { + return Objects.hash(conversationStarters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2GenaiConversationStarter200Response {\n"); + sb.append(" conversationStarters: ").append(toIndentedString(conversationStarters)).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/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java new file mode 100644 index 00000000..d0ed9d0e --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.User; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2GenaiConversationStarterRequest + */ + +@JsonTypeName("get_api_v2_genai_conversation_starter_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2GenaiConversationStarterRequest { + + @Valid + private List<@Valid User> users = new ArrayList<>(); + + public GetApiV2GenaiConversationStarterRequest users(List<@Valid User> users) { + this.users = users; + return this; + } + + public GetApiV2GenaiConversationStarterRequest addUsersItem(User usersItem) { + if (this.users == null) { + this.users = new ArrayList<>(); + } + this.users.add(usersItem); + return this; + } + + /** + * Get users + * @return users + */ + @Valid + @Schema(name = "users", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("users") + public List<@Valid User> getUsers() { + return users; + } + + public void setUsers(List<@Valid User> users) { + this.users = users; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2GenaiConversationStarterRequest getApiV2GenaiConversationStarterRequest = (GetApiV2GenaiConversationStarterRequest) o; + return Objects.equals(this.users, getApiV2GenaiConversationStarterRequest.users); + } + + @Override + public int hashCode() { + return Objects.hash(users); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2GenaiConversationStarterRequest {\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/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java new file mode 100644 index 00000000..de188a38 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.Match; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2MatchingMatchesUserID200Response + */ + +@JsonTypeName("get_api_v2_matching_matches_userID_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2MatchingMatchesUserID200Response { + + @Valid + private List<@Valid Match> matches = new ArrayList<>(); + + public GetApiV2MatchingMatchesUserID200Response matches(List<@Valid Match> matches) { + this.matches = matches; + return this; + } + + public GetApiV2MatchingMatchesUserID200Response addMatchesItem(Match matchesItem) { + if (this.matches == null) { + this.matches = new ArrayList<>(); + } + this.matches.add(matchesItem); + return this; + } + + /** + * Get matches + * @return matches + */ + @Valid + @Schema(name = "matches", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("matches") + public List<@Valid Match> getMatches() { + return matches; + } + + public void setMatches(List<@Valid Match> matches) { + this.matches = matches; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2MatchingMatchesUserID200Response getApiV2MatchingMatchesUserID200Response = (GetApiV2MatchingMatchesUserID200Response) o; + return Objects.equals(this.matches, getApiV2MatchingMatchesUserID200Response.matches); + } + + @Override + public int hashCode() { + return Objects.hash(matches); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2MatchingMatchesUserID200Response {\n"); + sb.append(" matches: ").append(toIndentedString(matches)).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/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java new file mode 100644 index 00000000..54c28374 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java @@ -0,0 +1,99 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.model.MatchRequest; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * GetApiV2MatchingRequestsUserID200Response + */ + +@JsonTypeName("get_api_v2_matching_requests_userID_200_response") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class GetApiV2MatchingRequestsUserID200Response { + + @Valid + private List<@Valid MatchRequest> matches = new ArrayList<>(); + + public GetApiV2MatchingRequestsUserID200Response matches(List<@Valid MatchRequest> matches) { + this.matches = matches; + return this; + } + + public GetApiV2MatchingRequestsUserID200Response addMatchesItem(MatchRequest matchesItem) { + if (this.matches == null) { + this.matches = new ArrayList<>(); + } + this.matches.add(matchesItem); + return this; + } + + /** + * Get matches + * @return matches + */ + @Valid + @Schema(name = "matches", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("matches") + public List<@Valid MatchRequest> getMatches() { + return matches; + } + + public void setMatches(List<@Valid MatchRequest> matches) { + this.matches = matches; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetApiV2MatchingRequestsUserID200Response getApiV2MatchingRequestsUserID200Response = (GetApiV2MatchingRequestsUserID200Response) o; + return Objects.equals(this.matches, getApiV2MatchingRequestsUserID200Response.matches); + } + + @Override + public int hashCode() { + return Objects.hash(matches); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GetApiV2MatchingRequestsUserID200Response {\n"); + sb.append(" matches: ").append(toIndentedString(matches)).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/server/gateway/generated/src/main/java/org/openapitools/model/Group.java b/server/gateway/generated/src/main/java/org/openapitools/model/Group.java new file mode 100644 index 00000000..87f24f71 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/Group.java @@ -0,0 +1,261 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.ConversationStarter; +import org.openapitools.model.MatchStatus; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a group that has been matched in the Meet@Mensa system. + */ + +@Schema(name = "Group", description = "Object representing a group that has been matched in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class Group { + + private @Nullable UUID groupID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate date; + + private @Nullable Integer time; + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable LocationEnum location; + + @Valid + private List<@Valid MatchStatus> userStatus = new ArrayList<>(); + + private @Nullable ConversationStarter conversationStarters; + + public Group groupID(@Nullable UUID groupID) { + this.groupID = groupID; + return this; + } + + /** + * The unique ID of a Group in the Meet@Mensa system. + * @return groupID + */ + @Valid + @Schema(name = "groupID", description = "The unique ID of a Group in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("groupID") + public @Nullable UUID getGroupID() { + return groupID; + } + + public void setGroupID(@Nullable UUID groupID) { + this.groupID = groupID; + } + + public Group date(@Nullable LocalDate date) { + this.date = date; + return this; + } + + /** + * Date the group is scheduled to meet at + * @return date + */ + @Valid + @Schema(name = "date", description = "Date the group is scheduled to meet at", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public @Nullable LocalDate getDate() { + return date; + } + + public void setDate(@Nullable LocalDate date) { + this.date = date; + } + + public Group time(@Nullable Integer time) { + this.time = time; + return this; + } + + /** + * Timeslot the group is scheduled to meet at + * minimum: 1 + * maximum: 16 + * @return time + */ + @Min(1) @Max(16) + @Schema(name = "time", description = "Timeslot the group is scheduled to meet at", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("time") + public @Nullable Integer getTime() { + return time; + } + + public void setTime(@Nullable Integer time) { + this.time = time; + } + + public Group location(@Nullable LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("location") + public @Nullable LocationEnum getLocation() { + return location; + } + + public void setLocation(@Nullable LocationEnum location) { + this.location = location; + } + + public Group userStatus(List<@Valid MatchStatus> userStatus) { + this.userStatus = userStatus; + return this; + } + + public Group addUserStatusItem(MatchStatus userStatusItem) { + if (this.userStatus == null) { + this.userStatus = new ArrayList<>(); + } + this.userStatus.add(userStatusItem); + return this; + } + + /** + * Get userStatus + * @return userStatus + */ + @Valid @Size(min = 2) + @Schema(name = "userStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userStatus") + public List<@Valid MatchStatus> getUserStatus() { + return userStatus; + } + + public void setUserStatus(List<@Valid MatchStatus> userStatus) { + this.userStatus = userStatus; + } + + public Group conversationStarters(@Nullable ConversationStarter conversationStarters) { + this.conversationStarters = conversationStarters; + return this; + } + + /** + * Get conversationStarters + * @return conversationStarters + */ + @Valid + @Schema(name = "conversationStarters", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("conversationStarters") + public @Nullable ConversationStarter getConversationStarters() { + return conversationStarters; + } + + public void setConversationStarters(@Nullable ConversationStarter conversationStarters) { + this.conversationStarters = conversationStarters; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Group group = (Group) o; + return Objects.equals(this.groupID, group.groupID) && + Objects.equals(this.date, group.date) && + Objects.equals(this.time, group.time) && + Objects.equals(this.location, group.location) && + Objects.equals(this.userStatus, group.userStatus) && + Objects.equals(this.conversationStarters, group.conversationStarters); + } + + @Override + public int hashCode() { + return Objects.hash(groupID, date, time, location, userStatus, conversationStarters); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Group {\n"); + sb.append(" groupID: ").append(toIndentedString(groupID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" time: ").append(toIndentedString(time)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); + sb.append(" conversationStarters: ").append(toIndentedString(conversationStarters)).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/server/gateway/generated/src/main/java/org/openapitools/model/Match.java b/server/gateway/generated/src/main/java/org/openapitools/model/Match.java new file mode 100644 index 00000000..1b2d2318 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/Match.java @@ -0,0 +1,215 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.UUID; +import org.openapitools.model.Group; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a single match for a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "Match", description = "Object representing a single match for a given user on a given date in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class Match { + + private UUID matchID; + + private UUID userID; + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + */ + public enum StatusEnum { + UNSENT("UNSENT"), + + SENT("SENT"), + + CONFIRMED("CONFIRMED"), + + REJECTED("REJECTED"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + private Group group; + + public Match() { + super(); + } + + /** + * Constructor with only required parameters + */ + public Match(UUID matchID, UUID userID, StatusEnum status, Group group) { + this.matchID = matchID; + this.userID = userID; + this.status = status; + this.group = group; + } + + public Match matchID(UUID matchID) { + this.matchID = matchID; + return this; + } + + /** + * The unique ID of a Group in the Meet@Mensa system. + * @return matchID + */ + @NotNull @Valid + @Schema(name = "matchID", description = "The unique ID of a Group in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("matchID") + public UUID getMatchID() { + return matchID; + } + + public void setMatchID(UUID matchID) { + this.matchID = matchID; + } + + public Match userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public Match status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + * @return status + */ + @NotNull + @Schema(name = "status", description = "Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past |", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + public Match group(Group group) { + this.group = group; + return this; + } + + /** + * Get group + * @return group + */ + @NotNull @Valid + @Schema(name = "group", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("group") + public Group getGroup() { + return group; + } + + public void setGroup(Group group) { + this.group = group; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Match match = (Match) o; + return Objects.equals(this.matchID, match.matchID) && + Objects.equals(this.userID, match.userID) && + Objects.equals(this.status, match.status) && + Objects.equals(this.group, match.group); + } + + @Override + public int hashCode() { + return Objects.hash(matchID, userID, status, group); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Match {\n"); + sb.append(" matchID: ").append(toIndentedString(matchID)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" group: ").append(toIndentedString(group)).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/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences.java b/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences.java new file mode 100644 index 00000000..318284e0 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences matchPreferences = (MatchPreferences) o; + return Objects.equals(this.degreePref, matchPreferences.degreePref) && + Objects.equals(this.agePref, matchPreferences.agePref) && + Objects.equals(this.genderPref, matchPreferences.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences1.java b/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences1.java new file mode 100644 index 00000000..33045efd --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences1.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences_1", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences_1") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences1 { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences1 degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences1 agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences1 genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences1 matchPreferences1 = (MatchPreferences1) o; + return Objects.equals(this.degreePref, matchPreferences1.degreePref) && + Objects.equals(this.agePref, matchPreferences1.agePref) && + Objects.equals(this.genderPref, matchPreferences1.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences1 {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences2.java b/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences2.java new file mode 100644 index 00000000..d5c8c640 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/MatchPreferences2.java @@ -0,0 +1,135 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object Representing a set of user preferences + */ + +@Schema(name = "matchPreferences_2", description = "Object Representing a set of user preferences") +@JsonTypeName("matchPreferences_2") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchPreferences2 { + + private @Nullable Boolean degreePref; + + private @Nullable Boolean agePref; + + private @Nullable Boolean genderPref; + + public MatchPreferences2 degreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority) + * @return degreePref + */ + + @Schema(name = "degreePref", description = "Value | Meaning ---------|--------- true | degree = same (priority) false | degree = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreePref") + public @Nullable Boolean getDegreePref() { + return degreePref; + } + + public void setDegreePref(@Nullable Boolean degreePref) { + this.degreePref = degreePref; + } + + public MatchPreferences2 agePref(@Nullable Boolean agePref) { + this.agePref = agePref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority) + * @return agePref + */ + + @Schema(name = "agePref", description = "Value | Meaning ---------|--------- true | age = same (priority) false | age = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("agePref") + public @Nullable Boolean getAgePref() { + return agePref; + } + + public void setAgePref(@Nullable Boolean agePref) { + this.agePref = agePref; + } + + public MatchPreferences2 genderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + return this; + } + + /** + * Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority) + * @return genderPref + */ + + @Schema(name = "genderPref", description = "Value | Meaning ---------|--------- true | gender = same (priority) false | gender = any (no priority)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("genderPref") + public @Nullable Boolean getGenderPref() { + return genderPref; + } + + public void setGenderPref(@Nullable Boolean genderPref) { + this.genderPref = genderPref; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchPreferences2 matchPreferences2 = (MatchPreferences2) o; + return Objects.equals(this.degreePref, matchPreferences2.degreePref) && + Objects.equals(this.agePref, matchPreferences2.agePref) && + Objects.equals(this.genderPref, matchPreferences2.genderPref); + } + + @Override + public int hashCode() { + return Objects.hash(degreePref, agePref, genderPref); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchPreferences2 {\n"); + sb.append(" degreePref: ").append(toIndentedString(degreePref)).append("\n"); + sb.append(" agePref: ").append(toIndentedString(agePref)).append("\n"); + sb.append(" genderPref: ").append(toIndentedString(genderPref)).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/server/gateway/generated/src/main/java/org/openapitools/model/MatchRequest.java b/server/gateway/generated/src/main/java/org/openapitools/model/MatchRequest.java new file mode 100644 index 00000000..f998a6d8 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/MatchRequest.java @@ -0,0 +1,340 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences1; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "MatchRequest", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchRequest { + + private UUID requestID; + + private UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private LocationEnum location; + + private MatchPreferences1 preferences; + + /** + * Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | + */ + public enum StatusEnum { + PENDING("PENDING"), + + MATCHED("MATCHED"), + + UNMATCHABLE("UNMATCHABLE"), + + REMATCH("REMATCH"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private StatusEnum status; + + public MatchRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public MatchRequest(UUID requestID, UUID userID, LocalDate date, List<@Min(1) @Max(16)Integer> timeslot, LocationEnum location, MatchPreferences1 preferences, StatusEnum status) { + this.requestID = requestID; + this.userID = userID; + this.date = date; + this.timeslot = timeslot; + this.location = location; + this.preferences = preferences; + this.status = status; + } + + public MatchRequest requestID(UUID requestID) { + this.requestID = requestID; + return this; + } + + /** + * The unique ID of a MatchRequest in the Meet@Mensa system. + * @return requestID + */ + @NotNull @Valid + @Schema(name = "requestID", description = "The unique ID of a MatchRequest in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("requestID") + public UUID getRequestID() { + return requestID; + } + + public void setRequestID(UUID requestID) { + this.requestID = requestID; + } + + public MatchRequest userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public MatchRequest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @NotNull @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public MatchRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public MatchRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + @NotNull + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public MatchRequest location(LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + @NotNull + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("location") + public LocationEnum getLocation() { + return location; + } + + public void setLocation(LocationEnum location) { + this.location = location; + } + + public MatchRequest preferences(MatchPreferences1 preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @NotNull @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("preferences") + public MatchPreferences1 getPreferences() { + return preferences; + } + + public void setPreferences(MatchPreferences1 preferences) { + this.preferences = preferences; + } + + public MatchRequest status(StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | + * @return status + */ + @NotNull + @Schema(name = "status", description = "Enumerator representing the status of a MatchRequest Value | Description | ---------|----------| | PENDING | The system has not attempted to match this request yet | | MATCHED | The system has fulfilled this request | | UNMATCHABLE | The system was unable to fulfill this request | | REMATCH | The sytem should attempt to fulfill this request again (ex: group cancelled for lacking RSVPs) | | EXPIRED | The date for this MatchRequest is in the past | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("status") + public StatusEnum getStatus() { + return status; + } + + public void setStatus(StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchRequest matchRequest = (MatchRequest) o; + return Objects.equals(this.requestID, matchRequest.requestID) && + Objects.equals(this.userID, matchRequest.userID) && + Objects.equals(this.date, matchRequest.date) && + Objects.equals(this.timeslot, matchRequest.timeslot) && + Objects.equals(this.location, matchRequest.location) && + Objects.equals(this.preferences, matchRequest.preferences) && + Objects.equals(this.status, matchRequest.status); + } + + @Override + public int hashCode() { + return Objects.hash(requestID, userID, date, timeslot, location, preferences, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchRequest {\n"); + sb.append(" requestID: ").append(toIndentedString(requestID)).append("\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/server/gateway/generated/src/main/java/org/openapitools/model/MatchStatus.java b/server/gateway/generated/src/main/java/org/openapitools/model/MatchStatus.java new file mode 100644 index 00000000..f2e71a2c --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/MatchStatus.java @@ -0,0 +1,153 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.UUID; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * MatchStatus + */ + +@JsonTypeName("matchStatus") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class MatchStatus { + + private @Nullable UUID userID; + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + */ + public enum StatusEnum { + UNSENT("UNSENT"), + + SENT("SENT"), + + CONFIRMED("CONFIRMED"), + + REJECTED("REJECTED"), + + EXPIRED("EXPIRED"); + + private final String value; + + StatusEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static StatusEnum fromValue(String value) { + for (StatusEnum b : StatusEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable StatusEnum status; + + public MatchStatus userID(@Nullable UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userID") + public @Nullable UUID getUserID() { + return userID; + } + + public void setUserID(@Nullable UUID userID) { + this.userID = userID; + } + + public MatchStatus status(@Nullable StatusEnum status) { + this.status = status; + return this; + } + + /** + * Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past | + * @return status + */ + + @Schema(name = "status", description = "Enumerator representing the status of a Invitation Value | Description | ---------|----------| | UNSENT | The system has not sent out this invitation yet | | SENT | The system has sent out this invitation | | CONFIRMED | The user has confirmed this invitation | | REJECTED | The user has rejected this invitation | | EXPIRED | The date for this invitation is in the past |", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("status") + public @Nullable StatusEnum getStatus() { + return status; + } + + public void setStatus(@Nullable StatusEnum status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MatchStatus matchStatus = (MatchStatus) o; + return Objects.equals(this.userID, matchStatus.userID) && + Objects.equals(this.status, matchStatus.status); + } + + @Override + public int hashCode() { + return Objects.hash(userID, status); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MatchStatus {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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/server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java b/server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java new file mode 100644 index 00000000..c5702c3c --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java @@ -0,0 +1,251 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "post_api_v2_matching_request_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@JsonTypeName("post_api_v2_matching_request_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PostApiV2MatchingRequestRequest { + + private UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private LocationEnum location; + + private MatchPreferences preferences; + + public PostApiV2MatchingRequestRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PostApiV2MatchingRequestRequest(UUID userID, LocalDate date, List<@Min(1) @Max(16)Integer> timeslot, LocationEnum location, MatchPreferences preferences) { + this.userID = userID; + this.date = date; + this.timeslot = timeslot; + this.location = location; + this.preferences = preferences; + } + + public PostApiV2MatchingRequestRequest userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public PostApiV2MatchingRequestRequest date(LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @NotNull @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("date") + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public PostApiV2MatchingRequestRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public PostApiV2MatchingRequestRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + @NotNull + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public PostApiV2MatchingRequestRequest location(LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + @NotNull + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("location") + public LocationEnum getLocation() { + return location; + } + + public void setLocation(LocationEnum location) { + this.location = location; + } + + public PostApiV2MatchingRequestRequest preferences(MatchPreferences preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @NotNull @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("preferences") + public MatchPreferences getPreferences() { + return preferences; + } + + public void setPreferences(MatchPreferences preferences) { + this.preferences = preferences; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostApiV2MatchingRequestRequest postApiV2MatchingRequestRequest = (PostApiV2MatchingRequestRequest) o; + return Objects.equals(this.userID, postApiV2MatchingRequestRequest.userID) && + Objects.equals(this.date, postApiV2MatchingRequestRequest.date) && + Objects.equals(this.timeslot, postApiV2MatchingRequestRequest.timeslot) && + Objects.equals(this.location, postApiV2MatchingRequestRequest.location) && + Objects.equals(this.preferences, postApiV2MatchingRequestRequest.preferences); + } + + @Override + public int hashCode() { + return Objects.hash(userID, date, timeslot, location, preferences); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostApiV2MatchingRequestRequest {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).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/server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java b/server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java new file mode 100644 index 00000000..ff66a342 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java @@ -0,0 +1,315 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "post_api_v2_user_register_request", description = "Object representing a student user in the Meet@Mensa system.") +@JsonTypeName("post_api_v2_user_register_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PostApiV2UserRegisterRequest { + + private String email; + + private String firstname; + + private String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate birthday; + + private String gender = "other"; + + private String degree; + + private Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private String bio; + + public PostApiV2UserRegisterRequest() { + super(); + } + + /** + * Constructor with only required parameters + */ + public PostApiV2UserRegisterRequest(String email, String firstname, String lastname, LocalDate birthday, String gender, String degree, Integer degreeStart, List interests, String bio) { + this.email = email; + this.firstname = firstname; + this.lastname = lastname; + this.birthday = birthday; + this.gender = gender; + this.degree = degree; + this.degreeStart = degreeStart; + this.interests = interests; + this.bio = bio; + } + + public PostApiV2UserRegisterRequest email(String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @NotNull @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public PostApiV2UserRegisterRequest firstname(String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + @NotNull + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("firstname") + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public PostApiV2UserRegisterRequest lastname(String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + @NotNull + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("lastname") + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public PostApiV2UserRegisterRequest birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @NotNull @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("birthday") + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public PostApiV2UserRegisterRequest gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + @NotNull + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public PostApiV2UserRegisterRequest degree(String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + @NotNull + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degree") + public String getDegree() { + return degree; + } + + public void setDegree(String degree) { + this.degree = degree; + } + + public PostApiV2UserRegisterRequest degreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @NotNull @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degreeStart") + public Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public PostApiV2UserRegisterRequest interests(List interests) { + this.interests = interests; + return this; + } + + public PostApiV2UserRegisterRequest addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + @NotNull + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public PostApiV2UserRegisterRequest bio(String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + @NotNull + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("bio") + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PostApiV2UserRegisterRequest postApiV2UserRegisterRequest = (PostApiV2UserRegisterRequest) o; + return Objects.equals(this.email, postApiV2UserRegisterRequest.email) && + Objects.equals(this.firstname, postApiV2UserRegisterRequest.firstname) && + Objects.equals(this.lastname, postApiV2UserRegisterRequest.lastname) && + Objects.equals(this.birthday, postApiV2UserRegisterRequest.birthday) && + Objects.equals(this.gender, postApiV2UserRegisterRequest.gender) && + Objects.equals(this.degree, postApiV2UserRegisterRequest.degree) && + Objects.equals(this.degreeStart, postApiV2UserRegisterRequest.degreeStart) && + Objects.equals(this.interests, postApiV2UserRegisterRequest.interests) && + Objects.equals(this.bio, postApiV2UserRegisterRequest.bio); + } + + @Override + public int hashCode() { + return Objects.hash(email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PostApiV2UserRegisterRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java b/server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java new file mode 100644 index 00000000..f22daad7 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java @@ -0,0 +1,236 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.openapitools.model.MatchPreferences2; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a request for matching a given user on a given date in the Meet@Mensa system. + */ + +@Schema(name = "put_api_v2_matching_request_request_id_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") +@JsonTypeName("put_api_v2_matching_request_request_id_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PutApiV2MatchingRequestRequestIdRequest { + + private @Nullable UUID userID; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate date; + + @Valid + private List<@Min(1) @Max(16)Integer> timeslot = new ArrayList<>(); + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + */ + public enum LocationEnum { + GARCHING("GARCHING"), + + ARCISSTR("ARCISSTR"); + + private final String value; + + LocationEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static LocationEnum fromValue(String value) { + for (LocationEnum b : LocationEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + private @Nullable LocationEnum location; + + private @Nullable MatchPreferences2 preferences; + + public PutApiV2MatchingRequestRequestIdRequest userID(@Nullable UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("userID") + public @Nullable UUID getUserID() { + return userID; + } + + public void setUserID(@Nullable UUID userID) { + this.userID = userID; + } + + public PutApiV2MatchingRequestRequestIdRequest date(@Nullable LocalDate date) { + this.date = date; + return this; + } + + /** + * The date a user would like meet@mensa to find them a match + * @return date + */ + @Valid + @Schema(name = "date", description = "The date a user would like meet@mensa to find them a match", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("date") + public @Nullable LocalDate getDate() { + return date; + } + + public void setDate(@Nullable LocalDate date) { + this.date = date; + } + + public PutApiV2MatchingRequestRequestIdRequest timeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + return this; + } + + public PutApiV2MatchingRequestRequestIdRequest addTimeslotItem(Integer timeslotItem) { + if (this.timeslot == null) { + this.timeslot = new ArrayList<>(); + } + this.timeslot.add(timeslotItem); + return this; + } + + /** + * Get timeslot + * @return timeslot + */ + + @Schema(name = "timeslot", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("timeslot") + public List<@Min(1) @Max(16)Integer> getTimeslot() { + return timeslot; + } + + public void setTimeslot(List<@Min(1) @Max(16)Integer> timeslot) { + this.timeslot = timeslot; + } + + public PutApiV2MatchingRequestRequestIdRequest location(@Nullable LocationEnum location) { + this.location = location; + return this; + } + + /** + * Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | + * @return location + */ + + @Schema(name = "location", description = "Enumerator representing a mensa at which a meet can happen Value | Description | ---------|----------| | GARCHING | The Mensa at the TUM Garching Campus | | ARCISSTR | The Mensa at the TUM Innenstadt Campus (Arcisstr. 21) | ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("location") + public @Nullable LocationEnum getLocation() { + return location; + } + + public void setLocation(@Nullable LocationEnum location) { + this.location = location; + } + + public PutApiV2MatchingRequestRequestIdRequest preferences(@Nullable MatchPreferences2 preferences) { + this.preferences = preferences; + return this; + } + + /** + * Get preferences + * @return preferences + */ + @Valid + @Schema(name = "preferences", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("preferences") + public @Nullable MatchPreferences2 getPreferences() { + return preferences; + } + + public void setPreferences(@Nullable MatchPreferences2 preferences) { + this.preferences = preferences; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutApiV2MatchingRequestRequestIdRequest putApiV2MatchingRequestRequestIdRequest = (PutApiV2MatchingRequestRequestIdRequest) o; + return Objects.equals(this.userID, putApiV2MatchingRequestRequestIdRequest.userID) && + Objects.equals(this.date, putApiV2MatchingRequestRequestIdRequest.date) && + Objects.equals(this.timeslot, putApiV2MatchingRequestRequestIdRequest.timeslot) && + Objects.equals(this.location, putApiV2MatchingRequestRequestIdRequest.location) && + Objects.equals(this.preferences, putApiV2MatchingRequestRequestIdRequest.preferences); + } + + @Override + public int hashCode() { + return Objects.hash(userID, date, timeslot, location, preferences); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutApiV2MatchingRequestRequestIdRequest {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" timeslot: ").append(toIndentedString(timeslot)).append("\n"); + sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" preferences: ").append(toIndentedString(preferences)).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/server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java b/server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java new file mode 100644 index 00000000..14d06d3d --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java @@ -0,0 +1,296 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "put_api_v2_user_userID_request", description = "Object representing a student user in the Meet@Mensa system.") +@JsonTypeName("put_api_v2_user_userID_request") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class PutApiV2UserUserIDRequest { + + private @Nullable String email; + + private @Nullable String firstname; + + private @Nullable String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private @Nullable LocalDate birthday; + + private String gender = "other"; + + private @Nullable String degree; + + private @Nullable Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private @Nullable String bio; + + public PutApiV2UserUserIDRequest email(@Nullable String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("email") + public @Nullable String getEmail() { + return email; + } + + public void setEmail(@Nullable String email) { + this.email = email; + } + + public PutApiV2UserUserIDRequest firstname(@Nullable String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("firstname") + public @Nullable String getFirstname() { + return firstname; + } + + public void setFirstname(@Nullable String firstname) { + this.firstname = firstname; + } + + public PutApiV2UserUserIDRequest lastname(@Nullable String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("lastname") + public @Nullable String getLastname() { + return lastname; + } + + public void setLastname(@Nullable String lastname) { + this.lastname = lastname; + } + + public PutApiV2UserUserIDRequest birthday(@Nullable LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("birthday") + public @Nullable LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(@Nullable LocalDate birthday) { + this.birthday = birthday; + } + + public PutApiV2UserUserIDRequest gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public PutApiV2UserUserIDRequest degree(@Nullable String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degree") + public @Nullable String getDegree() { + return degree; + } + + public void setDegree(@Nullable String degree) { + this.degree = degree; + } + + public PutApiV2UserUserIDRequest degreeStart(@Nullable Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("degreeStart") + public @Nullable Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(@Nullable Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public PutApiV2UserUserIDRequest interests(List interests) { + this.interests = interests; + return this; + } + + public PutApiV2UserUserIDRequest addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public PutApiV2UserUserIDRequest bio(@Nullable String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.NOT_REQUIRED) + @JsonProperty("bio") + public @Nullable String getBio() { + return bio; + } + + public void setBio(@Nullable String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PutApiV2UserUserIDRequest putApiV2UserUserIDRequest = (PutApiV2UserUserIDRequest) o; + return Objects.equals(this.email, putApiV2UserUserIDRequest.email) && + Objects.equals(this.firstname, putApiV2UserUserIDRequest.firstname) && + Objects.equals(this.lastname, putApiV2UserUserIDRequest.lastname) && + Objects.equals(this.birthday, putApiV2UserUserIDRequest.birthday) && + Objects.equals(this.gender, putApiV2UserUserIDRequest.gender) && + Objects.equals(this.degree, putApiV2UserUserIDRequest.degree) && + Objects.equals(this.degreeStart, putApiV2UserUserIDRequest.degreeStart) && + Objects.equals(this.interests, putApiV2UserUserIDRequest.interests) && + Objects.equals(this.bio, putApiV2UserUserIDRequest.bio); + } + + @Override + public int hashCode() { + return Objects.hash(email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PutApiV2UserUserIDRequest {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/gateway/generated/src/main/java/org/openapitools/model/User.java b/server/gateway/generated/src/main/java/org/openapitools/model/User.java new file mode 100644 index 00000000..15663ea6 --- /dev/null +++ b/server/gateway/generated/src/main/java/org/openapitools/model/User.java @@ -0,0 +1,339 @@ +package org.openapitools.model; + +import java.net.URI; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.lang.Nullable; +import org.openapitools.jackson.nullable.JsonNullable; +import java.time.OffsetDateTime; +import javax.validation.Valid; +import javax.validation.constraints.*; +import io.swagger.v3.oas.annotations.media.Schema; + + +import java.util.*; +import javax.annotation.Generated; + +/** + * Object representing a student user in the Meet@Mensa system. + */ + +@Schema(name = "User", description = "Object representing a student user in the Meet@Mensa system.") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:29.454419621+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +public class User { + + private UUID userID; + + private String email; + + private String firstname; + + private String lastname; + + @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) + private LocalDate birthday; + + private String gender = "other"; + + private String degree; + + private Integer degreeStart; + + @Valid + private List interests = new ArrayList<>(); + + private String bio; + + public User() { + super(); + } + + /** + * Constructor with only required parameters + */ + public User(UUID userID, String email, String firstname, String lastname, LocalDate birthday, String gender, String degree, Integer degreeStart, List interests, String bio) { + this.userID = userID; + this.email = email; + this.firstname = firstname; + this.lastname = lastname; + this.birthday = birthday; + this.gender = gender; + this.degree = degree; + this.degreeStart = degreeStart; + this.interests = interests; + this.bio = bio; + } + + public User userID(UUID userID) { + this.userID = userID; + return this; + } + + /** + * The unique ID of a single student in the Meet@Mensa system. + * @return userID + */ + @NotNull @Valid + @Schema(name = "userID", description = "The unique ID of a single student in the Meet@Mensa system.", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("userID") + public UUID getUserID() { + return userID; + } + + public void setUserID(UUID userID) { + this.userID = userID; + } + + public User email(String email) { + this.email = email; + return this; + } + + /** + * Users's e-mail + * @return email + */ + @NotNull @javax.validation.constraints.Email + @Schema(name = "email", description = "Users's e-mail", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("email") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public User firstname(String firstname) { + this.firstname = firstname; + return this; + } + + /** + * User's given name + * @return firstname + */ + @NotNull + @Schema(name = "firstname", example = "Max", description = "User's given name", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("firstname") + public String getFirstname() { + return firstname; + } + + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + public User lastname(String lastname) { + this.lastname = lastname; + return this; + } + + /** + * User's surname + * @return lastname + */ + @NotNull + @Schema(name = "lastname", example = "Mustermann", description = "User's surname", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("lastname") + public String getLastname() { + return lastname; + } + + public void setLastname(String lastname) { + this.lastname = lastname; + } + + public User birthday(LocalDate birthday) { + this.birthday = birthday; + return this; + } + + /** + * User's date of birth + * @return birthday + */ + @NotNull @Valid + @Schema(name = "birthday", description = "User's date of birth", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("birthday") + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public User gender(String gender) { + this.gender = gender; + return this; + } + + /** + * User's gender + * @return gender + */ + @NotNull + @Schema(name = "gender", description = "User's gender", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("gender") + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public User degree(String degree) { + this.degree = degree; + return this; + } + + /** + * User's degree program + * @return degree + */ + @NotNull + @Schema(name = "degree", example = "msc_informatics", description = "User's degree program", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degree") + public String getDegree() { + return degree; + } + + public void setDegree(String degree) { + this.degree = degree; + } + + public User degreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + return this; + } + + /** + * What year User started their degree + * minimum: 2000 + * maximum: 2100 + * @return degreeStart + */ + @NotNull @Min(2000) @Max(2100) + @Schema(name = "degreeStart", example = "2024", description = "What year User started their degree", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("degreeStart") + public Integer getDegreeStart() { + return degreeStart; + } + + public void setDegreeStart(Integer degreeStart) { + this.degreeStart = degreeStart; + } + + public User interests(List interests) { + this.interests = interests; + return this; + } + + public User addInterestsItem(String interestsItem) { + if (this.interests == null) { + this.interests = new ArrayList<>(); + } + this.interests.add(interestsItem); + return this; + } + + /** + * Array of a User's interests + * @return interests + */ + @NotNull + @Schema(name = "interests", description = "Array of a User's interests", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("interests") + public List getInterests() { + return interests; + } + + public void setInterests(List interests) { + this.interests = interests; + } + + public User bio(String bio) { + this.bio = bio; + return this; + } + + /** + * Short introduction text written by the user + * @return bio + */ + @NotNull + @Schema(name = "bio", description = "Short introduction text written by the user", requiredMode = Schema.RequiredMode.REQUIRED) + @JsonProperty("bio") + public String getBio() { + return bio; + } + + public void setBio(String bio) { + this.bio = bio; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + User user = (User) o; + return Objects.equals(this.userID, user.userID) && + Objects.equals(this.email, user.email) && + Objects.equals(this.firstname, user.firstname) && + Objects.equals(this.lastname, user.lastname) && + Objects.equals(this.birthday, user.birthday) && + Objects.equals(this.gender, user.gender) && + Objects.equals(this.degree, user.degree) && + Objects.equals(this.degreeStart, user.degreeStart) && + Objects.equals(this.interests, user.interests) && + Objects.equals(this.bio, user.bio); + } + + @Override + public int hashCode() { + return Objects.hash(userID, email, firstname, lastname, birthday, gender, degree, degreeStart, interests, bio); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class User {\n"); + sb.append(" userID: ").append(toIndentedString(userID)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); + sb.append(" firstname: ").append(toIndentedString(firstname)).append("\n"); + sb.append(" lastname: ").append(toIndentedString(lastname)).append("\n"); + sb.append(" birthday: ").append(toIndentedString(birthday)).append("\n"); + sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); + sb.append(" degree: ").append(toIndentedString(degree)).append("\n"); + sb.append(" degreeStart: ").append(toIndentedString(degreeStart)).append("\n"); + sb.append(" interests: ").append(toIndentedString(interests)).append("\n"); + sb.append(" bio: ").append(toIndentedString(bio)).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/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java b/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java index 76c1d3f2..09dea84a 100644 --- a/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java +++ b/server/matching/generated/src/main/java/org/openapitools/api/GenAiApi.java @@ -35,7 +35,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "GenAI", description = "Paths belonging to the GenAI microservice") public interface GenAiApi { diff --git a/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java b/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java index ff4ba6a2..165eb0e2 100644 --- a/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java +++ b/server/matching/generated/src/main/java/org/openapitools/api/MatchingApi.java @@ -39,7 +39,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "Matching", description = "Paths belonging to the Matching microservice") public interface MatchingApi { diff --git a/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java b/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java index 0ff9f5fc..72c9508d 100644 --- a/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java +++ b/server/matching/generated/src/main/java/org/openapitools/api/UserApi.java @@ -37,7 +37,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "User", description = "Paths belonging to the User microservice") public interface UserApi { diff --git a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java index 73a17aa5..35fa994f 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter.java @@ -20,7 +20,7 @@ */ @Schema(name = "ConversationStarter", description = "Object representing a conversation starter in the meet@mensa system") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class ConversationStarter { private @Nullable String prompt; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java index 0319a3e3..1b6d14a5 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/ConversationStarter1.java @@ -22,7 +22,7 @@ @Schema(name = "ConversationStarter_1", description = "Object representing a conversation starter in the meet@mensa system") @JsonTypeName("ConversationStarter_1") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class ConversationStarter1 { private @Nullable String prompt; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java index 61b46cf9..cab62202 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java @@ -22,7 +22,7 @@ */ @JsonTypeName("get_api_v2_genai_conversation_starter_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2GenaiConversationStarter200Response { private @Nullable ConversationStarter1 conversationStarters; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java index ff0db011..3bbf5468 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_genai_conversation_starter_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2GenaiConversationStarterRequest { @Valid diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java index 520247ae..2a399002 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_matching_matches_userID_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2MatchingMatchesUserID200Response { @Valid diff --git a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java index cbe3b5b8..3abb2671 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_matching_requests_userID_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2MatchingRequestsUserID200Response { @Valid diff --git a/server/matching/generated/src/main/java/org/openapitools/model/Group.java b/server/matching/generated/src/main/java/org/openapitools/model/Group.java index ac3a1445..bede3568 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/Group.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/Group.java @@ -29,7 +29,7 @@ */ @Schema(name = "Group", description = "Object representing a group that has been matched in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class Group { private @Nullable UUID groupID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/Match.java b/server/matching/generated/src/main/java/org/openapitools/model/Match.java index 449497e6..c157c612 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/Match.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/Match.java @@ -23,7 +23,7 @@ */ @Schema(name = "Match", description = "Object representing a single match for a given user on a given date in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class Match { private UUID matchID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java index 0d08c306..81d65251 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences { private @Nullable Boolean degreePref; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java index 2611019c..502c21b2 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences1.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences_1", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences_1") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences1 { private @Nullable Boolean degreePref; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java index 6ca08e17..f2879da9 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchPreferences2.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences_2", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences_2") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences2 { private @Nullable Boolean degreePref; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java index 6ec7bbc8..13aef92c 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchRequest.java @@ -28,7 +28,7 @@ */ @Schema(name = "MatchRequest", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchRequest { private UUID requestID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java b/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java index 7b1f5d35..aa116f40 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/MatchStatus.java @@ -23,7 +23,7 @@ */ @JsonTypeName("matchStatus") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchStatus { private @Nullable UUID userID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java index bbce081d..33e59862 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java @@ -30,7 +30,7 @@ @Schema(name = "post_api_v2_matching_request_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") @JsonTypeName("post_api_v2_matching_request_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PostApiV2MatchingRequestRequest { private UUID userID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java index 33f1a5a5..7620e5f6 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java @@ -27,7 +27,7 @@ @Schema(name = "post_api_v2_user_register_request", description = "Object representing a student user in the Meet@Mensa system.") @JsonTypeName("post_api_v2_user_register_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PostApiV2UserRegisterRequest { private String email; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java index 52a7c5ab..9f2b418f 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java @@ -30,7 +30,7 @@ @Schema(name = "put_api_v2_matching_request_request_id_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") @JsonTypeName("put_api_v2_matching_request_request_id_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PutApiV2MatchingRequestRequestIdRequest { private @Nullable UUID userID; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java index c25a255a..0825023e 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java @@ -27,7 +27,7 @@ @Schema(name = "put_api_v2_user_userID_request", description = "Object representing a student user in the Meet@Mensa system.") @JsonTypeName("put_api_v2_user_userID_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PutApiV2UserUserIDRequest { private @Nullable String email; diff --git a/server/matching/generated/src/main/java/org/openapitools/model/User.java b/server/matching/generated/src/main/java/org/openapitools/model/User.java index d2336ee8..4aa86e9e 100644 --- a/server/matching/generated/src/main/java/org/openapitools/model/User.java +++ b/server/matching/generated/src/main/java/org/openapitools/model/User.java @@ -26,7 +26,7 @@ */ @Schema(name = "User", description = "Object representing a student user in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:30.929671817+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:19.777600418+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class User { private UUID userID; diff --git a/server/user/generated/.openapi-generator/FILES b/server/user/generated/.openapi-generator/FILES index 04110a35..59bd3066 100644 --- a/server/user/generated/.openapi-generator/FILES +++ b/server/user/generated/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/ApiUtil.java diff --git a/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java b/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java index b3322d46..d2e17f69 100644 --- a/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java +++ b/server/user/generated/src/main/java/org/openapitools/api/GenAiApi.java @@ -35,7 +35,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "GenAI", description = "Paths belonging to the GenAI microservice") public interface GenAiApi { diff --git a/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java b/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java index 54830ea4..4ac1746a 100644 --- a/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java +++ b/server/user/generated/src/main/java/org/openapitools/api/MatchingApi.java @@ -39,7 +39,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "Matching", description = "Paths belonging to the Matching microservice") public interface MatchingApi { diff --git a/server/user/generated/src/main/java/org/openapitools/api/UserApi.java b/server/user/generated/src/main/java/org/openapitools/api/UserApi.java index 63034df4..a282c51e 100644 --- a/server/user/generated/src/main/java/org/openapitools/api/UserApi.java +++ b/server/user/generated/src/main/java/org/openapitools/api/UserApi.java @@ -37,7 +37,7 @@ import java.util.Optional; import javax.annotation.Generated; -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") @Validated @Tag(name = "User", description = "Paths belonging to the User microservice") public interface UserApi { diff --git a/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java index 030d61a0..11c0753a 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java +++ b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter.java @@ -20,7 +20,7 @@ */ @Schema(name = "ConversationStarter", description = "Object representing a conversation starter in the meet@mensa system") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class ConversationStarter { private @Nullable String prompt; diff --git a/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java index 3b4692cb..bf4af28a 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java +++ b/server/user/generated/src/main/java/org/openapitools/model/ConversationStarter1.java @@ -22,7 +22,7 @@ @Schema(name = "ConversationStarter_1", description = "Object representing a conversation starter in the meet@mensa system") @JsonTypeName("ConversationStarter_1") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class ConversationStarter1 { private @Nullable String prompt; diff --git a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java index 2038a322..72d7ec4e 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarter200Response.java @@ -22,7 +22,7 @@ */ @JsonTypeName("get_api_v2_genai_conversation_starter_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2GenaiConversationStarter200Response { private @Nullable ConversationStarter1 conversationStarters; diff --git a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java index f5584f93..a6ad3119 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2GenaiConversationStarterRequest.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_genai_conversation_starter_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2GenaiConversationStarterRequest { @Valid diff --git a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java index f33039d8..9674fd3c 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingMatchesUserID200Response.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_matching_matches_userID_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2MatchingMatchesUserID200Response { @Valid diff --git a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java index d2d93c21..4533c405 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java +++ b/server/user/generated/src/main/java/org/openapitools/model/GetApiV2MatchingRequestsUserID200Response.java @@ -25,7 +25,7 @@ */ @JsonTypeName("get_api_v2_matching_requests_userID_200_response") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class GetApiV2MatchingRequestsUserID200Response { @Valid diff --git a/server/user/generated/src/main/java/org/openapitools/model/Group.java b/server/user/generated/src/main/java/org/openapitools/model/Group.java index 58e3ed91..db54c496 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/Group.java +++ b/server/user/generated/src/main/java/org/openapitools/model/Group.java @@ -29,7 +29,7 @@ */ @Schema(name = "Group", description = "Object representing a group that has been matched in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class Group { private @Nullable UUID groupID; diff --git a/server/user/generated/src/main/java/org/openapitools/model/Match.java b/server/user/generated/src/main/java/org/openapitools/model/Match.java index ec0fdc55..a35cc7b5 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/Match.java +++ b/server/user/generated/src/main/java/org/openapitools/model/Match.java @@ -23,7 +23,7 @@ */ @Schema(name = "Match", description = "Object representing a single match for a given user on a given date in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class Match { private UUID matchID; diff --git a/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java index bd077702..787a8e0d 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences { private @Nullable Boolean degreePref; diff --git a/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java index fc510114..8dee83d4 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences1.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences_1", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences_1") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences1 { private @Nullable Boolean degreePref; diff --git a/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java index cb547f01..e48f10c6 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchPreferences2.java @@ -22,7 +22,7 @@ @Schema(name = "matchPreferences_2", description = "Object Representing a set of user preferences") @JsonTypeName("matchPreferences_2") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchPreferences2 { private @Nullable Boolean degreePref; diff --git a/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java b/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java index 28a6a55d..b06ebcbe 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchRequest.java @@ -28,7 +28,7 @@ */ @Schema(name = "MatchRequest", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchRequest { private UUID requestID; diff --git a/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java b/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java index eb580924..c5d9a6a0 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java +++ b/server/user/generated/src/main/java/org/openapitools/model/MatchStatus.java @@ -23,7 +23,7 @@ */ @JsonTypeName("matchStatus") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class MatchStatus { private @Nullable UUID userID; diff --git a/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java index 8ad9ccad..8b746c18 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java +++ b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2MatchingRequestRequest.java @@ -30,7 +30,7 @@ @Schema(name = "post_api_v2_matching_request_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") @JsonTypeName("post_api_v2_matching_request_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PostApiV2MatchingRequestRequest { private UUID userID; diff --git a/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java index 66d701b3..764e8106 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java +++ b/server/user/generated/src/main/java/org/openapitools/model/PostApiV2UserRegisterRequest.java @@ -27,7 +27,7 @@ @Schema(name = "post_api_v2_user_register_request", description = "Object representing a student user in the Meet@Mensa system.") @JsonTypeName("post_api_v2_user_register_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PostApiV2UserRegisterRequest { private String email; diff --git a/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java index 6e58dcaf..05b78d9a 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java +++ b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2MatchingRequestRequestIdRequest.java @@ -30,7 +30,7 @@ @Schema(name = "put_api_v2_matching_request_request_id_request", description = "Object representing a request for matching a given user on a given date in the Meet@Mensa system.") @JsonTypeName("put_api_v2_matching_request_request_id_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PutApiV2MatchingRequestRequestIdRequest { private @Nullable UUID userID; diff --git a/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java index bcd820bd..a585c0bd 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java +++ b/server/user/generated/src/main/java/org/openapitools/model/PutApiV2UserUserIDRequest.java @@ -27,7 +27,7 @@ @Schema(name = "put_api_v2_user_userID_request", description = "Object representing a student user in the Meet@Mensa system.") @JsonTypeName("put_api_v2_user_userID_request") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class PutApiV2UserUserIDRequest { private @Nullable String email; diff --git a/server/user/generated/src/main/java/org/openapitools/model/User.java b/server/user/generated/src/main/java/org/openapitools/model/User.java index 99f7184c..af693206 100644 --- a/server/user/generated/src/main/java/org/openapitools/model/User.java +++ b/server/user/generated/src/main/java/org/openapitools/model/User.java @@ -26,7 +26,7 @@ */ @Schema(name = "User", description = "Object representing a student user in the Meet@Mensa system.") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:31:35.907606713+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") +@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2025-06-27T14:50:25.075958280+02:00[Europe/Berlin]", comments = "Generator version: 7.14.0") public class User { private UUID userID; From 68ae79af127656329bd4687fa1c5345b63b91006 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:52:40 +0200 Subject: [PATCH 17/20] feat: added generated dependency to build files for gateway service --- server/gateway/Dockerfile | 5 +++++ server/gateway/build.gradle | 1 + server/gateway/settings.gradle | 1 + 3 files changed, 7 insertions(+) diff --git a/server/gateway/Dockerfile b/server/gateway/Dockerfile index 151fe28c..dc27e616 100644 --- a/server/gateway/Dockerfile +++ b/server/gateway/Dockerfile @@ -6,6 +6,11 @@ WORKDIR /app COPY build.gradle settings.gradle ./ COPY src ./src +# Copy only necessary files for generated dependencies +COPY generated/build.gradle generated/settings.gradle ./generated/ +COPY generated/src ./generated/src +COPY generated/gradle/libs.versions.toml ./generated/gradle/ + # Build the application RUN gradle clean bootJar --no-daemon diff --git a/server/gateway/build.gradle b/server/gateway/build.gradle index 3e669b8e..825beeef 100644 --- a/server/gateway/build.gradle +++ b/server/gateway/build.gradle @@ -28,6 +28,7 @@ repositories { // } dependencies { + implementation 'org.openapitools:openapi-spring' implementation 'org.springframework.cloud:spring-cloud-starter-gateway:4.2.2' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'io.projectreactor:reactor-test' diff --git a/server/gateway/settings.gradle b/server/gateway/settings.gradle index a239fa03..9e5b4e7e 100644 --- a/server/gateway/settings.gradle +++ b/server/gateway/settings.gradle @@ -1 +1,2 @@ rootProject.name = 'gateway' +includeBuild('generated') \ No newline at end of file From c57cb3fca9008bf052aa55e80ebe399d10fb3537 Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 14:58:24 +0200 Subject: [PATCH 18/20] fix: remove incompatible dependency This may be worth analysing further @a-kori --- server/gateway/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/server/gateway/build.gradle b/server/gateway/build.gradle index 825beeef..5d0f4ccb 100644 --- a/server/gateway/build.gradle +++ b/server/gateway/build.gradle @@ -29,7 +29,6 @@ repositories { dependencies { implementation 'org.openapitools:openapi-spring' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway:4.2.2' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'io.projectreactor:reactor-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' From e1f5085aeb6705eaa3d3d4d87db186bc8940cecd Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 15:09:29 +0200 Subject: [PATCH 19/20] feat: add linting to generation script --- api/scripts/gen_code.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_code.sh index c81c582a..8c177226 100644 --- a/api/scripts/gen_code.sh +++ b/api/scripts/gen_code.sh @@ -1,8 +1,23 @@ #!/bin/bash +# generate code and build files based on openapi spec for springboot backend services + +# dependencies: +# - npm: +# - @openapitools/openapi-generator-cli +# - @redocly/cli +# - other: +# - gradle + +# echo linting +echo "Linting api/openapi.yaml..." + # fail command if any part fails set -euo pipefail +# lint openapi spec +redocly lint api/openapi.yaml + for path in matching user gateway; do # echo generating code From 1b658ecdb382f3cf9ef9503e71f82f3169caeafa Mon Sep 17 00:00:00 2001 From: Guilherme Stark Date: Fri, 27 Jun 2025 15:11:16 +0200 Subject: [PATCH 20/20] refactor: rename gen_code script to gen_spring.sh --- api/scripts/{gen_code.sh => gen_spring.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename api/scripts/{gen_code.sh => gen_spring.sh} (100%) diff --git a/api/scripts/gen_code.sh b/api/scripts/gen_spring.sh similarity index 100% rename from api/scripts/gen_code.sh rename to api/scripts/gen_spring.sh