maybeGenerationResult =
@@ -130,6 +149,9 @@ void generateDataModelForComparison( final TestCase testCase )
.withSapCopyrightHeader(true)
.oneOfAnyOfGenerationEnabled(testCase.anyOfOneOfGenerationEnabled)
.additionalProperty("useAbstractionForFiles", "true")
+ .additionalProperty("pojoBuilderMethodName", testCase.methodBuilder)
+ .additionalProperty("pojoBuildMethodName", testCase.methodBuild)
+ .additionalProperty("pojoConstructorVisibility", testCase.constructorVisibility)
.build();
new DataModelGenerator().generateDataModel(generationConfiguration);
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java
index 37d3e8399..0b194bda5 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java
@@ -255,5 +255,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java
index a3c51f65b..b8d8834f2 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java
@@ -288,5 +288,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java
index 7d38b7a0f..661e7662c 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-json/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java
@@ -255,5 +255,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java
index 37d3e8399..0b194bda5 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/NewSoda.java
@@ -255,5 +255,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java
index a3c51f65b..b8d8834f2 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/Soda.java
@@ -288,5 +288,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java
index 7d38b7a0f..661e7662c 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/api-class-vendor-extension-yaml/output/com/sap/cloud/sdk/services/apiclassvendorextension/model/UpdateSoda.java
@@ -255,5 +255,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject1.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject1.java
index 3c25b5081..cae62201d 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject1.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject1.java
@@ -222,5 +222,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject2.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject2.java
index ea4c3b531..cb7573323 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject2.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject2.java
@@ -223,5 +223,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject3.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject3.java
index 303bc6828..4e37b5a0c 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject3.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/ChildObject3.java
@@ -223,5 +223,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/NestedChildObject.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/NestedChildObject.java
index dee7c1922..f22558347 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/NestedChildObject.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/NestedChildObject.java
@@ -222,5 +222,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObject.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObject.java
index e6f9313f4..3282bf14a 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObject.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObject.java
@@ -172,5 +172,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObjectQuestionsInner.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObjectQuestionsInner.java
index d9e37ced5..24b5dbd53 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObjectQuestionsInner.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-anyof-oneof/output/com/sap/cloud/sdk/services/anyofoneof/model/RootObjectQuestionsInner.java
@@ -225,5 +225,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/input/sodastore.JSON b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/input/sodastore.JSON
new file mode 100644
index 000000000..5788837ca
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/input/sodastore.JSON
@@ -0,0 +1,224 @@
+{
+ "openapi": "3.0.0",
+ "info": {
+ "title": "Soda Store API",
+ "version": "1.0.0",
+ "description": "API for managing sodas in a soda store"
+ },
+ "paths": {
+ "/sodas": {
+ "get": {
+ "summary": "Get a list of all sodas",
+ "x-sap-cloud-sdk-api-name": "AwesomeSodas",
+ "operationId": "getSodas",
+ "responses": {
+ "200": {
+ "description": "A list of sodas",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Soda"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "summary": "Add a new soda to the store",
+ "x-sap-cloud-sdk-api-name": "AwesomeSoda",
+ "operationId": "addSoda",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewSoda"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "The newly added soda",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Soda"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/sodas/{sodaId}": {
+ "get": {
+ "summary": "Get details of a specific soda",
+ "operationId": "getSodaById",
+ "parameters": [
+ {
+ "name": "sodaId",
+ "in": "path",
+ "description": "ID of the soda to retrieve",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "The requested soda",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Soda"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Soda not found"
+ }
+ }
+ },
+ "put": {
+ "summary": "Update details of a specific soda",
+ "operationId": "updateSodaById",
+ "parameters": [
+ {
+ "name": "sodaId",
+ "in": "path",
+ "description": "ID of the soda to update",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/UpdateSoda"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "The updated soda",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Soda"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Soda not found"
+ }
+ }
+ },
+ "delete": {
+ "summary": "Delete a specific soda from the store",
+ "operationId": "deleteSodaById",
+ "parameters": [
+ {
+ "name": "sodaId",
+ "in": "path",
+ "description": "ID of the soda to delete",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "Soda successfully deleted"
+ },
+ "404": {
+ "description": "Soda not found"
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "Soda": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "name": {
+ "type": "string"
+ },
+ "brand": {
+ "type": "string"
+ },
+ "flavors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "price": {
+ "type": "number",
+ "format": "float"
+ }
+ },
+ "required": ["name", "brand", "flavors", "price"]
+ },
+ "NewSoda": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "brand": {
+ "type": "string"
+ },
+ "flavor": {
+ "type": "string"
+ },
+ "price": {
+ "type": "number",
+ "format": "float"
+ }
+ },
+ "required": ["name", "brand", "flavor", "price"]
+ },
+ "UpdateSoda": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "brand": {
+ "type": "string"
+ },
+ "flavor": {
+ "type": "string"
+ },
+ "price": {
+ "type": "number",
+ "format": "float"
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/AwesomeSodaApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/AwesomeSodaApi.java
new file mode 100644
index 000000000..8399fe9d2
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/AwesomeSodaApi.java
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+
+package com.sap.cloud.sdk.services.builder.api;
+
+import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse;
+import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
+import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
+
+import com.sap.cloud.sdk.services.builder.model.NewSoda;
+import com.sap.cloud.sdk.services.builder.model.Soda;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.util.UriComponentsBuilder;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import com.google.common.annotations.Beta;
+
+import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
+
+/**
+* Soda Store API in version 1.0.0.
+*
+* API for managing sodas in a soda store
+*/
+
+public class AwesomeSodaApi extends AbstractOpenApiService {
+ /**
+ * Instantiates this API class to invoke operations on the Soda Store API.
+ *
+ * @param httpDestination The destination that API should be used with
+ */
+ public AwesomeSodaApi( @Nonnull final Destination httpDestination )
+ {
+ super(httpDestination);
+ }
+
+ /**
+ * Instantiates this API class to invoke operations on the Soda Store API based on a given {@link ApiClient}.
+ *
+ * @param apiClient
+ * ApiClient to invoke the API on
+ */
+ @Beta
+ public AwesomeSodaApi( @Nonnull final ApiClient apiClient )
+ {
+ super(apiClient);
+ }
+
+ /**
+ * Add a new soda to the store
+ *
+ * 201 - The newly added soda
+* @param newSoda
+ The value for the parameter newSoda
+* @return Soda
+* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nullable public Soda addSoda( @Nonnull final NewSoda newSoda) throws OpenApiRequestException {
+ final Object localVarPostBody = newSoda;
+
+ // verify the required parameter 'newSoda' is set
+ if (newSoda == null) {
+ throw new OpenApiRequestException("Missing the required parameter 'newSoda' when calling addSoda");
+ }
+
+ final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] { };
+
+ final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(localVarPath, HttpMethod.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/AwesomeSodasApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/AwesomeSodasApi.java
new file mode 100644
index 000000000..5074247a7
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/AwesomeSodasApi.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+
+package com.sap.cloud.sdk.services.builder.api;
+
+import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse;
+import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
+import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
+
+import com.sap.cloud.sdk.services.builder.model.Soda;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.util.UriComponentsBuilder;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import com.google.common.annotations.Beta;
+
+import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
+
+/**
+* Soda Store API in version 1.0.0.
+*
+* API for managing sodas in a soda store
+*/
+
+public class AwesomeSodasApi extends AbstractOpenApiService {
+ /**
+ * Instantiates this API class to invoke operations on the Soda Store API.
+ *
+ * @param httpDestination The destination that API should be used with
+ */
+ public AwesomeSodasApi( @Nonnull final Destination httpDestination )
+ {
+ super(httpDestination);
+ }
+
+ /**
+ * Instantiates this API class to invoke operations on the Soda Store API based on a given {@link ApiClient}.
+ *
+ * @param apiClient
+ * ApiClient to invoke the API on
+ */
+ @Beta
+ public AwesomeSodasApi( @Nonnull final ApiClient apiClient )
+ {
+ super(apiClient);
+ }
+
+ /**
+ * Get a list of all sodas
+ *
+ * 200 - A list of sodas
+* @return List<Soda>
+* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nullable public List getSodas() throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ final String localVarPath = UriComponentsBuilder.fromPath("/sodas").build().toUriString();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] { };
+
+ final ParameterizedTypeReference> localVarReturnType = new ParameterizedTypeReference>() {};
+ return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/DefaultApi.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/DefaultApi.java
new file mode 100644
index 000000000..4fb038a36
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/api/DefaultApi.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+
+package com.sap.cloud.sdk.services.builder.api;
+
+import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;
+import com.sap.cloud.sdk.services.openapi.core.OpenApiResponse;
+import com.sap.cloud.sdk.services.openapi.core.AbstractOpenApiService;
+import com.sap.cloud.sdk.services.openapi.apiclient.ApiClient;
+
+import com.sap.cloud.sdk.services.builder.model.Soda;
+import com.sap.cloud.sdk.services.builder.model.UpdateSoda;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import org.springframework.util.LinkedMultiValueMap;
+import org.springframework.util.MultiValueMap;
+import org.springframework.web.util.UriComponentsBuilder;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.io.FileSystemResource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import com.google.common.annotations.Beta;
+
+import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
+
+/**
+* Soda Store API in version 1.0.0.
+*
+* API for managing sodas in a soda store
+*/
+
+public class DefaultApi extends AbstractOpenApiService {
+ /**
+ * Instantiates this API class to invoke operations on the Soda Store API.
+ *
+ * @param httpDestination The destination that API should be used with
+ */
+ public DefaultApi( @Nonnull final Destination httpDestination )
+ {
+ super(httpDestination);
+ }
+
+ /**
+ * Instantiates this API class to invoke operations on the Soda Store API based on a given {@link ApiClient}.
+ *
+ * @param apiClient
+ * ApiClient to invoke the API on
+ */
+ @Beta
+ public DefaultApi( @Nonnull final ApiClient apiClient )
+ {
+ super(apiClient);
+ }
+
+ /**
+ * Delete a specific soda from the store
+ *
+ * 204 - Soda successfully deleted
+ *
404 - Soda not found
+* @param sodaId
+ ID of the soda to delete
+* @return An OpenApiResponse containing the status code of the HttpResponse.
+* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nonnull public OpenApiResponse deleteSodaById( @Nonnull final Long sodaId) throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'sodaId' is set
+ if (sodaId == null) {
+ throw new OpenApiRequestException("Missing the required parameter 'sodaId' when calling deleteSodaById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("sodaId", sodaId);
+ final String localVarPath = UriComponentsBuilder.fromPath("/sodas/{sodaId}").buildAndExpand(localVarPathParams).toUriString();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = { };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] { };
+
+ final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
+ apiClient.invokeAPI(localVarPath, HttpMethod.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ return new OpenApiResponse(apiClient);
+ }
+ /**
+ * Get details of a specific soda
+ *
+ * 200 - The requested soda
+ *
404 - Soda not found
+* @param sodaId
+ ID of the soda to retrieve
+* @return Soda
+* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nullable public Soda getSodaById( @Nonnull final Long sodaId) throws OpenApiRequestException {
+ final Object localVarPostBody = null;
+
+ // verify the required parameter 'sodaId' is set
+ if (sodaId == null) {
+ throw new OpenApiRequestException("Missing the required parameter 'sodaId' when calling getSodaById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("sodaId", sodaId);
+ final String localVarPath = UriComponentsBuilder.fromPath("/sodas/{sodaId}").buildAndExpand(localVarPathParams).toUriString();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = { };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] { };
+
+ final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(localVarPath, HttpMethod.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+ /**
+ * Update details of a specific soda
+ *
+ * 200 - The updated soda
+ *
404 - Soda not found
+* @param sodaId
+ ID of the soda to update
+* @param updateSoda
+ The value for the parameter updateSoda
+* @return Soda
+* @throws OpenApiRequestException if an error occurs while attempting to invoke the API
+ */
+ @Nullable public Soda updateSodaById( @Nonnull final Long sodaId, @Nonnull final UpdateSoda updateSoda) throws OpenApiRequestException {
+ final Object localVarPostBody = updateSoda;
+
+ // verify the required parameter 'sodaId' is set
+ if (sodaId == null) {
+ throw new OpenApiRequestException("Missing the required parameter 'sodaId' when calling updateSodaById");
+ }
+
+ // verify the required parameter 'updateSoda' is set
+ if (updateSoda == null) {
+ throw new OpenApiRequestException("Missing the required parameter 'updateSoda' when calling updateSodaById");
+ }
+
+ // create path and map variables
+ final Map localVarPathParams = new HashMap();
+ localVarPathParams.put("sodaId", sodaId);
+ final String localVarPath = UriComponentsBuilder.fromPath("/sodas/{sodaId}").buildAndExpand(localVarPathParams).toUriString();
+
+ final MultiValueMap localVarQueryParams = new LinkedMultiValueMap();
+ final HttpHeaders localVarHeaderParams = new HttpHeaders();
+ final MultiValueMap localVarFormParams = new LinkedMultiValueMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+
+ final String[] localVarAuthNames = new String[] { };
+
+ final ParameterizedTypeReference localVarReturnType = new ParameterizedTypeReference() {};
+ return apiClient.invokeAPI(localVarPath, HttpMethod.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
+ }
+}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java
new file mode 100644
index 000000000..5436584f0
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/NewSoda.java
@@ -0,0 +1,326 @@
+/*
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+
+/*
+ * Soda Store API
+ * API for managing sodas in a soda store
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.cloud.sdk.services.builder.model;
+
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import com.fasterxml.jackson.annotation.JsonInclude;
+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.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * NewSoda
+ */
+
+// CHECKSTYLE:OFF
+public class NewSoda
+// CHECKSTYLE:ON
+{
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("brand")
+ private String brand;
+
+ @JsonProperty("flavor")
+ private String flavor;
+
+ @JsonProperty("price")
+ private Float price;
+
+ @JsonAnySetter
+ @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+ private NewSoda() { }
+
+ /**
+ * Set the name of this {@link NewSoda} instance and return the same instance.
+ *
+ * @param name The name of this {@link NewSoda}
+ * @return The same instance of this {@link NewSoda} class
+ */
+ @Nonnull public NewSoda name(@Nonnull final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name The name of this {@link NewSoda} instance.
+ **/
+ @Nonnull public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the name of this {@link NewSoda} instance.
+ *
+ * @param name The name of this {@link NewSoda}
+ */
+ public void setName( @Nonnull final String name) {
+ this.name = name;
+ }
+
+ /**
+ * Set the brand of this {@link NewSoda} instance and return the same instance.
+ *
+ * @param brand The brand of this {@link NewSoda}
+ * @return The same instance of this {@link NewSoda} class
+ */
+ @Nonnull public NewSoda brand(@Nonnull final String brand) {
+ this.brand = brand;
+ return this;
+ }
+
+ /**
+ * Get brand
+ * @return brand The brand of this {@link NewSoda} instance.
+ **/
+ @Nonnull public String getBrand() {
+ return brand;
+ }
+
+ /**
+ * Set the brand of this {@link NewSoda} instance.
+ *
+ * @param brand The brand of this {@link NewSoda}
+ */
+ public void setBrand( @Nonnull final String brand) {
+ this.brand = brand;
+ }
+
+ /**
+ * Set the flavor of this {@link NewSoda} instance and return the same instance.
+ *
+ * @param flavor The flavor of this {@link NewSoda}
+ * @return The same instance of this {@link NewSoda} class
+ */
+ @Nonnull public NewSoda flavor(@Nonnull final String flavor) {
+ this.flavor = flavor;
+ return this;
+ }
+
+ /**
+ * Get flavor
+ * @return flavor The flavor of this {@link NewSoda} instance.
+ **/
+ @Nonnull public String getFlavor() {
+ return flavor;
+ }
+
+ /**
+ * Set the flavor of this {@link NewSoda} instance.
+ *
+ * @param flavor The flavor of this {@link NewSoda}
+ */
+ public void setFlavor( @Nonnull final String flavor) {
+ this.flavor = flavor;
+ }
+
+ /**
+ * Set the price of this {@link NewSoda} instance and return the same instance.
+ *
+ * @param price The price of this {@link NewSoda}
+ * @return The same instance of this {@link NewSoda} class
+ */
+ @Nonnull public NewSoda price(@Nonnull final Float price) {
+ this.price = price;
+ return this;
+ }
+
+ /**
+ * Get price
+ * @return price The price of this {@link NewSoda} instance.
+ **/
+ @Nonnull public Float getPrice() {
+ return price;
+ }
+
+ /**
+ * Set the price of this {@link NewSoda} instance.
+ *
+ * @param price The price of this {@link NewSoda}
+ */
+ public void setPrice( @Nonnull final Float price) {
+ this.price = price;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link NewSoda}.
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link NewSoda} instance.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if( !cloudSdkCustomFields.containsKey(name) ) {
+ throw new NoSuchElementException("NewSoda has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link NewSoda} instance. If the map previously contained a mapping
+ * for the key, the old value is replaced by the specified value.
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue )
+ {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final NewSoda newSoda = (NewSoda) o;
+ return Objects.equals(this.cloudSdkCustomFields, newSoda.cloudSdkCustomFields) &&
+ Objects.equals(this.name, newSoda.name) &&
+ Objects.equals(this.brand, newSoda.brand) &&
+ Objects.equals(this.flavor, newSoda.flavor) &&
+ Objects.equals(this.price, newSoda.price);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, brand, flavor, price, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class NewSoda {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" brand: ").append(toIndentedString(brand)).append("\n");
+ sb.append(" flavor: ").append(toIndentedString(flavor)).append("\n");
+ sb.append(" price: ").append(toIndentedString(price)).append("\n");
+ cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link NewSoda} instance with all required arguments.
+ */
+ public static Builder builder() {
+ return (name) -> (brand) -> (flavor) -> (price) -> () -> new NewSoda().name(name).brand(brand).flavor(flavor).price(price);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder {
+ /**
+ * Set the name of this {@link NewSoda} instance.
+ *
+ * @param name The name of this {@link NewSoda}
+ * @return The NewSoda builder.
+ */
+ Builder1 name( @Nonnull final String name);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder1 {
+ /**
+ * Set the brand of this {@link NewSoda} instance.
+ *
+ * @param brand The brand of this {@link NewSoda}
+ * @return The NewSoda builder.
+ */
+ Builder2 brand( @Nonnull final String brand);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder2 {
+ /**
+ * Set the flavor of this {@link NewSoda} instance.
+ *
+ * @param flavor The flavor of this {@link NewSoda}
+ * @return The NewSoda builder.
+ */
+ Builder3 flavor( @Nonnull final String flavor);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder3 {
+ /**
+ * Set the price of this {@link NewSoda} instance.
+ *
+ * @param price The price of this {@link NewSoda}
+ * @return The NewSoda instance.
+ */
+ Builder4 price( @Nonnull final Float price);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder4 {
+ /**
+ * Finalize the builder for new {@link NewSoda} instance.
+ *
+ * @return The NewSoda instance.
+ */
+ NewSoda build();
+ }
+
+}
+
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java
new file mode 100644
index 000000000..c7e6d84ea
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/Soda.java
@@ -0,0 +1,383 @@
+/*
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+
+/*
+ * Soda Store API
+ * API for managing sodas in a soda store
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.cloud.sdk.services.builder.model;
+
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import com.fasterxml.jackson.annotation.JsonInclude;
+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.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * Soda
+ */
+
+// CHECKSTYLE:OFF
+public class Soda
+// CHECKSTYLE:ON
+{
+ @JsonProperty("id")
+ private Long id;
+
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("brand")
+ private String brand;
+
+ @JsonProperty("flavors")
+ private List flavors = new ArrayList<>();
+
+ @JsonProperty("price")
+ private Float price;
+
+ @JsonAnySetter
+ @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+ private Soda() { }
+
+ /**
+ * Set the id of this {@link Soda} instance and return the same instance.
+ *
+ * @param id The id of this {@link Soda}
+ * @return The same instance of this {@link Soda} class
+ */
+ @Nonnull public Soda id(@Nonnull final Long id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get id
+ * @return id The id of this {@link Soda} instance.
+ **/
+ @Nonnull public Long getId() {
+ return id;
+ }
+
+ /**
+ * Set the id of this {@link Soda} instance.
+ *
+ * @param id The id of this {@link Soda}
+ */
+ public void setId( @Nonnull final Long id) {
+ this.id = id;
+ }
+
+ /**
+ * Set the name of this {@link Soda} instance and return the same instance.
+ *
+ * @param name The name of this {@link Soda}
+ * @return The same instance of this {@link Soda} class
+ */
+ @Nonnull public Soda name(@Nonnull final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name The name of this {@link Soda} instance.
+ **/
+ @Nonnull public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the name of this {@link Soda} instance.
+ *
+ * @param name The name of this {@link Soda}
+ */
+ public void setName( @Nonnull final String name) {
+ this.name = name;
+ }
+
+ /**
+ * Set the brand of this {@link Soda} instance and return the same instance.
+ *
+ * @param brand The brand of this {@link Soda}
+ * @return The same instance of this {@link Soda} class
+ */
+ @Nonnull public Soda brand(@Nonnull final String brand) {
+ this.brand = brand;
+ return this;
+ }
+
+ /**
+ * Get brand
+ * @return brand The brand of this {@link Soda} instance.
+ **/
+ @Nonnull public String getBrand() {
+ return brand;
+ }
+
+ /**
+ * Set the brand of this {@link Soda} instance.
+ *
+ * @param brand The brand of this {@link Soda}
+ */
+ public void setBrand( @Nonnull final String brand) {
+ this.brand = brand;
+ }
+
+ /**
+ * Set the flavors of this {@link Soda} instance and return the same instance.
+ *
+ * @param flavors The flavors of this {@link Soda}
+ * @return The same instance of this {@link Soda} class
+ */
+ @Nonnull public Soda flavors(@Nonnull final List flavors) {
+ this.flavors = flavors;
+ return this;
+ }
+ /**
+ * Add one flavors instance to this {@link Soda}.
+ * @param flavorsItem The flavors that should be added
+ * @return The same instance of type {@link Soda}
+ */
+ @Nonnull public Soda addFlavorsItem( @Nonnull final String flavorsItem) {
+ if (this.flavors == null) {
+ this.flavors = new ArrayList<>();
+ }
+ this.flavors.add(flavorsItem);
+ return this;
+ }
+
+ /**
+ * Get flavors
+ * @return flavors The flavors of this {@link Soda} instance.
+ **/
+ @Nonnull public List getFlavors() {
+ return flavors;
+ }
+
+ /**
+ * Set the flavors of this {@link Soda} instance.
+ *
+ * @param flavors The flavors of this {@link Soda}
+ */
+ public void setFlavors( @Nonnull final List flavors) {
+ this.flavors = flavors;
+ }
+
+ /**
+ * Set the price of this {@link Soda} instance and return the same instance.
+ *
+ * @param price The price of this {@link Soda}
+ * @return The same instance of this {@link Soda} class
+ */
+ @Nonnull public Soda price(@Nonnull final Float price) {
+ this.price = price;
+ return this;
+ }
+
+ /**
+ * Get price
+ * @return price The price of this {@link Soda} instance.
+ **/
+ @Nonnull public Float getPrice() {
+ return price;
+ }
+
+ /**
+ * Set the price of this {@link Soda} instance.
+ *
+ * @param price The price of this {@link Soda}
+ */
+ public void setPrice( @Nonnull final Float price) {
+ this.price = price;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link Soda}.
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link Soda} instance.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if( !cloudSdkCustomFields.containsKey(name) ) {
+ throw new NoSuchElementException("Soda has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link Soda} instance. If the map previously contained a mapping
+ * for the key, the old value is replaced by the specified value.
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue )
+ {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final Soda soda = (Soda) o;
+ return Objects.equals(this.cloudSdkCustomFields, soda.cloudSdkCustomFields) &&
+ Objects.equals(this.id, soda.id) &&
+ Objects.equals(this.name, soda.name) &&
+ Objects.equals(this.brand, soda.brand) &&
+ Objects.equals(this.flavors, soda.flavors) &&
+ Objects.equals(this.price, soda.price);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, brand, flavors, price, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class Soda {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" brand: ").append(toIndentedString(brand)).append("\n");
+ sb.append(" flavors: ").append(toIndentedString(flavors)).append("\n");
+ sb.append(" price: ").append(toIndentedString(price)).append("\n");
+ cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a type-safe, fluent-api builder object to construct a new {@link Soda} instance with all required arguments.
+ */
+ public static Builder builder() {
+ return (name) -> (brand) -> (flavors) -> (price) -> () -> new Soda().name(name).brand(brand).flavors(flavors).price(price);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder {
+ /**
+ * Set the name of this {@link Soda} instance.
+ *
+ * @param name The name of this {@link Soda}
+ * @return The Soda builder.
+ */
+ Builder1 name( @Nonnull final String name);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder1 {
+ /**
+ * Set the brand of this {@link Soda} instance.
+ *
+ * @param brand The brand of this {@link Soda}
+ * @return The Soda builder.
+ */
+ Builder2 brand( @Nonnull final String brand);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder2 {
+ /**
+ * Set the flavors of this {@link Soda} instance.
+ *
+ * @param flavors The flavors of this {@link Soda}
+ * @return The Soda builder.
+ */
+ Builder3 flavors( @Nonnull final List flavors);
+ /**
+ * Set the flavors of this {@link Soda} instance.
+ *
+ * @param flavors The flavors of this {@link Soda}
+ * @return The Soda builder.
+ */
+ default Builder3 flavors( @Nonnull final String... flavors) {
+ return flavors(Arrays.asList(flavors));
+ }
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder3 {
+ /**
+ * Set the price of this {@link Soda} instance.
+ *
+ * @param price The price of this {@link Soda}
+ * @return The Soda instance.
+ */
+ Builder4 price( @Nonnull final Float price);
+ }
+ /**
+ * Builder helper class.
+ */
+ public interface Builder4 {
+ /**
+ * Finalize the builder for new {@link Soda} instance.
+ *
+ * @return The Soda instance.
+ */
+ Soda build();
+ }
+
+}
+
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java
new file mode 100644
index 000000000..b80a805c9
--- /dev/null
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-builder/output/com/sap/cloud/sdk/services/builder/model/UpdateSoda.java
@@ -0,0 +1,267 @@
+/*
+ * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved.
+ */
+
+/*
+ * Soda Store API
+ * API for managing sodas in a soda store
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+package com.sap.cloud.sdk.services.builder.model;
+
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.Objects;
+import java.util.Set;
+import com.fasterxml.jackson.annotation.JsonInclude;
+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.io.Serializable;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
+/**
+ * UpdateSoda
+ */
+
+// CHECKSTYLE:OFF
+public class UpdateSoda
+// CHECKSTYLE:ON
+{
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("brand")
+ private String brand;
+
+ @JsonProperty("flavor")
+ private String flavor;
+
+ @JsonProperty("price")
+ private Float price;
+
+ @JsonAnySetter
+ @JsonAnyGetter
+ private final Map cloudSdkCustomFields = new LinkedHashMap<>();
+ private UpdateSoda() { }
+
+ /**
+ * Set the name of this {@link UpdateSoda} instance and return the same instance.
+ *
+ * @param name The name of this {@link UpdateSoda}
+ * @return The same instance of this {@link UpdateSoda} class
+ */
+ @Nonnull public UpdateSoda name(@Nonnull final String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name The name of this {@link UpdateSoda} instance.
+ **/
+ @Nonnull public String getName() {
+ return name;
+ }
+
+ /**
+ * Set the name of this {@link UpdateSoda} instance.
+ *
+ * @param name The name of this {@link UpdateSoda}
+ */
+ public void setName( @Nonnull final String name) {
+ this.name = name;
+ }
+
+ /**
+ * Set the brand of this {@link UpdateSoda} instance and return the same instance.
+ *
+ * @param brand The brand of this {@link UpdateSoda}
+ * @return The same instance of this {@link UpdateSoda} class
+ */
+ @Nonnull public UpdateSoda brand(@Nonnull final String brand) {
+ this.brand = brand;
+ return this;
+ }
+
+ /**
+ * Get brand
+ * @return brand The brand of this {@link UpdateSoda} instance.
+ **/
+ @Nonnull public String getBrand() {
+ return brand;
+ }
+
+ /**
+ * Set the brand of this {@link UpdateSoda} instance.
+ *
+ * @param brand The brand of this {@link UpdateSoda}
+ */
+ public void setBrand( @Nonnull final String brand) {
+ this.brand = brand;
+ }
+
+ /**
+ * Set the flavor of this {@link UpdateSoda} instance and return the same instance.
+ *
+ * @param flavor The flavor of this {@link UpdateSoda}
+ * @return The same instance of this {@link UpdateSoda} class
+ */
+ @Nonnull public UpdateSoda flavor(@Nonnull final String flavor) {
+ this.flavor = flavor;
+ return this;
+ }
+
+ /**
+ * Get flavor
+ * @return flavor The flavor of this {@link UpdateSoda} instance.
+ **/
+ @Nonnull public String getFlavor() {
+ return flavor;
+ }
+
+ /**
+ * Set the flavor of this {@link UpdateSoda} instance.
+ *
+ * @param flavor The flavor of this {@link UpdateSoda}
+ */
+ public void setFlavor( @Nonnull final String flavor) {
+ this.flavor = flavor;
+ }
+
+ /**
+ * Set the price of this {@link UpdateSoda} instance and return the same instance.
+ *
+ * @param price The price of this {@link UpdateSoda}
+ * @return The same instance of this {@link UpdateSoda} class
+ */
+ @Nonnull public UpdateSoda price(@Nonnull final Float price) {
+ this.price = price;
+ return this;
+ }
+
+ /**
+ * Get price
+ * @return price The price of this {@link UpdateSoda} instance.
+ **/
+ @Nonnull public Float getPrice() {
+ return price;
+ }
+
+ /**
+ * Set the price of this {@link UpdateSoda} instance.
+ *
+ * @param price The price of this {@link UpdateSoda}
+ */
+ public void setPrice( @Nonnull final Float price) {
+ this.price = price;
+ }
+
+ /**
+ * Get the names of the unrecognizable properties of the {@link UpdateSoda}.
+ * @return The set of properties names
+ */
+ @JsonIgnore
+ @Nonnull
+ public Set getCustomFieldNames() {
+ return cloudSdkCustomFields.keySet();
+ }
+
+ /**
+ * Get the value of an unrecognizable property of this {@link UpdateSoda} instance.
+ * @param name The name of the property
+ * @return The value of the property
+ * @throws NoSuchElementException If no property with the given name could be found.
+ */
+ @Nullable
+ public Object getCustomField(@Nonnull final String name) throws NoSuchElementException {
+ if( !cloudSdkCustomFields.containsKey(name) ) {
+ throw new NoSuchElementException("UpdateSoda has no field with name '" + name + "'.");
+ }
+ return cloudSdkCustomFields.get(name);
+ }
+
+ /**
+ * Set an unrecognizable property of this {@link UpdateSoda} instance. If the map previously contained a mapping
+ * for the key, the old value is replaced by the specified value.
+ * @param customFieldName The name of the property
+ * @param customFieldValue The value of the property
+ */
+ @JsonIgnore
+ public void setCustomField( @Nonnull String customFieldName, @Nullable Object customFieldValue )
+ {
+ cloudSdkCustomFields.put(customFieldName, customFieldValue);
+ }
+
+
+ @Override
+ public boolean equals(@Nullable final java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ final UpdateSoda updateSoda = (UpdateSoda) o;
+ return Objects.equals(this.cloudSdkCustomFields, updateSoda.cloudSdkCustomFields) &&
+ Objects.equals(this.name, updateSoda.name) &&
+ Objects.equals(this.brand, updateSoda.brand) &&
+ Objects.equals(this.flavor, updateSoda.flavor) &&
+ Objects.equals(this.price, updateSoda.price);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, brand, flavor, price, cloudSdkCustomFields);
+ }
+
+ @Override
+ @Nonnull public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append("class UpdateSoda {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" brand: ").append(toIndentedString(brand)).append("\n");
+ sb.append(" flavor: ").append(toIndentedString(flavor)).append("\n");
+ sb.append(" price: ").append(toIndentedString(price)).append("\n");
+ cloudSdkCustomFields.forEach((k,v) -> sb.append(" ").append(k).append(": ").append(toIndentedString(v)).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(final java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+ /**
+ * Create a new {@link UpdateSoda} instance. No arguments are required.
+ */
+ public static UpdateSoda builder() {
+ return new UpdateSoda();
+ }
+
+}
+
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/NewSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/NewSoda.java
index fd191dfa0..601a5fc78 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/NewSoda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/NewSoda.java
@@ -255,5 +255,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java
index 124f984e2..b16001383 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/Soda.java
@@ -288,5 +288,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}
diff --git a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java
index 63cab69b1..07ff63082 100644
--- a/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java
+++ b/datamodel/openapi/openapi-generator/src/test/resources/DataModelGeneratorIntegrationTest/input-spec-with-uppercase-file-extension/output/com/sap/cloud/sdk/services/uppercasefileextension/model/UpdateSoda.java
@@ -255,5 +255,6 @@ private String toIndentedString(final java.lang.Object o) {
return o.toString().replace("\n", "\n ");
}
+
}