diff --git a/commercetools/commercetools-sdk-java-ml/build.gradle b/commercetools/commercetools-sdk-java-ml/build.gradle deleted file mode 100644 index cd52df168d9..00000000000 --- a/commercetools/commercetools-sdk-java-ml/build.gradle +++ /dev/null @@ -1,13 +0,0 @@ -dependencies { - api project(':rmf:rmf-java-base') - api jackson_core.annotations - api jackson_core.databind - implementation google.findbugs - implementation javax.validation - api commons.lang3 - - integrationTestImplementation project(':commercetools:commercetools-http-client') -} - -sourceSets.main.java.srcDirs += "src/main/java-generated" -sourceSets.test.java.srcDirs += "src/test/java-generated" diff --git a/commercetools/commercetools-sdk-java-ml/src/gen.properties b/commercetools/commercetools-sdk-java-ml/src/gen.properties deleted file mode 100644 index a88da49e822..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/gen.properties +++ /dev/null @@ -1 +0,0 @@ -hash=dbbb1c7a25517323ec1c04d89f98cfa9a54d1abe diff --git a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/MLAPITest.java b/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/MLAPITest.java deleted file mode 100644 index 01909d8168d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/MLAPITest.java +++ /dev/null @@ -1,52 +0,0 @@ - -package com.commercetools.api; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.awaitility.Awaitility.await; - -import java.util.concurrent.TimeUnit; - -import com.commercetools.ml.models.common.TaskStatusEnum; -import com.commercetools.ml.models.common.TaskToken; -import com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse; -import com.commercetools.ml.models.similar_products.SimilarProductSearchRequestBuilder; -import com.commercetools.ml.models.similar_products.SimilarProductsTaskStatus; - -import io.vrap.rmf.base.client.ApiHttpResponse; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class MLAPITest extends TestBase { - - @Test - public void generalRecommendationsTest() { - - ApiHttpResponse response = mlApiBuilder.recommendations() - .generalCategories() - .get() - .withProductName("vase") - .executeBlocking(); - assertThat(response.getStatusCode()).isEqualTo(200); - } - - @Disabled - @Test - public void similaritiesTest() { - ApiHttpResponse tokenApiHttpResponse = mlApiBuilder.similarities() - .products() - .post(new SimilarProductSearchRequestBuilder().build()) - .executeBlocking(); - - assertThat(tokenApiHttpResponse.getStatusCode()).isEqualTo(202); - await().atMost(30, TimeUnit.SECONDS) - .pollInterval(2, TimeUnit.SECONDS) - .untilAsserted(() -> assertThat( - getSimilarProducts(tokenApiHttpResponse.getBody().getTaskId()).getBody().getState()) - .isEqualTo(TaskStatusEnum.SUCCESS)); - } - - public ApiHttpResponse getSimilarProducts(final String taskId) { - return mlApiBuilder.similarities().products().status().withTaskId(taskId).get().executeBlocking(); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/TestBase.java b/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/TestBase.java deleted file mode 100644 index 5b6e50481ea..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/TestBase.java +++ /dev/null @@ -1,30 +0,0 @@ - -package com.commercetools.api; - -import java.util.Optional; - -import com.commercetools.ml.client.ByProjectKeyRequestBuilder; -import com.commercetools.ml.defaultconfig.MLApiRootBuilder; -import com.commercetools.ml.defaultconfig.ServiceRegion; - -import io.vrap.rmf.base.client.oauth2.ClientCredentials; - -public class TestBase { - - public final String projectKey = requireEnvVar("CTP_PROJECT_KEY"); - public final String clientId = requireEnvVar("CTP_CLIENT_ID"); - public final String clientSecret = requireEnvVar("CTP_CLIENT_SECRET"); - public final String tokenUrl = ServiceRegion.GCP_EUROPE.getOAuthTokenUrl(); - public final String ml_host = ServiceRegion.GCP_EUROPE.getApiUrl(); - - public final ByProjectKeyRequestBuilder mlApiBuilder = MLApiRootBuilder.of() - .defaultClient(ClientCredentials.of().withClientId(clientId).withClientSecret(clientSecret).build(), - tokenUrl, ml_host) - .buildForProject(projectKey); - - public static String requireEnvVar(String varName) { - return Optional.ofNullable(System.getenv(varName)) - .orElseThrow(() -> new RuntimeException("Cannot find environment variable '" + varName + "'")); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/UploadImageTest.java b/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/UploadImageTest.java deleted file mode 100644 index ff719a94b60..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/UploadImageTest.java +++ /dev/null @@ -1,29 +0,0 @@ - -package com.commercetools.api; - -import static org.assertj.core.api.Assertions.assertThat; - -import java.io.File; - -import com.commercetools.ml.models.image_search.ImageSearchResponse; -import com.fasterxml.jackson.core.JsonProcessingException; - -import io.vrap.rmf.base.client.ApiHttpResponse; - -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -public class UploadImageTest extends TestBase { - - @Disabled - @Test - public void uploadImageTest() throws JsonProcessingException { - - ApiHttpResponse response = mlApiBuilder.imageSearch() - .post(new File("src/test/resources/example_flower.jpg")) - .addHeader("Content-Type", "image/jpeg") - .executeBlocking(); - assertThat(response.getStatusCode()).isEqualTo(200); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/client/ProjectApiRootTest.java b/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/client/ProjectApiRootTest.java deleted file mode 100644 index a2e542904c6..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/integrationTest/java/com/commercetools/api/client/ProjectApiRootTest.java +++ /dev/null @@ -1,44 +0,0 @@ - -package com.commercetools.api.client; - -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.util.List; -import java.util.stream.Collectors; - -import com.commercetools.ml.client.ByProjectKeyRequestBuilder; -import com.commercetools.ml.client.ProjectScopedApiRoot; - -import org.assertj.core.api.Assertions; -import org.assertj.core.util.Lists; -import org.junit.jupiter.api.Test; - -public class ProjectApiRootTest { - - private static final List ignoreMethods = Lists.newArrayList(); - - /** - * Retrieves all public methods of the {@link ProjectScopedApiRoot} and the public methods of the {@link ByProjectKeyRequestBuilder} and - * checks if project request builder methods are present in ProjectApiRoot methods - */ - @Test - public void allSubResourcesSupported() { - - final List projectApiRootMethods = Lists.newArrayList(ProjectScopedApiRoot.class.getDeclaredMethods()) - .stream() - .filter(method -> Modifier.isPublic(method.getModifiers())) - .map(Method::getName) - .distinct() - .collect(Collectors.toList()); - - final List resourceMethods = Lists.newArrayList(ByProjectKeyRequestBuilder.class.getDeclaredMethods()) - .stream() - .filter(method -> Modifier.isPublic(method.getModifiers())) - .map(Method::getName) - .filter(methodName -> !ignoreMethods.contains(methodName)) - .filter(methodName -> !projectApiRootMethods.contains(methodName)) - .collect(Collectors.toList()); - - Assertions.assertThat(resourceMethods).isEmpty(); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/integrationTest/resources/example_flower.jpg b/commercetools/commercetools-sdk-java-ml/src/integrationTest/resources/example_flower.jpg deleted file mode 100644 index b0f2052e045..00000000000 Binary files a/commercetools/commercetools-sdk-java-ml/src/integrationTest/resources/example_flower.jpg and /dev/null differ diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ApiRoot.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ApiRoot.java deleted file mode 100644 index b3245038a41..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ApiRoot.java +++ /dev/null @@ -1,46 +0,0 @@ - -package com.commercetools.ml.client; - -import java.io.Closeable; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.SerializerOnlyApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * Entrypoint for building requests against the API - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ApiRoot implements Closeable { - - private final ApiHttpClient apiHttpClient; - - private ApiRoot(final ApiHttpClient apiHttpClient) { - this.apiHttpClient = apiHttpClient; - } - - public static ApiRoot of() { - return new ApiRoot(SerializerOnlyApiHttpClient.of()); - } - - public static ApiRoot fromClient(final ApiHttpClient apiHttpClient) { - return new ApiRoot(apiHttpClient); - } - - public ByProjectKeyRequestBuilder withProjectKey(String projectKey) { - return new ByProjectKeyRequestBuilder(this.apiHttpClient, projectKey); - } - - @Override - public void close() { - if (apiHttpClient == null) { - return; - } - try { - apiHttpClient.close(); - } - catch (final Throwable ignored) { - } - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigGet.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigGet.java deleted file mode 100644 index b40c441e68b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigGet.java +++ /dev/null @@ -1,108 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

Get the current image search config.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .imageSearch()
- *            .config()
- *            .get()
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchConfigGet extends - TypeApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - public ByProjectKeyImageSearchConfigGet(final ApiHttpClient apiHttpClient, String projectKey) { - super(apiHttpClient); - this.projectKey = projectKey; - } - - public ByProjectKeyImageSearchConfigGet(ByProjectKeyImageSearchConfigGet t) { - super(t); - this.projectKey = t.projectKey; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/image-search/config", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, - com.commercetools.ml.models.image_search_config.ImageSearchConfigResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.image_search_config.ImageSearchConfigResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyImageSearchConfigGet that = (ByProjectKeyImageSearchConfigGet) o; - - return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); - } - - @Override - protected ByProjectKeyImageSearchConfigGet copy() { - return new ByProjectKeyImageSearchConfigGet(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigPost.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigPost.java deleted file mode 100644 index 9b051e53e34..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigPost.java +++ /dev/null @@ -1,129 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

Endpoint to update the image search config.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .imageSearch()
- *            .config()
- *            .post(null)
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchConfigPost extends - TypeBodyApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - private com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest imageSearchConfigRequest; - - public ByProjectKeyImageSearchConfigPost(final ApiHttpClient apiHttpClient, String projectKey, - com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest imageSearchConfigRequest) { - super(apiHttpClient); - this.projectKey = projectKey; - this.imageSearchConfigRequest = imageSearchConfigRequest; - } - - public ByProjectKeyImageSearchConfigPost(ByProjectKeyImageSearchConfigPost t) { - super(t); - this.projectKey = t.projectKey; - this.imageSearchConfigRequest = t.imageSearchConfigRequest; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/image-search/config", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), - io.vrap.rmf.base.client.utils.json.JsonUtils - .executing(() -> apiHttpClient().getSerializerService().toJsonByteArray(imageSearchConfigRequest))); - - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, - com.commercetools.ml.models.image_search_config.ImageSearchConfigResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.image_search_config.ImageSearchConfigResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest getBody() { - return imageSearchConfigRequest; - } - - public ByProjectKeyImageSearchConfigPost withBody( - com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest imageSearchConfigRequest) { - ByProjectKeyImageSearchConfigPost t = copy(); - t.imageSearchConfigRequest = imageSearchConfigRequest; - return t; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyImageSearchConfigPost that = (ByProjectKeyImageSearchConfigPost) o; - - return new EqualsBuilder().append(projectKey, that.projectKey) - .append(imageSearchConfigRequest, that.imageSearchConfigRequest) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(imageSearchConfigRequest).toHashCode(); - } - - @Override - protected ByProjectKeyImageSearchConfigPost copy() { - return new ByProjectKeyImageSearchConfigPost(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigPostString.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigPostString.java deleted file mode 100644 index 8c2d0a01767..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigPostString.java +++ /dev/null @@ -1,128 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

Endpoint to update the image search config.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .imageSearch()
- *            .config()
- *            .post("")
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchConfigPostString extends - StringBodyApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - private String imageSearchConfigRequest; - - public ByProjectKeyImageSearchConfigPostString(final ApiHttpClient apiHttpClient, String projectKey, - String imageSearchConfigRequest) { - super(apiHttpClient); - this.projectKey = projectKey; - this.imageSearchConfigRequest = imageSearchConfigRequest; - } - - public ByProjectKeyImageSearchConfigPostString(ByProjectKeyImageSearchConfigPostString t) { - super(t); - this.projectKey = t.projectKey; - this.imageSearchConfigRequest = t.imageSearchConfigRequest; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/image-search/config", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), - imageSearchConfigRequest.getBytes(StandardCharsets.UTF_8)); - - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, - com.commercetools.ml.models.image_search_config.ImageSearchConfigResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.image_search_config.ImageSearchConfigResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public String getBody() { - return imageSearchConfigRequest; - } - - public ByProjectKeyImageSearchConfigPostString withBody(String imageSearchConfigRequest) { - ByProjectKeyImageSearchConfigPostString t = copy(); - t.imageSearchConfigRequest = imageSearchConfigRequest; - return t; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyImageSearchConfigPostString that = (ByProjectKeyImageSearchConfigPostString) o; - - return new EqualsBuilder().append(projectKey, that.projectKey) - .append(imageSearchConfigRequest, that.imageSearchConfigRequest) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(imageSearchConfigRequest).toHashCode(); - } - - @Override - protected ByProjectKeyImageSearchConfigPostString copy() { - return new ByProjectKeyImageSearchConfigPostString(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigRequestBuilder.java deleted file mode 100644 index 3575accdd6c..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchConfigRequestBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ - -package com.commercetools.ml.client; - -import java.util.function.UnaryOperator; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchConfigRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeyImageSearchConfigRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeyImageSearchConfigGet get() { - return new ByProjectKeyImageSearchConfigGet(apiHttpClient, projectKey); - } - - public ByProjectKeyImageSearchConfigPost post( - com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest imageSearchConfigRequest) { - return new ByProjectKeyImageSearchConfigPost(apiHttpClient, projectKey, imageSearchConfigRequest); - } - - public ByProjectKeyImageSearchConfigPostString post(final String imageSearchConfigRequest) { - return new ByProjectKeyImageSearchConfigPostString(apiHttpClient, projectKey, imageSearchConfigRequest); - } - - public ByProjectKeyImageSearchConfigPost post( - UnaryOperator op) { - return post( - op.apply(com.commercetools.ml.models.image_search_config.ImageSearchConfigRequestBuilder.of()).build()); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchPost.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchPost.java deleted file mode 100644 index acff0c14b45..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchPost.java +++ /dev/null @@ -1,301 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.net.URLConnection; -import java.nio.file.Files; -import java.time.Duration; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Optional; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

Accepts an image file and returns similar products from product catalogue.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .imageSearch()
- *            .post(file)
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchPost extends - TypeBodyApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - private java.io.File file; - - public ByProjectKeyImageSearchPost(final ApiHttpClient apiHttpClient, String projectKey, java.io.File file) { - super(apiHttpClient); - this.projectKey = projectKey; - this.file = file; - } - - public ByProjectKeyImageSearchPost(ByProjectKeyImageSearchPost t) { - super(t); - this.projectKey = t.projectKey; - this.file = t.file; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/image-search", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - ApiHttpHeaders headers = getHeaders(); - if (headers.getFirst(ApiHttpHeaders.CONTENT_TYPE) == null) { - final String mimeType = Optional.ofNullable(URLConnection.guessContentTypeFromName(file.getName())) - .orElse("application/octet-stream"); - headers = headers.withHeader(ApiHttpHeaders.CONTENT_TYPE, mimeType); - } - return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), headers, - io.vrap.rmf.base.client.utils.FileUtils.executing(() -> Files.readAllBytes(file.toPath()))); - - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, com.commercetools.ml.models.image_search.ImageSearchResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.image_search.ImageSearchResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public List getLimit() { - return this.getQueryParam("limit"); - } - - public List getOffset() { - return this.getQueryParam("offset"); - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - /** - * set limit with the specified value - * @param limit value to be set - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withLimit(final TValue limit) { - return copy().withQueryParam("limit", limit); - } - - /** - * add additional limit query parameter - * @param limit value to be added - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addLimit(final TValue limit) { - return copy().addQueryParam("limit", limit); - } - - /** - * set limit with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withLimit(final Supplier supplier) { - return copy().withQueryParam("limit", supplier.get()); - } - - /** - * add additional limit query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addLimit(final Supplier supplier) { - return copy().addQueryParam("limit", supplier.get()); - } - - /** - * set limit with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withLimit(final Function op) { - return copy().withQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * add additional limit query parameter - * @param op builder for the value to be added - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addLimit(final Function op) { - return copy().addQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * set limit with the specified values - * @param limit values to be set - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withLimit(final Collection limit) { - return copy().withoutQueryParam("limit") - .addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional limit query parameters - * @param limit values to be added - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addLimit(final Collection limit) { - return copy().addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * set offset with the specified value - * @param offset value to be set - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withOffset(final TValue offset) { - return copy().withQueryParam("offset", offset); - } - - /** - * add additional offset query parameter - * @param offset value to be added - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addOffset(final TValue offset) { - return copy().addQueryParam("offset", offset); - } - - /** - * set offset with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withOffset(final Supplier supplier) { - return copy().withQueryParam("offset", supplier.get()); - } - - /** - * add additional offset query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addOffset(final Supplier supplier) { - return copy().addQueryParam("offset", supplier.get()); - } - - /** - * set offset with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withOffset(final Function op) { - return copy().withQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * add additional offset query parameter - * @param op builder for the value to be added - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addOffset(final Function op) { - return copy().addQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * set offset with the specified values - * @param offset values to be set - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost withOffset(final Collection offset) { - return copy().withoutQueryParam("offset") - .addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional offset query parameters - * @param offset values to be added - * @param value type - * @return ByProjectKeyImageSearchPost - */ - public ByProjectKeyImageSearchPost addOffset(final Collection offset) { - return copy().addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - public java.io.File getBody() { - return file; - } - - public ByProjectKeyImageSearchPost withBody(java.io.File file) { - ByProjectKeyImageSearchPost t = copy(); - t.file = file; - return t; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyImageSearchPost that = (ByProjectKeyImageSearchPost) o; - - return new EqualsBuilder().append(projectKey, that.projectKey).append(file, that.file).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(file).toHashCode(); - } - - @Override - protected ByProjectKeyImageSearchPost copy() { - return new ByProjectKeyImageSearchPost(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchPostString.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchPostString.java deleted file mode 100644 index fa44be66891..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchPostString.java +++ /dev/null @@ -1,293 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

Accepts an image file and returns similar products from product catalogue.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .imageSearch()
- *            .post("")
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchPostString extends - StringBodyApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - private String file; - - public ByProjectKeyImageSearchPostString(final ApiHttpClient apiHttpClient, String projectKey, String file) { - super(apiHttpClient); - this.projectKey = projectKey; - this.file = file; - } - - public ByProjectKeyImageSearchPostString(ByProjectKeyImageSearchPostString t) { - super(t); - this.projectKey = t.projectKey; - this.file = t.file; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/image-search", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), - file.getBytes(StandardCharsets.UTF_8)); - - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, com.commercetools.ml.models.image_search.ImageSearchResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.image_search.ImageSearchResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public List getLimit() { - return this.getQueryParam("limit"); - } - - public List getOffset() { - return this.getQueryParam("offset"); - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - /** - * set limit with the specified value - * @param value type - * @param limit value to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withLimit(final TValue limit) { - return copy().withQueryParam("limit", limit); - } - - /** - * add additional limit query parameter - * @param value type - * @param limit value to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addLimit(final TValue limit) { - return copy().addQueryParam("limit", limit); - } - - /** - * set limit with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withLimit(final Supplier supplier) { - return copy().withQueryParam("limit", supplier.get()); - } - - /** - * add additional limit query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addLimit(final Supplier supplier) { - return copy().addQueryParam("limit", supplier.get()); - } - - /** - * set limit with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withLimit(final Function op) { - return copy().withQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * add additional limit query parameter - * @param op builder for the value to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addLimit(final Function op) { - return copy().addQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * set limit with the specified values - * @param value type - * @param limit values to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withLimit(final Collection limit) { - return copy().withoutQueryParam("limit") - .addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional limit query parameters - * @param value type - * @param limit values to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addLimit(final Collection limit) { - return copy().addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * set offset with the specified value - * @param value type - * @param offset value to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withOffset(final TValue offset) { - return copy().withQueryParam("offset", offset); - } - - /** - * add additional offset query parameter - * @param value type - * @param offset value to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addOffset(final TValue offset) { - return copy().addQueryParam("offset", offset); - } - - /** - * set offset with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withOffset(final Supplier supplier) { - return copy().withQueryParam("offset", supplier.get()); - } - - /** - * add additional offset query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addOffset(final Supplier supplier) { - return copy().addQueryParam("offset", supplier.get()); - } - - /** - * set offset with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withOffset(final Function op) { - return copy().withQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * add additional offset query parameter - * @param op builder for the value to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addOffset(final Function op) { - return copy().addQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * set offset with the specified values - * @param value type - * @param offset values to be set - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString withOffset(final Collection offset) { - return copy().withoutQueryParam("offset") - .addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional offset query parameters - * @param value type - * @param offset values to be added - * @return ByProjectKeyImageSearchPostString - */ - public ByProjectKeyImageSearchPostString addOffset(final Collection offset) { - return copy().addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - public String getBody() { - return file; - } - - public ByProjectKeyImageSearchPostString withBody(String file) { - ByProjectKeyImageSearchPostString t = copy(); - t.file = file; - return t; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyImageSearchPostString that = (ByProjectKeyImageSearchPostString) o; - - return new EqualsBuilder().append(projectKey, that.projectKey).append(file, that.file).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(file).toHashCode(); - } - - @Override - protected ByProjectKeyImageSearchPostString copy() { - return new ByProjectKeyImageSearchPostString(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchRequestBuilder.java deleted file mode 100644 index 48875d763d3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyImageSearchRequestBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyImageSearchRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeyImageSearchRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeyImageSearchPost post(java.io.File file) { - return new ByProjectKeyImageSearchPost(apiHttpClient, projectKey, file); - } - - public ByProjectKeyImageSearchConfigRequestBuilder config() { - return new ByProjectKeyImageSearchConfigRequestBuilder(apiHttpClient, projectKey); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsGeneralCategoriesGet.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsGeneralCategoriesGet.java deleted file mode 100644 index b297026e47e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsGeneralCategoriesGet.java +++ /dev/null @@ -1,635 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.time.Duration; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

This endpoint takes arbitrary product names or image URLs and generates recommendations from a general set of categories, which cover a broad range of industries. The full list of supported categories can be found here. These are independent of the categories that are actually defined in your project. The main purpose of this API is to provide a quick way to test the behavior of the category recommendations engine for different names and images. In contrast to the project-specific endpoint, this endpoint does not have activation criteria and is enabled for all projects.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .recommendations()
- *            .generalCategories()
- *            .get()
- *            .withProductName(productName)
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRecommendationsGeneralCategoriesGet extends - TypeApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - public ByProjectKeyRecommendationsGeneralCategoriesGet(final ApiHttpClient apiHttpClient, String projectKey) { - super(apiHttpClient); - this.projectKey = projectKey; - } - - public ByProjectKeyRecommendationsGeneralCategoriesGet(ByProjectKeyRecommendationsGeneralCategoriesGet t) { - super(t); - this.projectKey = t.projectKey; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/recommendations/general-categories", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, - com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, - com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public List getProductImageUrl() { - return this.getQueryParam("productImageUrl"); - } - - public List getProductName() { - return this.getQueryParam("productName"); - } - - public List getLimit() { - return this.getQueryParam("limit"); - } - - public List getOffset() { - return this.getQueryParam("offset"); - } - - public List getConfidenceMin() { - return this.getQueryParam("confidenceMin"); - } - - public List getConfidenceMax() { - return this.getQueryParam("confidenceMax"); - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - /** - * set productImageUrl with the specified value - * @param productImageUrl value to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl(final TValue productImageUrl) { - return copy().withQueryParam("productImageUrl", productImageUrl); - } - - /** - * add additional productImageUrl query parameter - * @param productImageUrl value to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl(final TValue productImageUrl) { - return copy().addQueryParam("productImageUrl", productImageUrl); - } - - /** - * set productImageUrl with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl(final Supplier supplier) { - return copy().withQueryParam("productImageUrl", supplier.get()); - } - - /** - * add additional productImageUrl query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl(final Supplier supplier) { - return copy().addQueryParam("productImageUrl", supplier.get()); - } - - /** - * set productImageUrl with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl( - final Function op) { - return copy().withQueryParam("productImageUrl", op.apply(new StringBuilder())); - } - - /** - * add additional productImageUrl query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl( - final Function op) { - return copy().addQueryParam("productImageUrl", op.apply(new StringBuilder())); - } - - /** - * set productImageUrl with the specified values - * @param productImageUrl values to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl( - final Collection productImageUrl) { - return copy().withoutQueryParam("productImageUrl") - .addQueryParams(productImageUrl.stream() - .map(s -> new ParamEntry<>("productImageUrl", s.toString())) - .collect(Collectors.toList())); - } - - /** - * add additional productImageUrl query parameters - * @param productImageUrl values to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl( - final Collection productImageUrl) { - return copy().addQueryParams(productImageUrl.stream() - .map(s -> new ParamEntry<>("productImageUrl", s.toString())) - .collect(Collectors.toList())); - } - - /** - * set productName with the specified value - * @param productName value to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductName(final TValue productName) { - return copy().withQueryParam("productName", productName); - } - - /** - * add additional productName query parameter - * @param productName value to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductName(final TValue productName) { - return copy().addQueryParam("productName", productName); - } - - /** - * set productName with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductName(final Supplier supplier) { - return copy().withQueryParam("productName", supplier.get()); - } - - /** - * add additional productName query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductName(final Supplier supplier) { - return copy().addQueryParam("productName", supplier.get()); - } - - /** - * set productName with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductName( - final Function op) { - return copy().withQueryParam("productName", op.apply(new StringBuilder())); - } - - /** - * add additional productName query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductName( - final Function op) { - return copy().addQueryParam("productName", op.apply(new StringBuilder())); - } - - /** - * set productName with the specified values - * @param productName values to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withProductName( - final Collection productName) { - return copy().withoutQueryParam("productName") - .addQueryParams(productName.stream() - .map(s -> new ParamEntry<>("productName", s.toString())) - .collect(Collectors.toList())); - } - - /** - * add additional productName query parameters - * @param productName values to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addProductName( - final Collection productName) { - return copy().addQueryParams( - productName.stream().map(s -> new ParamEntry<>("productName", s.toString())).collect(Collectors.toList())); - } - - /** - * set limit with the specified value - * @param limit value to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final TValue limit) { - return copy().withQueryParam("limit", limit); - } - - /** - * add additional limit query parameter - * @param limit value to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final TValue limit) { - return copy().addQueryParam("limit", limit); - } - - /** - * set limit with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final Supplier supplier) { - return copy().withQueryParam("limit", supplier.get()); - } - - /** - * add additional limit query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final Supplier supplier) { - return copy().addQueryParam("limit", supplier.get()); - } - - /** - * set limit with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final Function op) { - return copy().withQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * add additional limit query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final Function op) { - return copy().addQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * set limit with the specified values - * @param limit values to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final Collection limit) { - return copy().withoutQueryParam("limit") - .addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional limit query parameters - * @param limit values to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final Collection limit) { - return copy().addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * set offset with the specified value - * @param offset value to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final TValue offset) { - return copy().withQueryParam("offset", offset); - } - - /** - * add additional offset query parameter - * @param offset value to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final TValue offset) { - return copy().addQueryParam("offset", offset); - } - - /** - * set offset with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final Supplier supplier) { - return copy().withQueryParam("offset", supplier.get()); - } - - /** - * add additional offset query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final Supplier supplier) { - return copy().addQueryParam("offset", supplier.get()); - } - - /** - * set offset with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final Function op) { - return copy().withQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * add additional offset query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final Function op) { - return copy().addQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * set offset with the specified values - * @param offset values to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final Collection offset) { - return copy().withoutQueryParam("offset") - .addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional offset query parameters - * @param offset values to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final Collection offset) { - return copy().addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - /** - * set confidenceMin with the specified value - * @param confidenceMin value to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin(final TValue confidenceMin) { - return copy().withQueryParam("confidenceMin", confidenceMin); - } - - /** - * add additional confidenceMin query parameter - * @param confidenceMin value to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin(final TValue confidenceMin) { - return copy().addQueryParam("confidenceMin", confidenceMin); - } - - /** - * set confidenceMin with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin(final Supplier supplier) { - return copy().withQueryParam("confidenceMin", supplier.get()); - } - - /** - * add additional confidenceMin query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin(final Supplier supplier) { - return copy().addQueryParam("confidenceMin", supplier.get()); - } - - /** - * set confidenceMin with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin( - final Function op) { - return copy().withQueryParam("confidenceMin", op.apply(new StringBuilder())); - } - - /** - * add additional confidenceMin query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin( - final Function op) { - return copy().addQueryParam("confidenceMin", op.apply(new StringBuilder())); - } - - /** - * set confidenceMin with the specified values - * @param confidenceMin values to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin( - final Collection confidenceMin) { - return copy().withoutQueryParam("confidenceMin") - .addQueryParams(confidenceMin.stream() - .map(s -> new ParamEntry<>("confidenceMin", s.toString())) - .collect(Collectors.toList())); - } - - /** - * add additional confidenceMin query parameters - * @param confidenceMin values to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin( - final Collection confidenceMin) { - return copy().addQueryParams(confidenceMin.stream() - .map(s -> new ParamEntry<>("confidenceMin", s.toString())) - .collect(Collectors.toList())); - } - - /** - * set confidenceMax with the specified value - * @param confidenceMax value to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax(final TValue confidenceMax) { - return copy().withQueryParam("confidenceMax", confidenceMax); - } - - /** - * add additional confidenceMax query parameter - * @param confidenceMax value to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax(final TValue confidenceMax) { - return copy().addQueryParam("confidenceMax", confidenceMax); - } - - /** - * set confidenceMax with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax(final Supplier supplier) { - return copy().withQueryParam("confidenceMax", supplier.get()); - } - - /** - * add additional confidenceMax query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax(final Supplier supplier) { - return copy().addQueryParam("confidenceMax", supplier.get()); - } - - /** - * set confidenceMax with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax( - final Function op) { - return copy().withQueryParam("confidenceMax", op.apply(new StringBuilder())); - } - - /** - * add additional confidenceMax query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax( - final Function op) { - return copy().addQueryParam("confidenceMax", op.apply(new StringBuilder())); - } - - /** - * set confidenceMax with the specified values - * @param confidenceMax values to be set - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax( - final Collection confidenceMax) { - return copy().withoutQueryParam("confidenceMax") - .addQueryParams(confidenceMax.stream() - .map(s -> new ParamEntry<>("confidenceMax", s.toString())) - .collect(Collectors.toList())); - } - - /** - * add additional confidenceMax query parameters - * @param confidenceMax values to be added - * @param value type - * @return ByProjectKeyRecommendationsGeneralCategoriesGet - */ - public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax( - final Collection confidenceMax) { - return copy().addQueryParams(confidenceMax.stream() - .map(s -> new ParamEntry<>("confidenceMax", s.toString())) - .collect(Collectors.toList())); - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyRecommendationsGeneralCategoriesGet that = (ByProjectKeyRecommendationsGeneralCategoriesGet) o; - - return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); - } - - @Override - protected ByProjectKeyRecommendationsGeneralCategoriesGet copy() { - return new ByProjectKeyRecommendationsGeneralCategoriesGet(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder.java deleted file mode 100644 index 438b33b02d7..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder(final ApiHttpClient apiHttpClient, - final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeyRecommendationsGeneralCategoriesGet get() { - return new ByProjectKeyRecommendationsGeneralCategoriesGet(apiHttpClient, projectKey); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesByProductIdGet.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesByProductIdGet.java deleted file mode 100644 index ad1cca997a4..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesByProductIdGet.java +++ /dev/null @@ -1,575 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.time.Duration; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.CompletableFuture; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - *

Response Representation: PagedQueryResult with a results array of ProjectCategoryrecommendation, sorted by confidence scores in descending order and the meta information of ProjectCategoryrecommendationMeta.

- * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .recommendations()
- *            .projectCategories()
- *            .withProductId("{productId}")
- *            .get()
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRecommendationsProjectCategoriesByProductIdGet extends - TypeApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - private String productId; - - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet(final ApiHttpClient apiHttpClient, - String projectKey, String productId) { - super(apiHttpClient); - this.projectKey = projectKey; - this.productId = productId; - } - - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet( - ByProjectKeyRecommendationsProjectCategoriesByProductIdGet t) { - super(t); - this.projectKey = t.projectKey; - this.productId = t.productId; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/recommendations/project-categories/%s", this.projectKey, - this.productId); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, - com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationPagedQueryResponse.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, - com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationPagedQueryResponse.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public String getProductId() { - return this.productId; - } - - public List getLimit() { - return this.getQueryParam("limit"); - } - - public List getOffset() { - return this.getQueryParam("offset"); - } - - public List getStaged() { - return this.getQueryParam("staged"); - } - - public List getConfidenceMin() { - return this.getQueryParam("confidenceMin"); - } - - public List getConfidenceMax() { - return this.getQueryParam("confidenceMax"); - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public void setProductId(final String productId) { - this.productId = productId; - } - - /** - * set limit with the specified value - * @param limit value to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withLimit(final TValue limit) { - return copy().withQueryParam("limit", limit); - } - - /** - * add additional limit query parameter - * @param limit value to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addLimit(final TValue limit) { - return copy().addQueryParam("limit", limit); - } - - /** - * set limit with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withLimit(final Supplier supplier) { - return copy().withQueryParam("limit", supplier.get()); - } - - /** - * add additional limit query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addLimit(final Supplier supplier) { - return copy().addQueryParam("limit", supplier.get()); - } - - /** - * set limit with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withLimit( - final Function op) { - return copy().withQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * add additional limit query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addLimit( - final Function op) { - return copy().addQueryParam("limit", op.apply(new StringBuilder())); - } - - /** - * set limit with the specified values - * @param limit values to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withLimit( - final Collection limit) { - return copy().withoutQueryParam("limit") - .addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional limit query parameters - * @param limit values to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addLimit( - final Collection limit) { - return copy().addQueryParams( - limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); - } - - /** - * set offset with the specified value - * @param offset value to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withOffset(final TValue offset) { - return copy().withQueryParam("offset", offset); - } - - /** - * add additional offset query parameter - * @param offset value to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addOffset(final TValue offset) { - return copy().addQueryParam("offset", offset); - } - - /** - * set offset with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withOffset(final Supplier supplier) { - return copy().withQueryParam("offset", supplier.get()); - } - - /** - * add additional offset query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addOffset(final Supplier supplier) { - return copy().addQueryParam("offset", supplier.get()); - } - - /** - * set offset with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withOffset( - final Function op) { - return copy().withQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * add additional offset query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addOffset( - final Function op) { - return copy().addQueryParam("offset", op.apply(new StringBuilder())); - } - - /** - * set offset with the specified values - * @param offset values to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withOffset( - final Collection offset) { - return copy().withoutQueryParam("offset") - .addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional offset query parameters - * @param offset values to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addOffset( - final Collection offset) { - return copy().addQueryParams( - offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); - } - - /** - * set staged with the specified value - * @param staged value to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withStaged(final TValue staged) { - return copy().withQueryParam("staged", staged); - } - - /** - * add additional staged query parameter - * @param staged value to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addStaged(final TValue staged) { - return copy().addQueryParam("staged", staged); - } - - /** - * set staged with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withStaged(final Supplier supplier) { - return copy().withQueryParam("staged", supplier.get()); - } - - /** - * add additional staged query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addStaged(final Supplier supplier) { - return copy().addQueryParam("staged", supplier.get()); - } - - /** - * set staged with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withStaged( - final Function op) { - return copy().withQueryParam("staged", op.apply(new StringBuilder())); - } - - /** - * add additional staged query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addStaged( - final Function op) { - return copy().addQueryParam("staged", op.apply(new StringBuilder())); - } - - /** - * set staged with the specified values - * @param staged values to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withStaged( - final Collection staged) { - return copy().withoutQueryParam("staged") - .addQueryParams( - staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); - } - - /** - * add additional staged query parameters - * @param staged values to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addStaged( - final Collection staged) { - return copy().addQueryParams( - staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); - } - - /** - * set confidenceMin with the specified value - * @param confidenceMin value to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMin( - final TValue confidenceMin) { - return copy().withQueryParam("confidenceMin", confidenceMin); - } - - /** - * add additional confidenceMin query parameter - * @param confidenceMin value to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMin( - final TValue confidenceMin) { - return copy().addQueryParam("confidenceMin", confidenceMin); - } - - /** - * set confidenceMin with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMin( - final Supplier supplier) { - return copy().withQueryParam("confidenceMin", supplier.get()); - } - - /** - * add additional confidenceMin query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMin( - final Supplier supplier) { - return copy().addQueryParam("confidenceMin", supplier.get()); - } - - /** - * set confidenceMin with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMin( - final Function op) { - return copy().withQueryParam("confidenceMin", op.apply(new StringBuilder())); - } - - /** - * add additional confidenceMin query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMin( - final Function op) { - return copy().addQueryParam("confidenceMin", op.apply(new StringBuilder())); - } - - /** - * set confidenceMin with the specified values - * @param confidenceMin values to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMin( - final Collection confidenceMin) { - return copy().withoutQueryParam("confidenceMin") - .addQueryParams(confidenceMin.stream() - .map(s -> new ParamEntry<>("confidenceMin", s.toString())) - .collect(Collectors.toList())); - } - - /** - * add additional confidenceMin query parameters - * @param confidenceMin values to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMin( - final Collection confidenceMin) { - return copy().addQueryParams(confidenceMin.stream() - .map(s -> new ParamEntry<>("confidenceMin", s.toString())) - .collect(Collectors.toList())); - } - - /** - * set confidenceMax with the specified value - * @param confidenceMax value to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMax( - final TValue confidenceMax) { - return copy().withQueryParam("confidenceMax", confidenceMax); - } - - /** - * add additional confidenceMax query parameter - * @param confidenceMax value to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMax( - final TValue confidenceMax) { - return copy().addQueryParam("confidenceMax", confidenceMax); - } - - /** - * set confidenceMax with the specified value - * @param supplier supplier for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMax( - final Supplier supplier) { - return copy().withQueryParam("confidenceMax", supplier.get()); - } - - /** - * add additional confidenceMax query parameter - * @param supplier supplier for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMax( - final Supplier supplier) { - return copy().addQueryParam("confidenceMax", supplier.get()); - } - - /** - * set confidenceMax with the specified value - * @param op builder for the value to be set - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMax( - final Function op) { - return copy().withQueryParam("confidenceMax", op.apply(new StringBuilder())); - } - - /** - * add additional confidenceMax query parameter - * @param op builder for the value to be added - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMax( - final Function op) { - return copy().addQueryParam("confidenceMax", op.apply(new StringBuilder())); - } - - /** - * set confidenceMax with the specified values - * @param confidenceMax values to be set - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet withConfidenceMax( - final Collection confidenceMax) { - return copy().withoutQueryParam("confidenceMax") - .addQueryParams(confidenceMax.stream() - .map(s -> new ParamEntry<>("confidenceMax", s.toString())) - .collect(Collectors.toList())); - } - - /** - * add additional confidenceMax query parameters - * @param confidenceMax values to be added - * @param value type - * @return ByProjectKeyRecommendationsProjectCategoriesByProductIdGet - */ - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet addConfidenceMax( - final Collection confidenceMax) { - return copy().addQueryParams(confidenceMax.stream() - .map(s -> new ParamEntry<>("confidenceMax", s.toString())) - .collect(Collectors.toList())); - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeyRecommendationsProjectCategoriesByProductIdGet that = (ByProjectKeyRecommendationsProjectCategoriesByProductIdGet) o; - - return new EqualsBuilder().append(projectKey, that.projectKey).append(productId, that.productId).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(productId).toHashCode(); - } - - @Override - protected ByProjectKeyRecommendationsProjectCategoriesByProductIdGet copy() { - return new ByProjectKeyRecommendationsProjectCategoriesByProductIdGet(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder.java deleted file mode 100644 index 996f1d3c9b9..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - private final String productId; - - public ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder(final ApiHttpClient apiHttpClient, - final String projectKey, final String productId) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - this.productId = productId; - } - - public ByProjectKeyRecommendationsProjectCategoriesByProductIdGet get() { - return new ByProjectKeyRecommendationsProjectCategoriesByProductIdGet(apiHttpClient, projectKey, productId); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesRequestBuilder.java deleted file mode 100644 index b8ca13c1448..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsProjectCategoriesRequestBuilder.java +++ /dev/null @@ -1,24 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRecommendationsProjectCategoriesRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeyRecommendationsProjectCategoriesRequestBuilder(final ApiHttpClient apiHttpClient, - final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder withProductId(String productId) { - return new ByProjectKeyRecommendationsProjectCategoriesByProductIdRequestBuilder(apiHttpClient, projectKey, - productId); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsRequestBuilder.java deleted file mode 100644 index 0e8e97df320..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRecommendationsRequestBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRecommendationsRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeyRecommendationsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeyRecommendationsProjectCategoriesRequestBuilder projectCategories() { - return new ByProjectKeyRecommendationsProjectCategoriesRequestBuilder(apiHttpClient, projectKey); - } - - public ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder generalCategories() { - return new ByProjectKeyRecommendationsGeneralCategoriesRequestBuilder(apiHttpClient, projectKey); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRequestBuilder.java deleted file mode 100644 index 6eac35b6b83..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeyRequestBuilder.java +++ /dev/null @@ -1,30 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeyRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeyRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeyImageSearchRequestBuilder imageSearch() { - return new ByProjectKeyImageSearchRequestBuilder(apiHttpClient, projectKey); - } - - public ByProjectKeyRecommendationsRequestBuilder recommendations() { - return new ByProjectKeyRecommendationsRequestBuilder(apiHttpClient, projectKey); - } - - public ByProjectKeySimilaritiesRequestBuilder similarities() { - return new ByProjectKeySimilaritiesRequestBuilder(apiHttpClient, projectKey); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsPost.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsPost.java deleted file mode 100644 index a5c368cf27a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsPost.java +++ /dev/null @@ -1,128 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - * - * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .similarities()
- *            .products()
- *            .post(null)
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesProductsPost extends - TypeBodyApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - private com.commercetools.ml.models.similar_products.SimilarProductSearchRequest similarProductSearchRequest; - - public ByProjectKeySimilaritiesProductsPost(final ApiHttpClient apiHttpClient, String projectKey, - com.commercetools.ml.models.similar_products.SimilarProductSearchRequest similarProductSearchRequest) { - super(apiHttpClient); - this.projectKey = projectKey; - this.similarProductSearchRequest = similarProductSearchRequest; - } - - public ByProjectKeySimilaritiesProductsPost(ByProjectKeySimilaritiesProductsPost t) { - super(t); - this.projectKey = t.projectKey; - this.similarProductSearchRequest = t.similarProductSearchRequest; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/similarities/products", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), - io.vrap.rmf.base.client.utils.json.JsonUtils.executing( - () -> apiHttpClient().getSerializerService().toJsonByteArray(similarProductSearchRequest))); - - } - - @Override - public ApiHttpResponse executeBlocking(final ApiHttpClient client, - final Duration timeout) { - return executeBlocking(client, timeout, com.commercetools.ml.models.common.TaskToken.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.common.TaskToken.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public com.commercetools.ml.models.similar_products.SimilarProductSearchRequest getBody() { - return similarProductSearchRequest; - } - - public ByProjectKeySimilaritiesProductsPost withBody( - com.commercetools.ml.models.similar_products.SimilarProductSearchRequest similarProductSearchRequest) { - ByProjectKeySimilaritiesProductsPost t = copy(); - t.similarProductSearchRequest = similarProductSearchRequest; - return t; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeySimilaritiesProductsPost that = (ByProjectKeySimilaritiesProductsPost) o; - - return new EqualsBuilder().append(projectKey, that.projectKey) - .append(similarProductSearchRequest, that.similarProductSearchRequest) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(similarProductSearchRequest).toHashCode(); - } - - @Override - protected ByProjectKeySimilaritiesProductsPost copy() { - return new ByProjectKeySimilaritiesProductsPost(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsPostString.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsPostString.java deleted file mode 100644 index c8b6905bc1e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsPostString.java +++ /dev/null @@ -1,127 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - * - * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .similarities()
- *            .products()
- *            .post("")
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesProductsPostString extends - StringBodyApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - - private String similarProductSearchRequest; - - public ByProjectKeySimilaritiesProductsPostString(final ApiHttpClient apiHttpClient, String projectKey, - String similarProductSearchRequest) { - super(apiHttpClient); - this.projectKey = projectKey; - this.similarProductSearchRequest = similarProductSearchRequest; - } - - public ByProjectKeySimilaritiesProductsPostString(ByProjectKeySimilaritiesProductsPostString t) { - super(t); - this.projectKey = t.projectKey; - this.similarProductSearchRequest = t.similarProductSearchRequest; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/similarities/products", this.projectKey); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.POST, URI.create(httpRequestPath), getHeaders(), - similarProductSearchRequest.getBytes(StandardCharsets.UTF_8)); - - } - - @Override - public ApiHttpResponse executeBlocking(final ApiHttpClient client, - final Duration timeout) { - return executeBlocking(client, timeout, com.commercetools.ml.models.common.TaskToken.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.common.TaskToken.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public String getBody() { - return similarProductSearchRequest; - } - - public ByProjectKeySimilaritiesProductsPostString withBody(String similarProductSearchRequest) { - ByProjectKeySimilaritiesProductsPostString t = copy(); - t.similarProductSearchRequest = similarProductSearchRequest; - return t; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeySimilaritiesProductsPostString that = (ByProjectKeySimilaritiesProductsPostString) o; - - return new EqualsBuilder().append(projectKey, that.projectKey) - .append(similarProductSearchRequest, that.similarProductSearchRequest) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(similarProductSearchRequest).toHashCode(); - } - - @Override - protected ByProjectKeySimilaritiesProductsPostString copy() { - return new ByProjectKeySimilaritiesProductsPostString(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsRequestBuilder.java deleted file mode 100644 index da040446095..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsRequestBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ - -package com.commercetools.ml.client; - -import java.util.function.UnaryOperator; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesProductsRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeySimilaritiesProductsRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeySimilaritiesProductsPost post( - com.commercetools.ml.models.similar_products.SimilarProductSearchRequest similarProductSearchRequest) { - return new ByProjectKeySimilaritiesProductsPost(apiHttpClient, projectKey, similarProductSearchRequest); - } - - public ByProjectKeySimilaritiesProductsPostString post(final String similarProductSearchRequest) { - return new ByProjectKeySimilaritiesProductsPostString(apiHttpClient, projectKey, similarProductSearchRequest); - } - - public ByProjectKeySimilaritiesProductsPost post( - UnaryOperator op) { - return post( - op.apply(com.commercetools.ml.models.similar_products.SimilarProductSearchRequestBuilder.of()).build()); - } - - public ByProjectKeySimilaritiesProductsStatusRequestBuilder status() { - return new ByProjectKeySimilaritiesProductsStatusRequestBuilder(apiHttpClient, projectKey); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusByTaskIdGet.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusByTaskIdGet.java deleted file mode 100644 index d46711c0264..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusByTaskIdGet.java +++ /dev/null @@ -1,122 +0,0 @@ - -package com.commercetools.ml.client; - -import java.net.URI; -import java.time.Duration; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.CompletableFuture; - -import com.fasterxml.jackson.core.type.TypeReference; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; - -/** - * - * - *
- *
- *
{@code
- *   CompletableFuture> result = apiRoot
- *            .withProjectKey("{projectKey}")
- *            .similarities()
- *            .products()
- *            .status()
- *            .withTaskId("{taskId}")
- *            .get()
- *            .execute()
- * }
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesProductsStatusByTaskIdGet extends - TypeApiMethod { - - @Override - public TypeReference resultType() { - return new TypeReference() { - }; - } - - private String projectKey; - private String taskId; - - public ByProjectKeySimilaritiesProductsStatusByTaskIdGet(final ApiHttpClient apiHttpClient, String projectKey, - String taskId) { - super(apiHttpClient); - this.projectKey = projectKey; - this.taskId = taskId; - } - - public ByProjectKeySimilaritiesProductsStatusByTaskIdGet(ByProjectKeySimilaritiesProductsStatusByTaskIdGet t) { - super(t); - this.projectKey = t.projectKey; - this.taskId = t.taskId; - } - - @Override - protected ApiHttpRequest buildHttpRequest() { - List params = new ArrayList<>(getQueryParamUriStrings()); - String httpRequestPath = String.format("%s/similarities/products/status/%s", this.projectKey, this.taskId); - if (!params.isEmpty()) { - httpRequestPath += "?" + String.join("&", params); - } - return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); - } - - @Override - public ApiHttpResponse executeBlocking( - final ApiHttpClient client, final Duration timeout) { - return executeBlocking(client, timeout, - com.commercetools.ml.models.similar_products.SimilarProductsTaskStatus.class); - } - - @Override - public CompletableFuture> execute( - final ApiHttpClient client) { - return execute(client, com.commercetools.ml.models.similar_products.SimilarProductsTaskStatus.class); - } - - public String getProjectKey() { - return this.projectKey; - } - - public String getTaskId() { - return this.taskId; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public void setTaskId(final String taskId) { - this.taskId = taskId; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ByProjectKeySimilaritiesProductsStatusByTaskIdGet that = (ByProjectKeySimilaritiesProductsStatusByTaskIdGet) o; - - return new EqualsBuilder().append(projectKey, that.projectKey).append(taskId, that.taskId).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey).append(taskId).toHashCode(); - } - - @Override - protected ByProjectKeySimilaritiesProductsStatusByTaskIdGet copy() { - return new ByProjectKeySimilaritiesProductsStatusByTaskIdGet(this); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder.java deleted file mode 100644 index 9c0e7e37ebf..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - private final String taskId; - - public ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder(final ApiHttpClient apiHttpClient, - final String projectKey, final String taskId) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - this.taskId = taskId; - } - - public ByProjectKeySimilaritiesProductsStatusByTaskIdGet get() { - return new ByProjectKeySimilaritiesProductsStatusByTaskIdGet(apiHttpClient, projectKey, taskId); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusRequestBuilder.java deleted file mode 100644 index 4fc6bb788d9..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesProductsStatusRequestBuilder.java +++ /dev/null @@ -1,23 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesProductsStatusRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeySimilaritiesProductsStatusRequestBuilder(final ApiHttpClient apiHttpClient, - final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder withTaskId(String taskId) { - return new ByProjectKeySimilaritiesProductsStatusByTaskIdRequestBuilder(apiHttpClient, projectKey, taskId); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesRequestBuilder.java deleted file mode 100644 index ce3174919bd..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/client/ByProjectKeySimilaritiesRequestBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ - -package com.commercetools.ml.client; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ByProjectKeySimilaritiesRequestBuilder { - - private final ApiHttpClient apiHttpClient; - private final String projectKey; - - public ByProjectKeySimilaritiesRequestBuilder(final ApiHttpClient apiHttpClient, final String projectKey) { - this.apiHttpClient = apiHttpClient; - this.projectKey = projectKey; - } - - public ByProjectKeySimilaritiesProductsRequestBuilder products() { - return new ByProjectKeySimilaritiesProductsRequestBuilder(apiHttpClient, projectKey); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendation.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendation.java deleted file mode 100644 index d656b28aae3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendation.java +++ /dev/null @@ -1,160 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.commercetools.ml.models.common.CategoryReference; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProjectCategoryRecommendation - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProjectCategoryRecommendation projectCategoryRecommendation = ProjectCategoryRecommendation.builder()
- *             .category(categoryBuilder -> categoryBuilder)
- *             .confidence(0.3)
- *             .path("{path}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProjectCategoryRecommendationImpl.class) -public interface ProjectCategoryRecommendation { - - /** - *

A category that is recommended for a product.

- * @return category - */ - @NotNull - @Valid - @JsonProperty("category") - public CategoryReference getCategory(); - - /** - *

Probability score for the category recommendation.

- * @return confidence - */ - @NotNull - @JsonProperty("confidence") - public Double getConfidence(); - - /** - *

Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

- * @return path - */ - @NotNull - @JsonProperty("path") - public String getPath(); - - /** - *

A category that is recommended for a product.

- * @param category value to be set - */ - - public void setCategory(final CategoryReference category); - - /** - *

Probability score for the category recommendation.

- * @param confidence value to be set - */ - - public void setConfidence(final Double confidence); - - /** - *

Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

- * @param path value to be set - */ - - public void setPath(final String path); - - /** - * factory method - * @return instance of ProjectCategoryRecommendation - */ - public static ProjectCategoryRecommendation of() { - return new ProjectCategoryRecommendationImpl(); - } - - /** - * factory method to create a shallow copy ProjectCategoryRecommendation - * @param template instance to be copied - * @return copy instance - */ - public static ProjectCategoryRecommendation of(final ProjectCategoryRecommendation template) { - ProjectCategoryRecommendationImpl instance = new ProjectCategoryRecommendationImpl(); - instance.setCategory(template.getCategory()); - instance.setConfidence(template.getConfidence()); - instance.setPath(template.getPath()); - return instance; - } - - /** - * factory method to create a deep copy of ProjectCategoryRecommendation - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProjectCategoryRecommendation deepCopy(@Nullable final ProjectCategoryRecommendation template) { - if (template == null) { - return null; - } - ProjectCategoryRecommendationImpl instance = new ProjectCategoryRecommendationImpl(); - instance.setCategory(com.commercetools.ml.models.common.CategoryReference.deepCopy(template.getCategory())); - instance.setConfidence(template.getConfidence()); - instance.setPath(template.getPath()); - return instance; - } - - /** - * builder factory method for ProjectCategoryRecommendation - * @return builder - */ - public static ProjectCategoryRecommendationBuilder builder() { - return ProjectCategoryRecommendationBuilder.of(); - } - - /** - * create builder for ProjectCategoryRecommendation instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProjectCategoryRecommendationBuilder builder(final ProjectCategoryRecommendation template) { - return ProjectCategoryRecommendationBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProjectCategoryRecommendation(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationBuilder.java deleted file mode 100644 index 44359eeb28a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationBuilder.java +++ /dev/null @@ -1,158 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProjectCategoryRecommendationBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProjectCategoryRecommendation projectCategoryRecommendation = ProjectCategoryRecommendation.builder()
- *             .category(categoryBuilder -> categoryBuilder)
- *             .confidence(0.3)
- *             .path("{path}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProjectCategoryRecommendationBuilder implements Builder { - - private com.commercetools.ml.models.common.CategoryReference category; - - private Double confidence; - - private String path; - - /** - *

A category that is recommended for a product.

- * @param builder function to build the category value - * @return Builder - */ - - public ProjectCategoryRecommendationBuilder category( - Function builder) { - this.category = builder.apply(com.commercetools.ml.models.common.CategoryReferenceBuilder.of()).build(); - return this; - } - - /** - *

A category that is recommended for a product.

- * @param builder function to build the category value - * @return Builder - */ - - public ProjectCategoryRecommendationBuilder withCategory( - Function builder) { - this.category = builder.apply(com.commercetools.ml.models.common.CategoryReferenceBuilder.of()); - return this; - } - - /** - *

A category that is recommended for a product.

- * @param category value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationBuilder category( - final com.commercetools.ml.models.common.CategoryReference category) { - this.category = category; - return this; - } - - /** - *

Probability score for the category recommendation.

- * @param confidence value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationBuilder confidence(final Double confidence) { - this.confidence = confidence; - return this; - } - - /** - *

Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

- * @param path value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationBuilder path(final String path) { - this.path = path; - return this; - } - - /** - *

A category that is recommended for a product.

- * @return category - */ - - public com.commercetools.ml.models.common.CategoryReference getCategory() { - return this.category; - } - - /** - *

Probability score for the category recommendation.

- * @return confidence - */ - - public Double getConfidence() { - return this.confidence; - } - - /** - *

Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

- * @return path - */ - - public String getPath() { - return this.path; - } - - /** - * builds ProjectCategoryRecommendation with checking for non-null required values - * @return ProjectCategoryRecommendation - */ - public ProjectCategoryRecommendation build() { - Objects.requireNonNull(category, ProjectCategoryRecommendation.class + ": category is missing"); - Objects.requireNonNull(confidence, ProjectCategoryRecommendation.class + ": confidence is missing"); - Objects.requireNonNull(path, ProjectCategoryRecommendation.class + ": path is missing"); - return new ProjectCategoryRecommendationImpl(category, confidence, path); - } - - /** - * builds ProjectCategoryRecommendation without checking for non-null required values - * @return ProjectCategoryRecommendation - */ - public ProjectCategoryRecommendation buildUnchecked() { - return new ProjectCategoryRecommendationImpl(category, confidence, path); - } - - /** - * factory method for an instance of ProjectCategoryRecommendationBuilder - * @return builder - */ - public static ProjectCategoryRecommendationBuilder of() { - return new ProjectCategoryRecommendationBuilder(); - } - - /** - * create builder for ProjectCategoryRecommendation instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProjectCategoryRecommendationBuilder of(final ProjectCategoryRecommendation template) { - ProjectCategoryRecommendationBuilder builder = new ProjectCategoryRecommendationBuilder(); - builder.category = template.getCategory(); - builder.confidence = template.getConfidence(); - builder.path = template.getPath(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationImpl.java deleted file mode 100644 index 48230c251c7..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationImpl.java +++ /dev/null @@ -1,117 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ProjectCategoryRecommendation - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProjectCategoryRecommendationImpl implements ProjectCategoryRecommendation, ModelBase { - - private com.commercetools.ml.models.common.CategoryReference category; - - private Double confidence; - - private String path; - - /** - * create instance with all properties - */ - @JsonCreator - ProjectCategoryRecommendationImpl( - @JsonProperty("category") final com.commercetools.ml.models.common.CategoryReference category, - @JsonProperty("confidence") final Double confidence, @JsonProperty("path") final String path) { - this.category = category; - this.confidence = confidence; - this.path = path; - } - - /** - * create empty instance - */ - public ProjectCategoryRecommendationImpl() { - } - - /** - *

A category that is recommended for a product.

- */ - - public com.commercetools.ml.models.common.CategoryReference getCategory() { - return this.category; - } - - /** - *

Probability score for the category recommendation.

- */ - - public Double getConfidence() { - return this.confidence; - } - - /** - *

Breadcrumb path to the recommended category. This only picks up one language, not all available languages for the category. English is prioritized, but if English data is not available, an arbitrary language is selected. Do not use this to identify a category,use the category ID from the category reference instead.

- */ - - public String getPath() { - return this.path; - } - - public void setCategory(final com.commercetools.ml.models.common.CategoryReference category) { - this.category = category; - } - - public void setConfidence(final Double confidence) { - this.confidence = confidence; - } - - public void setPath(final String path) { - this.path = path; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProjectCategoryRecommendationImpl that = (ProjectCategoryRecommendationImpl) o; - - return new EqualsBuilder().append(category, that.category) - .append(confidence, that.confidence) - .append(path, that.path) - .append(category, that.category) - .append(confidence, that.confidence) - .append(path, that.path) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(category).append(confidence).append(path).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("category", category) - .append("confidence", confidence) - .append("path", path) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMeta.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMeta.java deleted file mode 100644 index f9ce15c5080..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMeta.java +++ /dev/null @@ -1,165 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProjectCategoryRecommendationMeta - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProjectCategoryRecommendationMeta projectCategoryRecommendationMeta = ProjectCategoryRecommendationMeta.builder()
- *             .plusGeneralCategoryNames(generalCategoryNamesBuilder -> generalCategoryNamesBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProjectCategoryRecommendationMetaImpl.class) -public interface ProjectCategoryRecommendationMeta { - - /** - *

The product name that was used to generate recommendations.

- * @return productName - */ - - @JsonProperty("productName") - public String getProductName(); - - /** - *

The product image that was used to generate recommendations.

- * @return productImageUrl - */ - - @JsonProperty("productImageUrl") - public String getProductImageUrl(); - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @return generalCategoryNames - */ - @NotNull - @JsonProperty("generalCategoryNames") - public List getGeneralCategoryNames(); - - /** - *

The product name that was used to generate recommendations.

- * @param productName value to be set - */ - - public void setProductName(final String productName); - - /** - *

The product image that was used to generate recommendations.

- * @param productImageUrl value to be set - */ - - public void setProductImageUrl(final String productImageUrl); - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @param generalCategoryNames values to be set - */ - - @JsonIgnore - public void setGeneralCategoryNames(final String... generalCategoryNames); - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @param generalCategoryNames values to be set - */ - - public void setGeneralCategoryNames(final List generalCategoryNames); - - /** - * factory method - * @return instance of ProjectCategoryRecommendationMeta - */ - public static ProjectCategoryRecommendationMeta of() { - return new ProjectCategoryRecommendationMetaImpl(); - } - - /** - * factory method to create a shallow copy ProjectCategoryRecommendationMeta - * @param template instance to be copied - * @return copy instance - */ - public static ProjectCategoryRecommendationMeta of(final ProjectCategoryRecommendationMeta template) { - ProjectCategoryRecommendationMetaImpl instance = new ProjectCategoryRecommendationMetaImpl(); - instance.setProductName(template.getProductName()); - instance.setProductImageUrl(template.getProductImageUrl()); - instance.setGeneralCategoryNames(template.getGeneralCategoryNames()); - return instance; - } - - /** - * factory method to create a deep copy of ProjectCategoryRecommendationMeta - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProjectCategoryRecommendationMeta deepCopy( - @Nullable final ProjectCategoryRecommendationMeta template) { - if (template == null) { - return null; - } - ProjectCategoryRecommendationMetaImpl instance = new ProjectCategoryRecommendationMetaImpl(); - instance.setProductName(template.getProductName()); - instance.setProductImageUrl(template.getProductImageUrl()); - instance.setGeneralCategoryNames( - Optional.ofNullable(template.getGeneralCategoryNames()).map(ArrayList::new).orElse(null)); - return instance; - } - - /** - * builder factory method for ProjectCategoryRecommendationMeta - * @return builder - */ - public static ProjectCategoryRecommendationMetaBuilder builder() { - return ProjectCategoryRecommendationMetaBuilder.of(); - } - - /** - * create builder for ProjectCategoryRecommendationMeta instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProjectCategoryRecommendationMetaBuilder builder(final ProjectCategoryRecommendationMeta template) { - return ProjectCategoryRecommendationMetaBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProjectCategoryRecommendationMeta(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaBuilder.java deleted file mode 100644 index 24d89f56785..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaBuilder.java +++ /dev/null @@ -1,161 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.util.*; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProjectCategoryRecommendationMetaBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProjectCategoryRecommendationMeta projectCategoryRecommendationMeta = ProjectCategoryRecommendationMeta.builder()
- *             .plusGeneralCategoryNames(generalCategoryNamesBuilder -> generalCategoryNamesBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProjectCategoryRecommendationMetaBuilder implements Builder { - - @Nullable - private String productName; - - @Nullable - private String productImageUrl; - - private java.util.List generalCategoryNames; - - /** - *

The product name that was used to generate recommendations.

- * @param productName value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationMetaBuilder productName(@Nullable final String productName) { - this.productName = productName; - return this; - } - - /** - *

The product image that was used to generate recommendations.

- * @param productImageUrl value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationMetaBuilder productImageUrl(@Nullable final String productImageUrl) { - this.productImageUrl = productImageUrl; - return this; - } - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @param generalCategoryNames value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationMetaBuilder generalCategoryNames(final String... generalCategoryNames) { - this.generalCategoryNames = new ArrayList<>(Arrays.asList(generalCategoryNames)); - return this; - } - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @param generalCategoryNames value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationMetaBuilder generalCategoryNames( - final java.util.List generalCategoryNames) { - this.generalCategoryNames = generalCategoryNames; - return this; - } - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @param generalCategoryNames value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationMetaBuilder plusGeneralCategoryNames(final String... generalCategoryNames) { - if (this.generalCategoryNames == null) { - this.generalCategoryNames = new ArrayList<>(); - } - this.generalCategoryNames.addAll(Arrays.asList(generalCategoryNames)); - return this; - } - - /** - *

The product name that was used to generate recommendations.

- * @return productName - */ - - @Nullable - public String getProductName() { - return this.productName; - } - - /** - *

The product image that was used to generate recommendations.

- * @return productImageUrl - */ - - @Nullable - public String getProductImageUrl() { - return this.productImageUrl; - } - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- * @return generalCategoryNames - */ - - public java.util.List getGeneralCategoryNames() { - return this.generalCategoryNames; - } - - /** - * builds ProjectCategoryRecommendationMeta with checking for non-null required values - * @return ProjectCategoryRecommendationMeta - */ - public ProjectCategoryRecommendationMeta build() { - Objects.requireNonNull(generalCategoryNames, - ProjectCategoryRecommendationMeta.class + ": generalCategoryNames is missing"); - return new ProjectCategoryRecommendationMetaImpl(productName, productImageUrl, generalCategoryNames); - } - - /** - * builds ProjectCategoryRecommendationMeta without checking for non-null required values - * @return ProjectCategoryRecommendationMeta - */ - public ProjectCategoryRecommendationMeta buildUnchecked() { - return new ProjectCategoryRecommendationMetaImpl(productName, productImageUrl, generalCategoryNames); - } - - /** - * factory method for an instance of ProjectCategoryRecommendationMetaBuilder - * @return builder - */ - public static ProjectCategoryRecommendationMetaBuilder of() { - return new ProjectCategoryRecommendationMetaBuilder(); - } - - /** - * create builder for ProjectCategoryRecommendationMeta instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProjectCategoryRecommendationMetaBuilder of(final ProjectCategoryRecommendationMeta template) { - ProjectCategoryRecommendationMetaBuilder builder = new ProjectCategoryRecommendationMetaBuilder(); - builder.productName = template.getProductName(); - builder.productImageUrl = template.getProductImageUrl(); - builder.generalCategoryNames = template.getGeneralCategoryNames(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaImpl.java deleted file mode 100644 index dbc84ffac0d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaImpl.java +++ /dev/null @@ -1,124 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ProjectCategoryRecommendationMeta - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProjectCategoryRecommendationMetaImpl implements ProjectCategoryRecommendationMeta, ModelBase { - - private String productName; - - private String productImageUrl; - - private java.util.List generalCategoryNames; - - /** - * create instance with all properties - */ - @JsonCreator - ProjectCategoryRecommendationMetaImpl(@JsonProperty("productName") final String productName, - @JsonProperty("productImageUrl") final String productImageUrl, - @JsonProperty("generalCategoryNames") final java.util.List generalCategoryNames) { - this.productName = productName; - this.productImageUrl = productImageUrl; - this.generalCategoryNames = generalCategoryNames; - } - - /** - * create empty instance - */ - public ProjectCategoryRecommendationMetaImpl() { - } - - /** - *

The product name that was used to generate recommendations.

- */ - - public String getProductName() { - return this.productName; - } - - /** - *

The product image that was used to generate recommendations.

- */ - - public String getProductImageUrl() { - return this.productImageUrl; - } - - /** - *

Top 5 general categories that were used internally to generate the project-specific categories. These category names are not related to the categories defined in the project, but they provide additional information to understand the project-specific categories in the results section.

- */ - - public java.util.List getGeneralCategoryNames() { - return this.generalCategoryNames; - } - - public void setProductName(final String productName) { - this.productName = productName; - } - - public void setProductImageUrl(final String productImageUrl) { - this.productImageUrl = productImageUrl; - } - - public void setGeneralCategoryNames(final String... generalCategoryNames) { - this.generalCategoryNames = new ArrayList<>(Arrays.asList(generalCategoryNames)); - } - - public void setGeneralCategoryNames(final java.util.List generalCategoryNames) { - this.generalCategoryNames = generalCategoryNames; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProjectCategoryRecommendationMetaImpl that = (ProjectCategoryRecommendationMetaImpl) o; - - return new EqualsBuilder().append(productName, that.productName) - .append(productImageUrl, that.productImageUrl) - .append(generalCategoryNames, that.generalCategoryNames) - .append(productName, that.productName) - .append(productImageUrl, that.productImageUrl) - .append(generalCategoryNames, that.generalCategoryNames) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(productName) - .append(productImageUrl) - .append(generalCategoryNames) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("productName", productName) - .append("productImageUrl", productImageUrl) - .append("generalCategoryNames", generalCategoryNames) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponse.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponse.java deleted file mode 100644 index a8bfeb9a854..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponse.java +++ /dev/null @@ -1,215 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProjectCategoryRecommendationPagedQueryResponse - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProjectCategoryRecommendationPagedQueryResponse projectCategoryRecommendationPagedQueryResponse = ProjectCategoryRecommendationPagedQueryResponse.builder()
- *             .count(0.3)
- *             .total(0.3)
- *             .offset(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .meta(metaBuilder -> metaBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProjectCategoryRecommendationPagedQueryResponseImpl.class) -public interface ProjectCategoryRecommendationPagedQueryResponse { - - /** - * - * @return count - */ - @NotNull - @JsonProperty("count") - public Long getCount(); - - /** - * - * @return total - */ - @NotNull - @JsonProperty("total") - public Long getTotal(); - - /** - *

Number of elements skipped.

- * @return offset - */ - @NotNull - @JsonProperty("offset") - public Long getOffset(); - - /** - * - * @return results - */ - @NotNull - @Valid - @JsonProperty("results") - public List getResults(); - - /** - * - * @return meta - */ - @NotNull - @Valid - @JsonProperty("meta") - public ProjectCategoryRecommendationMeta getMeta(); - - /** - * set count - * @param count value to be set - */ - - public void setCount(final Long count); - - /** - * set total - * @param total value to be set - */ - - public void setTotal(final Long total); - - /** - *

Number of elements skipped.

- * @param offset value to be set - */ - - public void setOffset(final Long offset); - - /** - * set results - * @param results values to be set - */ - - @JsonIgnore - public void setResults(final ProjectCategoryRecommendation... results); - - /** - * set results - * @param results values to be set - */ - - public void setResults(final List results); - - /** - * set meta - * @param meta value to be set - */ - - public void setMeta(final ProjectCategoryRecommendationMeta meta); - - /** - * factory method - * @return instance of ProjectCategoryRecommendationPagedQueryResponse - */ - public static ProjectCategoryRecommendationPagedQueryResponse of() { - return new ProjectCategoryRecommendationPagedQueryResponseImpl(); - } - - /** - * factory method to create a shallow copy ProjectCategoryRecommendationPagedQueryResponse - * @param template instance to be copied - * @return copy instance - */ - public static ProjectCategoryRecommendationPagedQueryResponse of( - final ProjectCategoryRecommendationPagedQueryResponse template) { - ProjectCategoryRecommendationPagedQueryResponseImpl instance = new ProjectCategoryRecommendationPagedQueryResponseImpl(); - instance.setCount(template.getCount()); - instance.setTotal(template.getTotal()); - instance.setOffset(template.getOffset()); - instance.setResults(template.getResults()); - instance.setMeta(template.getMeta()); - return instance; - } - - /** - * factory method to create a deep copy of ProjectCategoryRecommendationPagedQueryResponse - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProjectCategoryRecommendationPagedQueryResponse deepCopy( - @Nullable final ProjectCategoryRecommendationPagedQueryResponse template) { - if (template == null) { - return null; - } - ProjectCategoryRecommendationPagedQueryResponseImpl instance = new ProjectCategoryRecommendationPagedQueryResponseImpl(); - instance.setCount(template.getCount()); - instance.setTotal(template.getTotal()); - instance.setOffset(template.getOffset()); - instance.setResults(Optional.ofNullable(template.getResults()) - .map(t -> t.stream() - .map( - com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - instance.setMeta(com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta - .deepCopy(template.getMeta())); - return instance; - } - - /** - * builder factory method for ProjectCategoryRecommendationPagedQueryResponse - * @return builder - */ - public static ProjectCategoryRecommendationPagedQueryResponseBuilder builder() { - return ProjectCategoryRecommendationPagedQueryResponseBuilder.of(); - } - - /** - * create builder for ProjectCategoryRecommendationPagedQueryResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProjectCategoryRecommendationPagedQueryResponseBuilder builder( - final ProjectCategoryRecommendationPagedQueryResponse template) { - return ProjectCategoryRecommendationPagedQueryResponseBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProjectCategoryRecommendationPagedQueryResponse( - Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseBuilder.java deleted file mode 100644 index 49be73b89c9..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseBuilder.java +++ /dev/null @@ -1,298 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProjectCategoryRecommendationPagedQueryResponseBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProjectCategoryRecommendationPagedQueryResponse projectCategoryRecommendationPagedQueryResponse = ProjectCategoryRecommendationPagedQueryResponse.builder()
- *             .count(0.3)
- *             .total(0.3)
- *             .offset(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .meta(metaBuilder -> metaBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProjectCategoryRecommendationPagedQueryResponseBuilder - implements Builder { - - private Long count; - - private Long total; - - private Long offset; - - private java.util.List results; - - private com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta; - - /** - * set the value to the count - * @param count value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder count(final Long count) { - this.count = count; - return this; - } - - /** - * set the value to the total - * @param total value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder total(final Long total) { - this.total = total; - return this; - } - - /** - *

Number of elements skipped.

- * @param offset value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder offset(final Long offset) { - this.offset = offset; - return this; - } - - /** - * set values to the results - * @param results value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder results( - final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - return this; - } - - /** - * set value to the results - * @param results value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder results( - final java.util.List results) { - this.results = results; - return this; - } - - /** - * add values to the results - * @param results value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder plusResults( - final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation... results) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.addAll(Arrays.asList(results)); - return this; - } - - /** - * add the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder plusResults( - Function builder) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.add(builder - .apply(com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationBuilder.of()) - .build()); - return this; - } - - /** - * set the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder withResults( - Function builder) { - this.results = new ArrayList<>(); - this.results.add(builder - .apply(com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationBuilder.of()) - .build()); - return this; - } - - /** - * add the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder addResults( - Function builder) { - return plusResults(builder - .apply(com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationBuilder.of())); - } - - /** - * set the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder setResults( - Function builder) { - return results(builder - .apply(com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationBuilder.of())); - } - - /** - * set the value to the meta using the builder function - * @param builder function to build the meta value - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder meta( - Function builder) { - this.meta = builder - .apply( - com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMetaBuilder.of()) - .build(); - return this; - } - - /** - * set the value to the meta using the builder function - * @param builder function to build the meta value - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder withMeta( - Function builder) { - this.meta = builder.apply( - com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMetaBuilder.of()); - return this; - } - - /** - * set the value to the meta - * @param meta value to be set - * @return Builder - */ - - public ProjectCategoryRecommendationPagedQueryResponseBuilder meta( - final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta) { - this.meta = meta; - return this; - } - - /** - * value of count} - * @return count - */ - - public Long getCount() { - return this.count; - } - - /** - * value of total} - * @return total - */ - - public Long getTotal() { - return this.total; - } - - /** - *

Number of elements skipped.

- * @return offset - */ - - public Long getOffset() { - return this.offset; - } - - /** - * value of results} - * @return results - */ - - public java.util.List getResults() { - return this.results; - } - - /** - * value of meta} - * @return meta - */ - - public com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta getMeta() { - return this.meta; - } - - /** - * builds ProjectCategoryRecommendationPagedQueryResponse with checking for non-null required values - * @return ProjectCategoryRecommendationPagedQueryResponse - */ - public ProjectCategoryRecommendationPagedQueryResponse build() { - Objects.requireNonNull(count, ProjectCategoryRecommendationPagedQueryResponse.class + ": count is missing"); - Objects.requireNonNull(total, ProjectCategoryRecommendationPagedQueryResponse.class + ": total is missing"); - Objects.requireNonNull(offset, ProjectCategoryRecommendationPagedQueryResponse.class + ": offset is missing"); - Objects.requireNonNull(results, ProjectCategoryRecommendationPagedQueryResponse.class + ": results is missing"); - Objects.requireNonNull(meta, ProjectCategoryRecommendationPagedQueryResponse.class + ": meta is missing"); - return new ProjectCategoryRecommendationPagedQueryResponseImpl(count, total, offset, results, meta); - } - - /** - * builds ProjectCategoryRecommendationPagedQueryResponse without checking for non-null required values - * @return ProjectCategoryRecommendationPagedQueryResponse - */ - public ProjectCategoryRecommendationPagedQueryResponse buildUnchecked() { - return new ProjectCategoryRecommendationPagedQueryResponseImpl(count, total, offset, results, meta); - } - - /** - * factory method for an instance of ProjectCategoryRecommendationPagedQueryResponseBuilder - * @return builder - */ - public static ProjectCategoryRecommendationPagedQueryResponseBuilder of() { - return new ProjectCategoryRecommendationPagedQueryResponseBuilder(); - } - - /** - * create builder for ProjectCategoryRecommendationPagedQueryResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProjectCategoryRecommendationPagedQueryResponseBuilder of( - final ProjectCategoryRecommendationPagedQueryResponse template) { - ProjectCategoryRecommendationPagedQueryResponseBuilder builder = new ProjectCategoryRecommendationPagedQueryResponseBuilder(); - builder.count = template.getCount(); - builder.total = template.getTotal(); - builder.offset = template.getOffset(); - builder.results = template.getResults(); - builder.meta = template.getMeta(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseImpl.java deleted file mode 100644 index 04f2308d40d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseImpl.java +++ /dev/null @@ -1,167 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ProjectCategoryRecommendationPagedQueryResponse - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProjectCategoryRecommendationPagedQueryResponseImpl - implements ProjectCategoryRecommendationPagedQueryResponse, ModelBase { - - private Long count; - - private Long total; - - private Long offset; - - private java.util.List results; - - private com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta; - - /** - * create instance with all properties - */ - @JsonCreator - ProjectCategoryRecommendationPagedQueryResponseImpl(@JsonProperty("count") final Long count, - @JsonProperty("total") final Long total, @JsonProperty("offset") final Long offset, - @JsonProperty("results") final java.util.List results, - @JsonProperty("meta") final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta) { - this.count = count; - this.total = total; - this.offset = offset; - this.results = results; - this.meta = meta; - } - - /** - * create empty instance - */ - public ProjectCategoryRecommendationPagedQueryResponseImpl() { - } - - /** - * - */ - - public Long getCount() { - return this.count; - } - - /** - * - */ - - public Long getTotal() { - return this.total; - } - - /** - *

Number of elements skipped.

- */ - - public Long getOffset() { - return this.offset; - } - - /** - * - */ - - public java.util.List getResults() { - return this.results; - } - - /** - * - */ - - public com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta getMeta() { - return this.meta; - } - - public void setCount(final Long count) { - this.count = count; - } - - public void setTotal(final Long total) { - this.total = total; - } - - public void setOffset(final Long offset) { - this.offset = offset; - } - - public void setResults( - final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendation... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - } - - public void setResults( - final java.util.List results) { - this.results = results; - } - - public void setMeta( - final com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMeta meta) { - this.meta = meta; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProjectCategoryRecommendationPagedQueryResponseImpl that = (ProjectCategoryRecommendationPagedQueryResponseImpl) o; - - return new EqualsBuilder().append(count, that.count) - .append(total, that.total) - .append(offset, that.offset) - .append(results, that.results) - .append(meta, that.meta) - .append(count, that.count) - .append(total, that.total) - .append(offset, that.offset) - .append(results, that.results) - .append(meta, that.meta) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(count) - .append(total) - .append(offset) - .append(results) - .append(meta) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count) - .append("total", total) - .append("offset", offset) - .append("results", results) - .append("meta", meta) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReference.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReference.java deleted file mode 100644 index 4b435eced43..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReference.java +++ /dev/null @@ -1,110 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * CategoryReference - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     CategoryReference categoryReference = CategoryReference.builder()
- *             .id("{id}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = CategoryReferenceImpl.class) -public interface CategoryReference extends Reference { - - /** - * discriminator value for CategoryReference - */ - String CATEGORY = "category"; - - /** - * factory method - * @return instance of CategoryReference - */ - public static CategoryReference of() { - return new CategoryReferenceImpl(); - } - - /** - * factory method to create a shallow copy CategoryReference - * @param template instance to be copied - * @return copy instance - */ - public static CategoryReference of(final CategoryReference template) { - CategoryReferenceImpl instance = new CategoryReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * factory method to create a deep copy of CategoryReference - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static CategoryReference deepCopy(@Nullable final CategoryReference template) { - if (template == null) { - return null; - } - CategoryReferenceImpl instance = new CategoryReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * builder factory method for CategoryReference - * @return builder - */ - public static CategoryReferenceBuilder builder() { - return CategoryReferenceBuilder.of(); - } - - /** - * create builder for CategoryReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static CategoryReferenceBuilder builder(final CategoryReference template) { - return CategoryReferenceBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withCategoryReference(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReferenceBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReferenceBuilder.java deleted file mode 100644 index abfe5129a2b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReferenceBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * CategoryReferenceBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     CategoryReference categoryReference = CategoryReference.builder()
- *             .id("{id}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class CategoryReferenceBuilder implements Builder { - - private String id; - - /** - * set the value to the id - * @param id value to be set - * @return Builder - */ - - public CategoryReferenceBuilder id(final String id) { - this.id = id; - return this; - } - - /** - * value of id} - * @return id - */ - - public String getId() { - return this.id; - } - - /** - * builds CategoryReference with checking for non-null required values - * @return CategoryReference - */ - public CategoryReference build() { - Objects.requireNonNull(id, CategoryReference.class + ": id is missing"); - return new CategoryReferenceImpl(id); - } - - /** - * builds CategoryReference without checking for non-null required values - * @return CategoryReference - */ - public CategoryReference buildUnchecked() { - return new CategoryReferenceImpl(id); - } - - /** - * factory method for an instance of CategoryReferenceBuilder - * @return builder - */ - public static CategoryReferenceBuilder of() { - return new CategoryReferenceBuilder(); - } - - /** - * create builder for CategoryReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static CategoryReferenceBuilder of(final CategoryReference template) { - CategoryReferenceBuilder builder = new CategoryReferenceBuilder(); - builder.id = template.getId(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReferenceImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReferenceImpl.java deleted file mode 100644 index 5d7881b6740..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/CategoryReferenceImpl.java +++ /dev/null @@ -1,94 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * CategoryReference - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class CategoryReferenceImpl implements CategoryReference, ModelBase { - - private com.commercetools.ml.models.common.ReferenceTypeId typeId; - - private String id; - - /** - * create instance with all properties - */ - @JsonCreator - CategoryReferenceImpl(@JsonProperty("id") final String id) { - this.id = id; - this.typeId = ReferenceTypeId.findEnum("category"); - } - - /** - * create empty instance - */ - public CategoryReferenceImpl() { - this.typeId = ReferenceTypeId.findEnum("category"); - } - - /** - * - */ - - public com.commercetools.ml.models.common.ReferenceTypeId getTypeId() { - return this.typeId; - } - - /** - * - */ - - public String getId() { - return this.id; - } - - public void setId(final String id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - CategoryReferenceImpl that = (CategoryReferenceImpl) o; - - return new EqualsBuilder().append(typeId, that.typeId) - .append(id, that.id) - .append(typeId, that.typeId) - .append(id, that.id) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) - .append("id", id) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedString.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedString.java deleted file mode 100644 index b9ae895d59d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedString.java +++ /dev/null @@ -1,123 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * LocalizedString - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     LocalizedString localizedString = LocalizedString.builder()
- *             ./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = LocalizedStringImpl.class) -public interface LocalizedString { - - /** - * - * @return map of the pattern property values - */ - @NotNull - @JsonAnyGetter - public Map values(); - - /** - * set pattern property - * @param key property name - * @param value property value - */ - - @JsonAnySetter - public void setValue(String key, String value); - - /** - * factory method - * @return instance of LocalizedString - */ - public static LocalizedString of() { - return new LocalizedStringImpl(); - } - - /** - * factory method to create a shallow copy LocalizedString - * @param template instance to be copied - * @return copy instance - */ - public static LocalizedString of(final LocalizedString template) { - LocalizedStringImpl instance = new LocalizedStringImpl(); - Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); - return instance; - } - - /** - * factory method to create a deep copy of LocalizedString - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static LocalizedString deepCopy(@Nullable final LocalizedString template) { - if (template == null) { - return null; - } - LocalizedStringImpl instance = new LocalizedStringImpl(); - Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); - return instance; - } - - /** - * builder factory method for LocalizedString - * @return builder - */ - public static LocalizedStringBuilder builder() { - return LocalizedStringBuilder.of(); - } - - /** - * create builder for LocalizedString instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static LocalizedStringBuilder builder(final LocalizedString template) { - return LocalizedStringBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withLocalizedString(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedStringBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedStringBuilder.java deleted file mode 100644 index 02c02bc1b17..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedStringBuilder.java +++ /dev/null @@ -1,96 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * LocalizedStringBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     LocalizedString localizedString = LocalizedString.builder()
- *             ./^[a-z]{2}(-[A-Z]{2})?$/("{/^[a-z]{2}(-[A-Z]{2})?$/}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class LocalizedStringBuilder implements Builder { - - private Map values = new HashMap<>(); - - /** - * assign pattern properties to the builder - * @param values properties to be set - * @return Builder - */ - - public LocalizedStringBuilder values(final Map values) { - this.values = values; - return this; - } - - /** - * assign a pattern property to the builder - * @param key property name - * @param value property value - * @return Builder - */ - - public LocalizedStringBuilder addValue(final String key, final String value) { - if (this.values == null) { - values = new HashMap<>(); - } - values.put(key, value); - return this; - } - - /** - * values of pattern properties - * @return pattern properties - */ - - public Map getValues() { - return this.values; - } - - /** - * builds LocalizedString with checking for non-null required values - * @return LocalizedString - */ - public LocalizedString build() { - return new LocalizedStringImpl(values); - } - - /** - * builds LocalizedString without checking for non-null required values - * @return LocalizedString - */ - public LocalizedString buildUnchecked() { - return new LocalizedStringImpl(values); - } - - /** - * factory method for an instance of LocalizedStringBuilder - * @return builder - */ - public static LocalizedStringBuilder of() { - return new LocalizedStringBuilder(); - } - - /** - * create builder for LocalizedString instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static LocalizedStringBuilder of(final LocalizedString template) { - LocalizedStringBuilder builder = new LocalizedStringBuilder(); - builder.values = template.values(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedStringImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedStringImpl.java deleted file mode 100644 index 9b83bd38adf..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/LocalizedStringImpl.java +++ /dev/null @@ -1,79 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * LocalizedString - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class LocalizedStringImpl implements LocalizedString, ModelBase { - - private Map values; - - /** - * create instance with all properties - */ - @JsonCreator - LocalizedStringImpl(@JsonProperty("values") final Map values) { - this.values = values; - } - - /** - * create empty instance - */ - public LocalizedStringImpl() { - } - - /** - * - */ - - public Map values() { - return values; - } - - public void setValue(String key, String value) { - if (values == null) { - values = new HashMap<>(); - } - values.put(key, value); - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - LocalizedStringImpl that = (LocalizedStringImpl) o; - - return new EqualsBuilder().append(values, that.values).append(values, that.values).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(values).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("values", values).build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/Money.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/Money.java deleted file mode 100644 index 29b385f7953..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/Money.java +++ /dev/null @@ -1,139 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * Money - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     Money money = Money.builder()
- *             .centAmount(0.3)
- *             .currencyCode("{currencyCode}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = MoneyImpl.class) -public interface Money { - - /** - * - * @return centAmount - */ - @NotNull - @JsonProperty("centAmount") - public Long getCentAmount(); - - /** - *

The currency code compliant to ISO 4217.

- * @return currencyCode - */ - @NotNull - @JsonProperty("currencyCode") - public String getCurrencyCode(); - - /** - * set centAmount - * @param centAmount value to be set - */ - - public void setCentAmount(final Long centAmount); - - /** - *

The currency code compliant to ISO 4217.

- * @param currencyCode value to be set - */ - - public void setCurrencyCode(final String currencyCode); - - /** - * factory method - * @return instance of Money - */ - public static Money of() { - return new MoneyImpl(); - } - - /** - * factory method to create a shallow copy Money - * @param template instance to be copied - * @return copy instance - */ - public static Money of(final Money template) { - MoneyImpl instance = new MoneyImpl(); - instance.setCentAmount(template.getCentAmount()); - instance.setCurrencyCode(template.getCurrencyCode()); - return instance; - } - - /** - * factory method to create a deep copy of Money - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static Money deepCopy(@Nullable final Money template) { - if (template == null) { - return null; - } - MoneyImpl instance = new MoneyImpl(); - instance.setCentAmount(template.getCentAmount()); - instance.setCurrencyCode(template.getCurrencyCode()); - return instance; - } - - /** - * builder factory method for Money - * @return builder - */ - public static MoneyBuilder builder() { - return MoneyBuilder.of(); - } - - /** - * create builder for Money instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static MoneyBuilder builder(final Money template) { - return MoneyBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withMoney(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/MoneyBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/MoneyBuilder.java deleted file mode 100644 index 7b3529228d3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/MoneyBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * MoneyBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     Money money = Money.builder()
- *             .centAmount(0.3)
- *             .currencyCode("{currencyCode}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class MoneyBuilder implements Builder { - - private Long centAmount; - - private String currencyCode; - - /** - * set the value to the centAmount - * @param centAmount value to be set - * @return Builder - */ - - public MoneyBuilder centAmount(final Long centAmount) { - this.centAmount = centAmount; - return this; - } - - /** - *

The currency code compliant to ISO 4217.

- * @param currencyCode value to be set - * @return Builder - */ - - public MoneyBuilder currencyCode(final String currencyCode) { - this.currencyCode = currencyCode; - return this; - } - - /** - * value of centAmount} - * @return centAmount - */ - - public Long getCentAmount() { - return this.centAmount; - } - - /** - *

The currency code compliant to ISO 4217.

- * @return currencyCode - */ - - public String getCurrencyCode() { - return this.currencyCode; - } - - /** - * builds Money with checking for non-null required values - * @return Money - */ - public Money build() { - Objects.requireNonNull(centAmount, Money.class + ": centAmount is missing"); - Objects.requireNonNull(currencyCode, Money.class + ": currencyCode is missing"); - return new MoneyImpl(centAmount, currencyCode); - } - - /** - * builds Money without checking for non-null required values - * @return Money - */ - public Money buildUnchecked() { - return new MoneyImpl(centAmount, currencyCode); - } - - /** - * factory method for an instance of MoneyBuilder - * @return builder - */ - public static MoneyBuilder of() { - return new MoneyBuilder(); - } - - /** - * create builder for Money instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static MoneyBuilder of(final Money template) { - MoneyBuilder builder = new MoneyBuilder(); - builder.centAmount = template.getCentAmount(); - builder.currencyCode = template.getCurrencyCode(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/MoneyImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/MoneyImpl.java deleted file mode 100644 index a175c025fa0..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/MoneyImpl.java +++ /dev/null @@ -1,98 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * Money - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class MoneyImpl implements Money, ModelBase { - - private Long centAmount; - - private String currencyCode; - - /** - * create instance with all properties - */ - @JsonCreator - MoneyImpl(@JsonProperty("centAmount") final Long centAmount, - @JsonProperty("currencyCode") final String currencyCode) { - this.centAmount = centAmount; - this.currencyCode = currencyCode; - } - - /** - * create empty instance - */ - public MoneyImpl() { - } - - /** - * - */ - - public Long getCentAmount() { - return this.centAmount; - } - - /** - *

The currency code compliant to ISO 4217.

- */ - - public String getCurrencyCode() { - return this.currencyCode; - } - - public void setCentAmount(final Long centAmount) { - this.centAmount = centAmount; - } - - public void setCurrencyCode(final String currencyCode) { - this.currencyCode = currencyCode; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - MoneyImpl that = (MoneyImpl) o; - - return new EqualsBuilder().append(centAmount, that.centAmount) - .append(currencyCode, that.currencyCode) - .append(centAmount, that.centAmount) - .append(currencyCode, that.currencyCode) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(centAmount).append(currencyCode).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("centAmount", centAmount) - .append("currencyCode", currencyCode) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReference.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReference.java deleted file mode 100644 index 15ad6d08d5d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReference.java +++ /dev/null @@ -1,110 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductReference - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductReference productReference = ProductReference.builder()
- *             .id("{id}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProductReferenceImpl.class) -public interface ProductReference extends Reference { - - /** - * discriminator value for ProductReference - */ - String PRODUCT = "product"; - - /** - * factory method - * @return instance of ProductReference - */ - public static ProductReference of() { - return new ProductReferenceImpl(); - } - - /** - * factory method to create a shallow copy ProductReference - * @param template instance to be copied - * @return copy instance - */ - public static ProductReference of(final ProductReference template) { - ProductReferenceImpl instance = new ProductReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * factory method to create a deep copy of ProductReference - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProductReference deepCopy(@Nullable final ProductReference template) { - if (template == null) { - return null; - } - ProductReferenceImpl instance = new ProductReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * builder factory method for ProductReference - * @return builder - */ - public static ProductReferenceBuilder builder() { - return ProductReferenceBuilder.of(); - } - - /** - * create builder for ProductReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductReferenceBuilder builder(final ProductReference template) { - return ProductReferenceBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProductReference(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReferenceBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReferenceBuilder.java deleted file mode 100644 index c1bdb3a1c06..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReferenceBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductReferenceBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductReference productReference = ProductReference.builder()
- *             .id("{id}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductReferenceBuilder implements Builder { - - private String id; - - /** - * set the value to the id - * @param id value to be set - * @return Builder - */ - - public ProductReferenceBuilder id(final String id) { - this.id = id; - return this; - } - - /** - * value of id} - * @return id - */ - - public String getId() { - return this.id; - } - - /** - * builds ProductReference with checking for non-null required values - * @return ProductReference - */ - public ProductReference build() { - Objects.requireNonNull(id, ProductReference.class + ": id is missing"); - return new ProductReferenceImpl(id); - } - - /** - * builds ProductReference without checking for non-null required values - * @return ProductReference - */ - public ProductReference buildUnchecked() { - return new ProductReferenceImpl(id); - } - - /** - * factory method for an instance of ProductReferenceBuilder - * @return builder - */ - public static ProductReferenceBuilder of() { - return new ProductReferenceBuilder(); - } - - /** - * create builder for ProductReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductReferenceBuilder of(final ProductReference template) { - ProductReferenceBuilder builder = new ProductReferenceBuilder(); - builder.id = template.getId(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReferenceImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReferenceImpl.java deleted file mode 100644 index 96884871fab..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductReferenceImpl.java +++ /dev/null @@ -1,94 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ProductReference - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductReferenceImpl implements ProductReference, ModelBase { - - private com.commercetools.ml.models.common.ReferenceTypeId typeId; - - private String id; - - /** - * create instance with all properties - */ - @JsonCreator - ProductReferenceImpl(@JsonProperty("id") final String id) { - this.id = id; - this.typeId = ReferenceTypeId.findEnum("product"); - } - - /** - * create empty instance - */ - public ProductReferenceImpl() { - this.typeId = ReferenceTypeId.findEnum("product"); - } - - /** - * - */ - - public com.commercetools.ml.models.common.ReferenceTypeId getTypeId() { - return this.typeId; - } - - /** - * - */ - - public String getId() { - return this.id; - } - - public void setId(final String id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProductReferenceImpl that = (ProductReferenceImpl) o; - - return new EqualsBuilder().append(typeId, that.typeId) - .append(id, that.id) - .append(typeId, that.typeId) - .append(id, that.id) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) - .append("id", id) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReference.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReference.java deleted file mode 100644 index 63a208a0373..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReference.java +++ /dev/null @@ -1,110 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductTypeReference - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductTypeReference productTypeReference = ProductTypeReference.builder()
- *             .id("{id}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProductTypeReferenceImpl.class) -public interface ProductTypeReference extends Reference { - - /** - * discriminator value for ProductTypeReference - */ - String PRODUCT_TYPE = "product-type"; - - /** - * factory method - * @return instance of ProductTypeReference - */ - public static ProductTypeReference of() { - return new ProductTypeReferenceImpl(); - } - - /** - * factory method to create a shallow copy ProductTypeReference - * @param template instance to be copied - * @return copy instance - */ - public static ProductTypeReference of(final ProductTypeReference template) { - ProductTypeReferenceImpl instance = new ProductTypeReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * factory method to create a deep copy of ProductTypeReference - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProductTypeReference deepCopy(@Nullable final ProductTypeReference template) { - if (template == null) { - return null; - } - ProductTypeReferenceImpl instance = new ProductTypeReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * builder factory method for ProductTypeReference - * @return builder - */ - public static ProductTypeReferenceBuilder builder() { - return ProductTypeReferenceBuilder.of(); - } - - /** - * create builder for ProductTypeReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductTypeReferenceBuilder builder(final ProductTypeReference template) { - return ProductTypeReferenceBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProductTypeReference(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceBuilder.java deleted file mode 100644 index 1e22701b873..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceBuilder.java +++ /dev/null @@ -1,82 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductTypeReferenceBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductTypeReference productTypeReference = ProductTypeReference.builder()
- *             .id("{id}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductTypeReferenceBuilder implements Builder { - - private String id; - - /** - * set the value to the id - * @param id value to be set - * @return Builder - */ - - public ProductTypeReferenceBuilder id(final String id) { - this.id = id; - return this; - } - - /** - * value of id} - * @return id - */ - - public String getId() { - return this.id; - } - - /** - * builds ProductTypeReference with checking for non-null required values - * @return ProductTypeReference - */ - public ProductTypeReference build() { - Objects.requireNonNull(id, ProductTypeReference.class + ": id is missing"); - return new ProductTypeReferenceImpl(id); - } - - /** - * builds ProductTypeReference without checking for non-null required values - * @return ProductTypeReference - */ - public ProductTypeReference buildUnchecked() { - return new ProductTypeReferenceImpl(id); - } - - /** - * factory method for an instance of ProductTypeReferenceBuilder - * @return builder - */ - public static ProductTypeReferenceBuilder of() { - return new ProductTypeReferenceBuilder(); - } - - /** - * create builder for ProductTypeReference instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductTypeReferenceBuilder of(final ProductTypeReference template) { - ProductTypeReferenceBuilder builder = new ProductTypeReferenceBuilder(); - builder.id = template.getId(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceImpl.java deleted file mode 100644 index 0820f4d24c8..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceImpl.java +++ /dev/null @@ -1,94 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ProductTypeReference - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductTypeReferenceImpl implements ProductTypeReference, ModelBase { - - private com.commercetools.ml.models.common.ReferenceTypeId typeId; - - private String id; - - /** - * create instance with all properties - */ - @JsonCreator - ProductTypeReferenceImpl(@JsonProperty("id") final String id) { - this.id = id; - this.typeId = ReferenceTypeId.findEnum("product-type"); - } - - /** - * create empty instance - */ - public ProductTypeReferenceImpl() { - this.typeId = ReferenceTypeId.findEnum("product-type"); - } - - /** - * - */ - - public com.commercetools.ml.models.common.ReferenceTypeId getTypeId() { - return this.typeId; - } - - /** - * - */ - - public String getId() { - return this.id; - } - - public void setId(final String id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProductTypeReferenceImpl that = (ProductTypeReferenceImpl) o; - - return new EqualsBuilder().append(typeId, that.typeId) - .append(id, that.id) - .append(typeId, that.typeId) - .append(id, that.id) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) - .append("id", id) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariant.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariant.java deleted file mode 100644 index f1546deafff..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariant.java +++ /dev/null @@ -1,159 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

The product variant that contains the image.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductVariant productVariant = ProductVariant.builder()
- *             .product(productBuilder -> productBuilder)
- *             .staged(true)
- *             .variantId(0.3)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProductVariantImpl.class) -public interface ProductVariant { - - /** - *

The product that contains this variant.

- * @return product - */ - @NotNull - @Valid - @JsonProperty("product") - public ProductReference getProduct(); - - /** - *

The state of the product variant.

- * @return staged - */ - @NotNull - @JsonProperty("staged") - public Boolean getStaged(); - - /** - *

The id of the product variant.

- * @return variantId - */ - @NotNull - @JsonProperty("variantId") - public Integer getVariantId(); - - /** - *

The product that contains this variant.

- * @param product value to be set - */ - - public void setProduct(final ProductReference product); - - /** - *

The state of the product variant.

- * @param staged value to be set - */ - - public void setStaged(final Boolean staged); - - /** - *

The id of the product variant.

- * @param variantId value to be set - */ - - public void setVariantId(final Integer variantId); - - /** - * factory method - * @return instance of ProductVariant - */ - public static ProductVariant of() { - return new ProductVariantImpl(); - } - - /** - * factory method to create a shallow copy ProductVariant - * @param template instance to be copied - * @return copy instance - */ - public static ProductVariant of(final ProductVariant template) { - ProductVariantImpl instance = new ProductVariantImpl(); - instance.setProduct(template.getProduct()); - instance.setStaged(template.getStaged()); - instance.setVariantId(template.getVariantId()); - return instance; - } - - /** - * factory method to create a deep copy of ProductVariant - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProductVariant deepCopy(@Nullable final ProductVariant template) { - if (template == null) { - return null; - } - ProductVariantImpl instance = new ProductVariantImpl(); - instance.setProduct(com.commercetools.ml.models.common.ProductReference.deepCopy(template.getProduct())); - instance.setStaged(template.getStaged()); - instance.setVariantId(template.getVariantId()); - return instance; - } - - /** - * builder factory method for ProductVariant - * @return builder - */ - public static ProductVariantBuilder builder() { - return ProductVariantBuilder.of(); - } - - /** - * create builder for ProductVariant instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductVariantBuilder builder(final ProductVariant template) { - return ProductVariantBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProductVariant(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariantBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariantBuilder.java deleted file mode 100644 index b31a5995ad1..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariantBuilder.java +++ /dev/null @@ -1,157 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductVariantBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductVariant productVariant = ProductVariant.builder()
- *             .product(productBuilder -> productBuilder)
- *             .staged(true)
- *             .variantId(0.3)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductVariantBuilder implements Builder { - - private com.commercetools.ml.models.common.ProductReference product; - - private Boolean staged; - - private Integer variantId; - - /** - *

The product that contains this variant.

- * @param builder function to build the product value - * @return Builder - */ - - public ProductVariantBuilder product( - Function builder) { - this.product = builder.apply(com.commercetools.ml.models.common.ProductReferenceBuilder.of()).build(); - return this; - } - - /** - *

The product that contains this variant.

- * @param builder function to build the product value - * @return Builder - */ - - public ProductVariantBuilder withProduct( - Function builder) { - this.product = builder.apply(com.commercetools.ml.models.common.ProductReferenceBuilder.of()); - return this; - } - - /** - *

The product that contains this variant.

- * @param product value to be set - * @return Builder - */ - - public ProductVariantBuilder product(final com.commercetools.ml.models.common.ProductReference product) { - this.product = product; - return this; - } - - /** - *

The state of the product variant.

- * @param staged value to be set - * @return Builder - */ - - public ProductVariantBuilder staged(final Boolean staged) { - this.staged = staged; - return this; - } - - /** - *

The id of the product variant.

- * @param variantId value to be set - * @return Builder - */ - - public ProductVariantBuilder variantId(final Integer variantId) { - this.variantId = variantId; - return this; - } - - /** - *

The product that contains this variant.

- * @return product - */ - - public com.commercetools.ml.models.common.ProductReference getProduct() { - return this.product; - } - - /** - *

The state of the product variant.

- * @return staged - */ - - public Boolean getStaged() { - return this.staged; - } - - /** - *

The id of the product variant.

- * @return variantId - */ - - public Integer getVariantId() { - return this.variantId; - } - - /** - * builds ProductVariant with checking for non-null required values - * @return ProductVariant - */ - public ProductVariant build() { - Objects.requireNonNull(product, ProductVariant.class + ": product is missing"); - Objects.requireNonNull(staged, ProductVariant.class + ": staged is missing"); - Objects.requireNonNull(variantId, ProductVariant.class + ": variantId is missing"); - return new ProductVariantImpl(product, staged, variantId); - } - - /** - * builds ProductVariant without checking for non-null required values - * @return ProductVariant - */ - public ProductVariant buildUnchecked() { - return new ProductVariantImpl(product, staged, variantId); - } - - /** - * factory method for an instance of ProductVariantBuilder - * @return builder - */ - public static ProductVariantBuilder of() { - return new ProductVariantBuilder(); - } - - /** - * create builder for ProductVariant instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductVariantBuilder of(final ProductVariant template) { - ProductVariantBuilder builder = new ProductVariantBuilder(); - builder.product = template.getProduct(); - builder.staged = template.getStaged(); - builder.variantId = template.getVariantId(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariantImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariantImpl.java deleted file mode 100644 index 1b62165d3f2..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ProductVariantImpl.java +++ /dev/null @@ -1,116 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

The product variant that contains the image.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductVariantImpl implements ProductVariant, ModelBase { - - private com.commercetools.ml.models.common.ProductReference product; - - private Boolean staged; - - private Integer variantId; - - /** - * create instance with all properties - */ - @JsonCreator - ProductVariantImpl(@JsonProperty("product") final com.commercetools.ml.models.common.ProductReference product, - @JsonProperty("staged") final Boolean staged, @JsonProperty("variantId") final Integer variantId) { - this.product = product; - this.staged = staged; - this.variantId = variantId; - } - - /** - * create empty instance - */ - public ProductVariantImpl() { - } - - /** - *

The product that contains this variant.

- */ - - public com.commercetools.ml.models.common.ProductReference getProduct() { - return this.product; - } - - /** - *

The state of the product variant.

- */ - - public Boolean getStaged() { - return this.staged; - } - - /** - *

The id of the product variant.

- */ - - public Integer getVariantId() { - return this.variantId; - } - - public void setProduct(final com.commercetools.ml.models.common.ProductReference product) { - this.product = product; - } - - public void setStaged(final Boolean staged) { - this.staged = staged; - } - - public void setVariantId(final Integer variantId) { - this.variantId = variantId; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProductVariantImpl that = (ProductVariantImpl) o; - - return new EqualsBuilder().append(product, that.product) - .append(staged, that.staged) - .append(variantId, that.variantId) - .append(product, that.product) - .append(staged, that.staged) - .append(variantId, that.variantId) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(product).append(staged).append(variantId).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("product", product) - .append("staged", staged) - .append("variantId", variantId) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/Reference.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/Reference.java deleted file mode 100644 index 5e6ac1dada0..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/Reference.java +++ /dev/null @@ -1,134 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * Reference - * - *
- * Example to create a subtype instance using the builder pattern - *
- *

- *     Reference reference = Reference.categoryBuilder()
- *             id("{id}")
- *             .build()
- * 
- *
- */ -@JsonSubTypes({ - @JsonSubTypes.Type(value = com.commercetools.ml.models.common.CategoryReferenceImpl.class, name = CategoryReference.CATEGORY), - @JsonSubTypes.Type(value = com.commercetools.ml.models.common.ProductReferenceImpl.class, name = ProductReference.PRODUCT), - @JsonSubTypes.Type(value = com.commercetools.ml.models.common.ProductTypeReferenceImpl.class, name = ProductTypeReference.PRODUCT_TYPE) }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "typeId", defaultImpl = ReferenceImpl.class, visible = true) -@JsonDeserialize(as = ReferenceImpl.class) -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public interface Reference { - - /** - * - * @return typeId - */ - @NotNull - @JsonProperty("typeId") - public ReferenceTypeId getTypeId(); - - /** - * - * @return id - */ - @NotNull - @JsonProperty("id") - public String getId(); - - /** - * set id - * @param id value to be set - */ - - public void setId(final String id); - - /** - * factory method to create a deep copy of Reference - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static Reference deepCopy(@Nullable final Reference template) { - if (template == null) { - return null; - } - if (template instanceof com.commercetools.ml.models.common.CategoryReference) { - return com.commercetools.ml.models.common.CategoryReference - .deepCopy((com.commercetools.ml.models.common.CategoryReference) template); - } - if (template instanceof com.commercetools.ml.models.common.ProductReference) { - return com.commercetools.ml.models.common.ProductReference - .deepCopy((com.commercetools.ml.models.common.ProductReference) template); - } - if (template instanceof com.commercetools.ml.models.common.ProductTypeReference) { - return com.commercetools.ml.models.common.ProductTypeReference - .deepCopy((com.commercetools.ml.models.common.ProductTypeReference) template); - } - ReferenceImpl instance = new ReferenceImpl(); - instance.setId(template.getId()); - return instance; - } - - /** - * builder for category subtype - * @return builder - */ - public static com.commercetools.ml.models.common.CategoryReferenceBuilder categoryBuilder() { - return com.commercetools.ml.models.common.CategoryReferenceBuilder.of(); - } - - /** - * builder for product subtype - * @return builder - */ - public static com.commercetools.ml.models.common.ProductReferenceBuilder productBuilder() { - return com.commercetools.ml.models.common.ProductReferenceBuilder.of(); - } - - /** - * builder for productType subtype - * @return builder - */ - public static com.commercetools.ml.models.common.ProductTypeReferenceBuilder productTypeBuilder() { - return com.commercetools.ml.models.common.ProductTypeReferenceBuilder.of(); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withReference(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceBuilder.java deleted file mode 100644 index 06286f525f3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ReferenceBuilder - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ReferenceBuilder { - - public com.commercetools.ml.models.common.CategoryReferenceBuilder categoryBuilder() { - return com.commercetools.ml.models.common.CategoryReferenceBuilder.of(); - } - - public com.commercetools.ml.models.common.ProductReferenceBuilder productBuilder() { - return com.commercetools.ml.models.common.ProductReferenceBuilder.of(); - } - - public com.commercetools.ml.models.common.ProductTypeReferenceBuilder productTypeBuilder() { - return com.commercetools.ml.models.common.ProductTypeReferenceBuilder.of(); - } - - /** - * factory method for an instance of ReferenceBuilder - * @return builder - */ - public static ReferenceBuilder of() { - return new ReferenceBuilder(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceImpl.java deleted file mode 100644 index e9b27c520e1..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceImpl.java +++ /dev/null @@ -1,94 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * Reference - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ReferenceImpl implements Reference, ModelBase { - - private com.commercetools.ml.models.common.ReferenceTypeId typeId; - - private String id; - - /** - * create instance with all properties - */ - @JsonCreator - ReferenceImpl(@JsonProperty("typeId") final com.commercetools.ml.models.common.ReferenceTypeId typeId, - @JsonProperty("id") final String id) { - this.typeId = typeId; - this.id = id; - } - - /** - * create empty instance - */ - public ReferenceImpl() { - } - - /** - * - */ - - public com.commercetools.ml.models.common.ReferenceTypeId getTypeId() { - return this.typeId; - } - - /** - * - */ - - public String getId() { - return this.id; - } - - public void setId(final String id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ReferenceImpl that = (ReferenceImpl) o; - - return new EqualsBuilder().append(typeId, that.typeId) - .append(id, that.id) - .append(typeId, that.typeId) - .append(id, that.id) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(typeId).append(id).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("typeId", typeId) - .append("id", id) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceTypeId.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceTypeId.java deleted file mode 100644 index 20cf7a63a5c..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/ReferenceTypeId.java +++ /dev/null @@ -1,259 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.Arrays; -import java.util.Optional; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -import io.vrap.rmf.base.client.JsonEnum; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ReferenceTypeId - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public interface ReferenceTypeId extends JsonEnum { - - ReferenceTypeId CART = ReferenceTypeIdEnum.CART; - - ReferenceTypeId CART_DISCOUNT = ReferenceTypeIdEnum.CART_DISCOUNT; - - ReferenceTypeId CATEGORY = ReferenceTypeIdEnum.CATEGORY; - - ReferenceTypeId CHANNEL = ReferenceTypeIdEnum.CHANNEL; - - ReferenceTypeId CUSTOMER = ReferenceTypeIdEnum.CUSTOMER; - - ReferenceTypeId CUSTOMER_GROUP = ReferenceTypeIdEnum.CUSTOMER_GROUP; - - ReferenceTypeId DISCOUNT_CODE = ReferenceTypeIdEnum.DISCOUNT_CODE; - - ReferenceTypeId KEY_VALUE_DOCUMENT = ReferenceTypeIdEnum.KEY_VALUE_DOCUMENT; - - ReferenceTypeId PAYMENT = ReferenceTypeIdEnum.PAYMENT; - - ReferenceTypeId PRODUCT = ReferenceTypeIdEnum.PRODUCT; - - ReferenceTypeId PRODUCT_TYPE = ReferenceTypeIdEnum.PRODUCT_TYPE; - - ReferenceTypeId PRODUCT_DISCOUNT = ReferenceTypeIdEnum.PRODUCT_DISCOUNT; - - ReferenceTypeId ORDER = ReferenceTypeIdEnum.ORDER; - - ReferenceTypeId REVIEW = ReferenceTypeIdEnum.REVIEW; - - ReferenceTypeId SHOPPING_LIST = ReferenceTypeIdEnum.SHOPPING_LIST; - - ReferenceTypeId SHIPPING_METHOD = ReferenceTypeIdEnum.SHIPPING_METHOD; - - ReferenceTypeId STATE = ReferenceTypeIdEnum.STATE; - - ReferenceTypeId STORE = ReferenceTypeIdEnum.STORE; - - ReferenceTypeId TAX_CATEGORY = ReferenceTypeIdEnum.TAX_CATEGORY; - - ReferenceTypeId TYPE = ReferenceTypeIdEnum.TYPE; - - ReferenceTypeId ZONE = ReferenceTypeIdEnum.ZONE; - - ReferenceTypeId INVENTORY_ENTRY = ReferenceTypeIdEnum.INVENTORY_ENTRY; - - ReferenceTypeId ORDER_EDIT = ReferenceTypeIdEnum.ORDER_EDIT; - - /** - * possible values of ReferenceTypeId - */ - enum ReferenceTypeIdEnum implements ReferenceTypeId { - /** - * cart - */ - CART("cart"), - - /** - * cart-discount - */ - CART_DISCOUNT("cart-discount"), - - /** - * category - */ - CATEGORY("category"), - - /** - * channel - */ - CHANNEL("channel"), - - /** - * customer - */ - CUSTOMER("customer"), - - /** - * customer-group - */ - CUSTOMER_GROUP("customer-group"), - - /** - * discount-code - */ - DISCOUNT_CODE("discount-code"), - - /** - * key-value-document - */ - KEY_VALUE_DOCUMENT("key-value-document"), - - /** - * payment - */ - PAYMENT("payment"), - - /** - * product - */ - PRODUCT("product"), - - /** - * product-type - */ - PRODUCT_TYPE("product-type"), - - /** - * product-discount - */ - PRODUCT_DISCOUNT("product-discount"), - - /** - * order - */ - ORDER("order"), - - /** - * review - */ - REVIEW("review"), - - /** - * shopping-list - */ - SHOPPING_LIST("shopping-list"), - - /** - * shipping-method - */ - SHIPPING_METHOD("shipping-method"), - - /** - * state - */ - STATE("state"), - - /** - * store - */ - STORE("store"), - - /** - * tax-category - */ - TAX_CATEGORY("tax-category"), - - /** - * type - */ - TYPE("type"), - - /** - * zone - */ - ZONE("zone"), - - /** - * inventory-entry - */ - INVENTORY_ENTRY("inventory-entry"), - - /** - * order-edit - */ - ORDER_EDIT("order-edit"); - private final String jsonName; - - private ReferenceTypeIdEnum(final String jsonName) { - this.jsonName = jsonName; - } - - public String getJsonName() { - return jsonName; - } - - public String toString() { - return jsonName; - } - } - - /** - * the JSON value - * @return json value - */ - @JsonValue - String getJsonName(); - - /** - * the enum value - * @return name - */ - String name(); - - /** - * convert value to string - * @return string representation - */ - String toString(); - - /** - * factory method for a enum value of ReferenceTypeId - * if no enum has been found an anonymous instance will be created - * @param value the enum value to be wrapped - * @return enum instance - */ - @JsonCreator - public static ReferenceTypeId findEnum(String value) { - return findEnumViaJsonName(value).orElse(new ReferenceTypeId() { - @Override - public String getJsonName() { - return value; - } - - @Override - public String name() { - return value.toUpperCase(); - } - - public String toString() { - return value; - } - }); - } - - /** - * method to find enum using the JSON value - * @param jsonName the json value to be wrapped - * @return optional of enum instance - */ - public static Optional findEnumViaJsonName(String jsonName) { - return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); - } - - /** - * possible enum values - * @return array of possible enum values - */ - public static ReferenceTypeId[] values() { - return ReferenceTypeIdEnum.values(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskStatusEnum.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskStatusEnum.java deleted file mode 100644 index 0d2ba48d160..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskStatusEnum.java +++ /dev/null @@ -1,112 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.Arrays; -import java.util.Optional; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -import io.vrap.rmf.base.client.JsonEnum; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * TaskStatusEnum - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public interface TaskStatusEnum extends JsonEnum { - - TaskStatusEnum PENDING = TaskStatusEnumEnum.PENDING; - - TaskStatusEnum SUCCESS = TaskStatusEnumEnum.SUCCESS; - - /** - * possible values of TaskStatusEnum - */ - enum TaskStatusEnumEnum implements TaskStatusEnum { - /** - * PENDING - */ - PENDING("PENDING"), - - /** - * SUCCESS - */ - SUCCESS("SUCCESS"); - private final String jsonName; - - private TaskStatusEnumEnum(final String jsonName) { - this.jsonName = jsonName; - } - - public String getJsonName() { - return jsonName; - } - - public String toString() { - return jsonName; - } - } - - /** - * the JSON value - * @return json value - */ - @JsonValue - String getJsonName(); - - /** - * the enum value - * @return name - */ - String name(); - - /** - * convert value to string - * @return string representation - */ - String toString(); - - /** - * factory method for a enum value of TaskStatusEnum - * if no enum has been found an anonymous instance will be created - * @param value the enum value to be wrapped - * @return enum instance - */ - @JsonCreator - public static TaskStatusEnum findEnum(String value) { - return findEnumViaJsonName(value).orElse(new TaskStatusEnum() { - @Override - public String getJsonName() { - return value; - } - - @Override - public String name() { - return value.toUpperCase(); - } - - public String toString() { - return value; - } - }); - } - - /** - * method to find enum using the JSON value - * @param jsonName the json value to be wrapped - * @return optional of enum instance - */ - public static Optional findEnumViaJsonName(String jsonName) { - return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); - } - - /** - * possible enum values - * @return array of possible enum values - */ - public static TaskStatusEnum[] values() { - return TaskStatusEnumEnum.values(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskToken.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskToken.java deleted file mode 100644 index 6f93a4e6ccf..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskToken.java +++ /dev/null @@ -1,139 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

Represents a URL path to poll to get the results of an Asynchronous Request.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     TaskToken taskToken = TaskToken.builder()
- *             .taskId("{taskId}")
- *             .uriPath("{uriPath}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = TaskTokenImpl.class) -public interface TaskToken { - - /** - *

The ID for the task. Used to find the status of the task.

- * @return taskId - */ - @NotNull - @JsonProperty("taskId") - public String getTaskId(); - - /** - *

The URI path to poll for the status of the task.

- * @return uriPath - */ - @NotNull - @JsonProperty("uriPath") - public String getUriPath(); - - /** - *

The ID for the task. Used to find the status of the task.

- * @param taskId value to be set - */ - - public void setTaskId(final String taskId); - - /** - *

The URI path to poll for the status of the task.

- * @param uriPath value to be set - */ - - public void setUriPath(final String uriPath); - - /** - * factory method - * @return instance of TaskToken - */ - public static TaskToken of() { - return new TaskTokenImpl(); - } - - /** - * factory method to create a shallow copy TaskToken - * @param template instance to be copied - * @return copy instance - */ - public static TaskToken of(final TaskToken template) { - TaskTokenImpl instance = new TaskTokenImpl(); - instance.setTaskId(template.getTaskId()); - instance.setUriPath(template.getUriPath()); - return instance; - } - - /** - * factory method to create a deep copy of TaskToken - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static TaskToken deepCopy(@Nullable final TaskToken template) { - if (template == null) { - return null; - } - TaskTokenImpl instance = new TaskTokenImpl(); - instance.setTaskId(template.getTaskId()); - instance.setUriPath(template.getUriPath()); - return instance; - } - - /** - * builder factory method for TaskToken - * @return builder - */ - public static TaskTokenBuilder builder() { - return TaskTokenBuilder.of(); - } - - /** - * create builder for TaskToken instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static TaskTokenBuilder builder(final TaskToken template) { - return TaskTokenBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withTaskToken(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskTokenBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskTokenBuilder.java deleted file mode 100644 index 566165f480b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskTokenBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * TaskTokenBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     TaskToken taskToken = TaskToken.builder()
- *             .taskId("{taskId}")
- *             .uriPath("{uriPath}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class TaskTokenBuilder implements Builder { - - private String taskId; - - private String uriPath; - - /** - *

The ID for the task. Used to find the status of the task.

- * @param taskId value to be set - * @return Builder - */ - - public TaskTokenBuilder taskId(final String taskId) { - this.taskId = taskId; - return this; - } - - /** - *

The URI path to poll for the status of the task.

- * @param uriPath value to be set - * @return Builder - */ - - public TaskTokenBuilder uriPath(final String uriPath) { - this.uriPath = uriPath; - return this; - } - - /** - *

The ID for the task. Used to find the status of the task.

- * @return taskId - */ - - public String getTaskId() { - return this.taskId; - } - - /** - *

The URI path to poll for the status of the task.

- * @return uriPath - */ - - public String getUriPath() { - return this.uriPath; - } - - /** - * builds TaskToken with checking for non-null required values - * @return TaskToken - */ - public TaskToken build() { - Objects.requireNonNull(taskId, TaskToken.class + ": taskId is missing"); - Objects.requireNonNull(uriPath, TaskToken.class + ": uriPath is missing"); - return new TaskTokenImpl(taskId, uriPath); - } - - /** - * builds TaskToken without checking for non-null required values - * @return TaskToken - */ - public TaskToken buildUnchecked() { - return new TaskTokenImpl(taskId, uriPath); - } - - /** - * factory method for an instance of TaskTokenBuilder - * @return builder - */ - public static TaskTokenBuilder of() { - return new TaskTokenBuilder(); - } - - /** - * create builder for TaskToken instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static TaskTokenBuilder of(final TaskToken template) { - TaskTokenBuilder builder = new TaskTokenBuilder(); - builder.taskId = template.getTaskId(); - builder.uriPath = template.getUriPath(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskTokenImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskTokenImpl.java deleted file mode 100644 index 15bf57c7b6c..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/common/TaskTokenImpl.java +++ /dev/null @@ -1,97 +0,0 @@ - -package com.commercetools.ml.models.common; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

Represents a URL path to poll to get the results of an Asynchronous Request.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class TaskTokenImpl implements TaskToken, ModelBase { - - private String taskId; - - private String uriPath; - - /** - * create instance with all properties - */ - @JsonCreator - TaskTokenImpl(@JsonProperty("taskId") final String taskId, @JsonProperty("uriPath") final String uriPath) { - this.taskId = taskId; - this.uriPath = uriPath; - } - - /** - * create empty instance - */ - public TaskTokenImpl() { - } - - /** - *

The ID for the task. Used to find the status of the task.

- */ - - public String getTaskId() { - return this.taskId; - } - - /** - *

The URI path to poll for the status of the task.

- */ - - public String getUriPath() { - return this.uriPath; - } - - public void setTaskId(final String taskId) { - this.taskId = taskId; - } - - public void setUriPath(final String uriPath) { - this.uriPath = uriPath; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - TaskTokenImpl that = (TaskTokenImpl) o; - - return new EqualsBuilder().append(taskId, that.taskId) - .append(uriPath, that.uriPath) - .append(taskId, that.taskId) - .append(uriPath, that.uriPath) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(taskId).append(uriPath).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("taskId", taskId) - .append("uriPath", uriPath) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendation.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendation.java deleted file mode 100644 index da083fc987a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendation.java +++ /dev/null @@ -1,139 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * GeneralCategoryRecommendation - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     GeneralCategoryRecommendation generalCategoryRecommendation = GeneralCategoryRecommendation.builder()
- *             .categoryName("{categoryName}")
- *             .confidence(0.3)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = GeneralCategoryRecommendationImpl.class) -public interface GeneralCategoryRecommendation { - - /** - *

An English category name that is recommended for a product.

- * @return categoryName - */ - @NotNull - @JsonProperty("categoryName") - public String getCategoryName(); - - /** - *

Probability score for the category recommendation.

- * @return confidence - */ - @NotNull - @JsonProperty("confidence") - public Double getConfidence(); - - /** - *

An English category name that is recommended for a product.

- * @param categoryName value to be set - */ - - public void setCategoryName(final String categoryName); - - /** - *

Probability score for the category recommendation.

- * @param confidence value to be set - */ - - public void setConfidence(final Double confidence); - - /** - * factory method - * @return instance of GeneralCategoryRecommendation - */ - public static GeneralCategoryRecommendation of() { - return new GeneralCategoryRecommendationImpl(); - } - - /** - * factory method to create a shallow copy GeneralCategoryRecommendation - * @param template instance to be copied - * @return copy instance - */ - public static GeneralCategoryRecommendation of(final GeneralCategoryRecommendation template) { - GeneralCategoryRecommendationImpl instance = new GeneralCategoryRecommendationImpl(); - instance.setCategoryName(template.getCategoryName()); - instance.setConfidence(template.getConfidence()); - return instance; - } - - /** - * factory method to create a deep copy of GeneralCategoryRecommendation - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static GeneralCategoryRecommendation deepCopy(@Nullable final GeneralCategoryRecommendation template) { - if (template == null) { - return null; - } - GeneralCategoryRecommendationImpl instance = new GeneralCategoryRecommendationImpl(); - instance.setCategoryName(template.getCategoryName()); - instance.setConfidence(template.getConfidence()); - return instance; - } - - /** - * builder factory method for GeneralCategoryRecommendation - * @return builder - */ - public static GeneralCategoryRecommendationBuilder builder() { - return GeneralCategoryRecommendationBuilder.of(); - } - - /** - * create builder for GeneralCategoryRecommendation instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static GeneralCategoryRecommendationBuilder builder(final GeneralCategoryRecommendation template) { - return GeneralCategoryRecommendationBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withGeneralCategoryRecommendation(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationBuilder.java deleted file mode 100644 index 5cdfbededdd..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationBuilder.java +++ /dev/null @@ -1,107 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * GeneralCategoryRecommendationBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     GeneralCategoryRecommendation generalCategoryRecommendation = GeneralCategoryRecommendation.builder()
- *             .categoryName("{categoryName}")
- *             .confidence(0.3)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class GeneralCategoryRecommendationBuilder implements Builder { - - private String categoryName; - - private Double confidence; - - /** - *

An English category name that is recommended for a product.

- * @param categoryName value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationBuilder categoryName(final String categoryName) { - this.categoryName = categoryName; - return this; - } - - /** - *

Probability score for the category recommendation.

- * @param confidence value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationBuilder confidence(final Double confidence) { - this.confidence = confidence; - return this; - } - - /** - *

An English category name that is recommended for a product.

- * @return categoryName - */ - - public String getCategoryName() { - return this.categoryName; - } - - /** - *

Probability score for the category recommendation.

- * @return confidence - */ - - public Double getConfidence() { - return this.confidence; - } - - /** - * builds GeneralCategoryRecommendation with checking for non-null required values - * @return GeneralCategoryRecommendation - */ - public GeneralCategoryRecommendation build() { - Objects.requireNonNull(categoryName, GeneralCategoryRecommendation.class + ": categoryName is missing"); - Objects.requireNonNull(confidence, GeneralCategoryRecommendation.class + ": confidence is missing"); - return new GeneralCategoryRecommendationImpl(categoryName, confidence); - } - - /** - * builds GeneralCategoryRecommendation without checking for non-null required values - * @return GeneralCategoryRecommendation - */ - public GeneralCategoryRecommendation buildUnchecked() { - return new GeneralCategoryRecommendationImpl(categoryName, confidence); - } - - /** - * factory method for an instance of GeneralCategoryRecommendationBuilder - * @return builder - */ - public static GeneralCategoryRecommendationBuilder of() { - return new GeneralCategoryRecommendationBuilder(); - } - - /** - * create builder for GeneralCategoryRecommendation instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static GeneralCategoryRecommendationBuilder of(final GeneralCategoryRecommendation template) { - GeneralCategoryRecommendationBuilder builder = new GeneralCategoryRecommendationBuilder(); - builder.categoryName = template.getCategoryName(); - builder.confidence = template.getConfidence(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationImpl.java deleted file mode 100644 index 29df117ddb4..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationImpl.java +++ /dev/null @@ -1,98 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * GeneralCategoryRecommendation - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class GeneralCategoryRecommendationImpl implements GeneralCategoryRecommendation, ModelBase { - - private String categoryName; - - private Double confidence; - - /** - * create instance with all properties - */ - @JsonCreator - GeneralCategoryRecommendationImpl(@JsonProperty("categoryName") final String categoryName, - @JsonProperty("confidence") final Double confidence) { - this.categoryName = categoryName; - this.confidence = confidence; - } - - /** - * create empty instance - */ - public GeneralCategoryRecommendationImpl() { - } - - /** - *

An English category name that is recommended for a product.

- */ - - public String getCategoryName() { - return this.categoryName; - } - - /** - *

Probability score for the category recommendation.

- */ - - public Double getConfidence() { - return this.confidence; - } - - public void setCategoryName(final String categoryName) { - this.categoryName = categoryName; - } - - public void setConfidence(final Double confidence) { - this.confidence = confidence; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - GeneralCategoryRecommendationImpl that = (GeneralCategoryRecommendationImpl) o; - - return new EqualsBuilder().append(categoryName, that.categoryName) - .append(confidence, that.confidence) - .append(categoryName, that.categoryName) - .append(confidence, that.confidence) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(categoryName).append(confidence).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("categoryName", categoryName) - .append("confidence", confidence) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponse.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponse.java deleted file mode 100644 index 38aadd20314..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponse.java +++ /dev/null @@ -1,195 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * GeneralCategoryRecommendationPagedQueryResponse - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     GeneralCategoryRecommendationPagedQueryResponse generalCategoryRecommendationPagedQueryResponse = GeneralCategoryRecommendationPagedQueryResponse.builder()
- *             .count(0.3)
- *             .total(0.3)
- *             .offset(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = GeneralCategoryRecommendationPagedQueryResponseImpl.class) -public interface GeneralCategoryRecommendationPagedQueryResponse { - - /** - * - * @return count - */ - @NotNull - @JsonProperty("count") - public Long getCount(); - - /** - * - * @return total - */ - @NotNull - @JsonProperty("total") - public Long getTotal(); - - /** - *

Number of elements skipped.

- * @return offset - */ - @NotNull - @JsonProperty("offset") - public Long getOffset(); - - /** - * - * @return results - */ - @NotNull - @Valid - @JsonProperty("results") - public List getResults(); - - /** - * set count - * @param count value to be set - */ - - public void setCount(final Long count); - - /** - * set total - * @param total value to be set - */ - - public void setTotal(final Long total); - - /** - *

Number of elements skipped.

- * @param offset value to be set - */ - - public void setOffset(final Long offset); - - /** - * set results - * @param results values to be set - */ - - @JsonIgnore - public void setResults(final GeneralCategoryRecommendation... results); - - /** - * set results - * @param results values to be set - */ - - public void setResults(final List results); - - /** - * factory method - * @return instance of GeneralCategoryRecommendationPagedQueryResponse - */ - public static GeneralCategoryRecommendationPagedQueryResponse of() { - return new GeneralCategoryRecommendationPagedQueryResponseImpl(); - } - - /** - * factory method to create a shallow copy GeneralCategoryRecommendationPagedQueryResponse - * @param template instance to be copied - * @return copy instance - */ - public static GeneralCategoryRecommendationPagedQueryResponse of( - final GeneralCategoryRecommendationPagedQueryResponse template) { - GeneralCategoryRecommendationPagedQueryResponseImpl instance = new GeneralCategoryRecommendationPagedQueryResponseImpl(); - instance.setCount(template.getCount()); - instance.setTotal(template.getTotal()); - instance.setOffset(template.getOffset()); - instance.setResults(template.getResults()); - return instance; - } - - /** - * factory method to create a deep copy of GeneralCategoryRecommendationPagedQueryResponse - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static GeneralCategoryRecommendationPagedQueryResponse deepCopy( - @Nullable final GeneralCategoryRecommendationPagedQueryResponse template) { - if (template == null) { - return null; - } - GeneralCategoryRecommendationPagedQueryResponseImpl instance = new GeneralCategoryRecommendationPagedQueryResponseImpl(); - instance.setCount(template.getCount()); - instance.setTotal(template.getTotal()); - instance.setOffset(template.getOffset()); - instance.setResults(Optional.ofNullable(template.getResults()) - .map(t -> t.stream() - .map( - com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - return instance; - } - - /** - * builder factory method for GeneralCategoryRecommendationPagedQueryResponse - * @return builder - */ - public static GeneralCategoryRecommendationPagedQueryResponseBuilder builder() { - return GeneralCategoryRecommendationPagedQueryResponseBuilder.of(); - } - - /** - * create builder for GeneralCategoryRecommendationPagedQueryResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static GeneralCategoryRecommendationPagedQueryResponseBuilder builder( - final GeneralCategoryRecommendationPagedQueryResponse template) { - return GeneralCategoryRecommendationPagedQueryResponseBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withGeneralCategoryRecommendationPagedQueryResponse( - Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseBuilder.java deleted file mode 100644 index 2024e967b34..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseBuilder.java +++ /dev/null @@ -1,246 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * GeneralCategoryRecommendationPagedQueryResponseBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     GeneralCategoryRecommendationPagedQueryResponse generalCategoryRecommendationPagedQueryResponse = GeneralCategoryRecommendationPagedQueryResponse.builder()
- *             .count(0.3)
- *             .total(0.3)
- *             .offset(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class GeneralCategoryRecommendationPagedQueryResponseBuilder - implements Builder { - - private Long count; - - private Long total; - - private Long offset; - - private java.util.List results; - - /** - * set the value to the count - * @param count value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder count(final Long count) { - this.count = count; - return this; - } - - /** - * set the value to the total - * @param total value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder total(final Long total) { - this.total = total; - return this; - } - - /** - *

Number of elements skipped.

- * @param offset value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder offset(final Long offset) { - this.offset = offset; - return this; - } - - /** - * set values to the results - * @param results value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder results( - final com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - return this; - } - - /** - * set value to the results - * @param results value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder results( - final java.util.List results) { - this.results = results; - return this; - } - - /** - * add values to the results - * @param results value to be set - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder plusResults( - final com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation... results) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.addAll(Arrays.asList(results)); - return this; - } - - /** - * add the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder plusResults( - Function builder) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.add(builder - .apply(com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationBuilder - .of()) - .build()); - return this; - } - - /** - * set the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder withResults( - Function builder) { - this.results = new ArrayList<>(); - this.results.add(builder - .apply(com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationBuilder - .of()) - .build()); - return this; - } - - /** - * add the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder addResults( - Function builder) { - return plusResults(builder.apply( - com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationBuilder.of())); - } - - /** - * set the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public GeneralCategoryRecommendationPagedQueryResponseBuilder setResults( - Function builder) { - return results(builder.apply( - com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationBuilder.of())); - } - - /** - * value of count} - * @return count - */ - - public Long getCount() { - return this.count; - } - - /** - * value of total} - * @return total - */ - - public Long getTotal() { - return this.total; - } - - /** - *

Number of elements skipped.

- * @return offset - */ - - public Long getOffset() { - return this.offset; - } - - /** - * value of results} - * @return results - */ - - public java.util.List getResults() { - return this.results; - } - - /** - * builds GeneralCategoryRecommendationPagedQueryResponse with checking for non-null required values - * @return GeneralCategoryRecommendationPagedQueryResponse - */ - public GeneralCategoryRecommendationPagedQueryResponse build() { - Objects.requireNonNull(count, GeneralCategoryRecommendationPagedQueryResponse.class + ": count is missing"); - Objects.requireNonNull(total, GeneralCategoryRecommendationPagedQueryResponse.class + ": total is missing"); - Objects.requireNonNull(offset, GeneralCategoryRecommendationPagedQueryResponse.class + ": offset is missing"); - Objects.requireNonNull(results, GeneralCategoryRecommendationPagedQueryResponse.class + ": results is missing"); - return new GeneralCategoryRecommendationPagedQueryResponseImpl(count, total, offset, results); - } - - /** - * builds GeneralCategoryRecommendationPagedQueryResponse without checking for non-null required values - * @return GeneralCategoryRecommendationPagedQueryResponse - */ - public GeneralCategoryRecommendationPagedQueryResponse buildUnchecked() { - return new GeneralCategoryRecommendationPagedQueryResponseImpl(count, total, offset, results); - } - - /** - * factory method for an instance of GeneralCategoryRecommendationPagedQueryResponseBuilder - * @return builder - */ - public static GeneralCategoryRecommendationPagedQueryResponseBuilder of() { - return new GeneralCategoryRecommendationPagedQueryResponseBuilder(); - } - - /** - * create builder for GeneralCategoryRecommendationPagedQueryResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static GeneralCategoryRecommendationPagedQueryResponseBuilder of( - final GeneralCategoryRecommendationPagedQueryResponse template) { - GeneralCategoryRecommendationPagedQueryResponseBuilder builder = new GeneralCategoryRecommendationPagedQueryResponseBuilder(); - builder.count = template.getCount(); - builder.total = template.getTotal(); - builder.offset = template.getOffset(); - builder.results = template.getResults(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseImpl.java deleted file mode 100644 index e1ad9f222aa..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseImpl.java +++ /dev/null @@ -1,142 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * GeneralCategoryRecommendationPagedQueryResponse - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class GeneralCategoryRecommendationPagedQueryResponseImpl - implements GeneralCategoryRecommendationPagedQueryResponse, ModelBase { - - private Long count; - - private Long total; - - private Long offset; - - private java.util.List results; - - /** - * create instance with all properties - */ - @JsonCreator - GeneralCategoryRecommendationPagedQueryResponseImpl(@JsonProperty("count") final Long count, - @JsonProperty("total") final Long total, @JsonProperty("offset") final Long offset, - @JsonProperty("results") final java.util.List results) { - this.count = count; - this.total = total; - this.offset = offset; - this.results = results; - } - - /** - * create empty instance - */ - public GeneralCategoryRecommendationPagedQueryResponseImpl() { - } - - /** - * - */ - - public Long getCount() { - return this.count; - } - - /** - * - */ - - public Long getTotal() { - return this.total; - } - - /** - *

Number of elements skipped.

- */ - - public Long getOffset() { - return this.offset; - } - - /** - * - */ - - public java.util.List getResults() { - return this.results; - } - - public void setCount(final Long count) { - this.count = count; - } - - public void setTotal(final Long total) { - this.total = total; - } - - public void setOffset(final Long offset) { - this.offset = offset; - } - - public void setResults( - final com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendation... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - } - - public void setResults( - final java.util.List results) { - this.results = results; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - GeneralCategoryRecommendationPagedQueryResponseImpl that = (GeneralCategoryRecommendationPagedQueryResponseImpl) o; - - return new EqualsBuilder().append(count, that.count) - .append(total, that.total) - .append(offset, that.offset) - .append(results, that.results) - .append(count, that.count) - .append(total, that.total) - .append(offset, that.offset) - .append(results, that.results) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(count).append(total).append(offset).append(results).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count) - .append("total", total) - .append("offset", offset) - .append("results", results) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponse.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponse.java deleted file mode 100644 index f64276f557a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponse.java +++ /dev/null @@ -1,190 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

Response format from image search endpoint.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ImageSearchResponse imageSearchResponse = ImageSearchResponse.builder()
- *             .count(0.3)
- *             .offset(0.3)
- *             .total(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ImageSearchResponseImpl.class) -public interface ImageSearchResponse { - - /** - *

The maximum number of results to return from a query.

- * @return count - */ - @NotNull - @JsonProperty("count") - public Integer getCount(); - - /** - *

Number of elements skipped.

- * @return offset - */ - @NotNull - @JsonProperty("offset") - public Double getOffset(); - - /** - *

The total number of product images that were have been analyzed.

- * @return total - */ - @NotNull - @JsonProperty("total") - public Integer getTotal(); - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @return results - */ - @NotNull - @Valid - @JsonProperty("results") - public List getResults(); - - /** - *

The maximum number of results to return from a query.

- * @param count value to be set - */ - - public void setCount(final Integer count); - - /** - *

Number of elements skipped.

- * @param offset value to be set - */ - - public void setOffset(final Double offset); - - /** - *

The total number of product images that were have been analyzed.

- * @param total value to be set - */ - - public void setTotal(final Integer total); - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param results values to be set - */ - - @JsonIgnore - public void setResults(final ResultItem... results); - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param results values to be set - */ - - public void setResults(final List results); - - /** - * factory method - * @return instance of ImageSearchResponse - */ - public static ImageSearchResponse of() { - return new ImageSearchResponseImpl(); - } - - /** - * factory method to create a shallow copy ImageSearchResponse - * @param template instance to be copied - * @return copy instance - */ - public static ImageSearchResponse of(final ImageSearchResponse template) { - ImageSearchResponseImpl instance = new ImageSearchResponseImpl(); - instance.setCount(template.getCount()); - instance.setOffset(template.getOffset()); - instance.setTotal(template.getTotal()); - instance.setResults(template.getResults()); - return instance; - } - - /** - * factory method to create a deep copy of ImageSearchResponse - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ImageSearchResponse deepCopy(@Nullable final ImageSearchResponse template) { - if (template == null) { - return null; - } - ImageSearchResponseImpl instance = new ImageSearchResponseImpl(); - instance.setCount(template.getCount()); - instance.setOffset(template.getOffset()); - instance.setTotal(template.getTotal()); - instance.setResults(Optional.ofNullable(template.getResults()) - .map(t -> t.stream() - .map(com.commercetools.ml.models.image_search.ResultItem::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - return instance; - } - - /** - * builder factory method for ImageSearchResponse - * @return builder - */ - public static ImageSearchResponseBuilder builder() { - return ImageSearchResponseBuilder.of(); - } - - /** - * create builder for ImageSearchResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ImageSearchResponseBuilder builder(final ImageSearchResponse template) { - return ImageSearchResponseBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withImageSearchResponse(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseBuilder.java deleted file mode 100644 index bf89d2441fd..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseBuilder.java +++ /dev/null @@ -1,235 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchResponseBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ImageSearchResponse imageSearchResponse = ImageSearchResponse.builder()
- *             .count(0.3)
- *             .offset(0.3)
- *             .total(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchResponseBuilder implements Builder { - - private Integer count; - - private Double offset; - - private Integer total; - - private java.util.List results; - - /** - *

The maximum number of results to return from a query.

- * @param count value to be set - * @return Builder - */ - - public ImageSearchResponseBuilder count(final Integer count) { - this.count = count; - return this; - } - - /** - *

Number of elements skipped.

- * @param offset value to be set - * @return Builder - */ - - public ImageSearchResponseBuilder offset(final Double offset) { - this.offset = offset; - return this; - } - - /** - *

The total number of product images that were have been analyzed.

- * @param total value to be set - * @return Builder - */ - - public ImageSearchResponseBuilder total(final Integer total) { - this.total = total; - return this; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param results value to be set - * @return Builder - */ - - public ImageSearchResponseBuilder results(final com.commercetools.ml.models.image_search.ResultItem... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - return this; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param results value to be set - * @return Builder - */ - - public ImageSearchResponseBuilder results( - final java.util.List results) { - this.results = results; - return this; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param results value to be set - * @return Builder - */ - - public ImageSearchResponseBuilder plusResults( - final com.commercetools.ml.models.image_search.ResultItem... results) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.addAll(Arrays.asList(results)); - return this; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param builder function to build the results value - * @return Builder - */ - - public ImageSearchResponseBuilder plusResults( - Function builder) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.add(builder.apply(com.commercetools.ml.models.image_search.ResultItemBuilder.of()).build()); - return this; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param builder function to build the results value - * @return Builder - */ - - public ImageSearchResponseBuilder withResults( - Function builder) { - this.results = new ArrayList<>(); - this.results.add(builder.apply(com.commercetools.ml.models.image_search.ResultItemBuilder.of()).build()); - return this; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param builder function to build the results value - * @return Builder - */ - - public ImageSearchResponseBuilder addResults( - Function builder) { - return plusResults(builder.apply(com.commercetools.ml.models.image_search.ResultItemBuilder.of())); - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @param builder function to build the results value - * @return Builder - */ - - public ImageSearchResponseBuilder setResults( - Function builder) { - return results(builder.apply(com.commercetools.ml.models.image_search.ResultItemBuilder.of())); - } - - /** - *

The maximum number of results to return from a query.

- * @return count - */ - - public Integer getCount() { - return this.count; - } - - /** - *

Number of elements skipped.

- * @return offset - */ - - public Double getOffset() { - return this.offset; - } - - /** - *

The total number of product images that were have been analyzed.

- * @return total - */ - - public Integer getTotal() { - return this.total; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- * @return results - */ - - public java.util.List getResults() { - return this.results; - } - - /** - * builds ImageSearchResponse with checking for non-null required values - * @return ImageSearchResponse - */ - public ImageSearchResponse build() { - Objects.requireNonNull(count, ImageSearchResponse.class + ": count is missing"); - Objects.requireNonNull(offset, ImageSearchResponse.class + ": offset is missing"); - Objects.requireNonNull(total, ImageSearchResponse.class + ": total is missing"); - Objects.requireNonNull(results, ImageSearchResponse.class + ": results is missing"); - return new ImageSearchResponseImpl(count, offset, total, results); - } - - /** - * builds ImageSearchResponse without checking for non-null required values - * @return ImageSearchResponse - */ - public ImageSearchResponse buildUnchecked() { - return new ImageSearchResponseImpl(count, offset, total, results); - } - - /** - * factory method for an instance of ImageSearchResponseBuilder - * @return builder - */ - public static ImageSearchResponseBuilder of() { - return new ImageSearchResponseBuilder(); - } - - /** - * create builder for ImageSearchResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ImageSearchResponseBuilder of(final ImageSearchResponse template) { - ImageSearchResponseBuilder builder = new ImageSearchResponseBuilder(); - builder.count = template.getCount(); - builder.offset = template.getOffset(); - builder.total = template.getTotal(); - builder.results = template.getResults(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseImpl.java deleted file mode 100644 index 7378e9b9501..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseImpl.java +++ /dev/null @@ -1,139 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

Response format from image search endpoint.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchResponseImpl implements ImageSearchResponse, ModelBase { - - private Integer count; - - private Double offset; - - private Integer total; - - private java.util.List results; - - /** - * create instance with all properties - */ - @JsonCreator - ImageSearchResponseImpl(@JsonProperty("count") final Integer count, @JsonProperty("offset") final Double offset, - @JsonProperty("total") final Integer total, - @JsonProperty("results") final java.util.List results) { - this.count = count; - this.offset = offset; - this.total = total; - this.results = results; - } - - /** - * create empty instance - */ - public ImageSearchResponseImpl() { - } - - /** - *

The maximum number of results to return from a query.

- */ - - public Integer getCount() { - return this.count; - } - - /** - *

Number of elements skipped.

- */ - - public Double getOffset() { - return this.offset; - } - - /** - *

The total number of product images that were have been analyzed.

- */ - - public Integer getTotal() { - return this.total; - } - - /** - *

An array of image URLs of images that are similar to the query image. If no matching images are found, results is empty.

- */ - - public java.util.List getResults() { - return this.results; - } - - public void setCount(final Integer count) { - this.count = count; - } - - public void setOffset(final Double offset) { - this.offset = offset; - } - - public void setTotal(final Integer total) { - this.total = total; - } - - public void setResults(final com.commercetools.ml.models.image_search.ResultItem... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - } - - public void setResults(final java.util.List results) { - this.results = results; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ImageSearchResponseImpl that = (ImageSearchResponseImpl) o; - - return new EqualsBuilder().append(count, that.count) - .append(offset, that.offset) - .append(total, that.total) - .append(results, that.results) - .append(count, that.count) - .append(offset, that.offset) - .append(total, that.total) - .append(results, that.results) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(count).append(offset).append(total).append(results).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count) - .append("offset", offset) - .append("total", total) - .append("results", results) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItem.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItem.java deleted file mode 100644 index 46a6177a6dd..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItem.java +++ /dev/null @@ -1,155 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.commercetools.ml.models.common.ProductVariant; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

An image URL and the product variants it is contained in. If no matching images are found, ResultItem is not present.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ResultItem resultItem = ResultItem.builder()
- *             .imageUrl("{imageUrl}")
- *             .plusProductVariants(productVariantsBuilder -> productVariantsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ResultItemImpl.class) -public interface ResultItem { - - /** - *

The URL of the image.

- * @return imageUrl - */ - @NotNull - @JsonProperty("imageUrl") - public String getImageUrl(); - - /** - *

An array of product variants containing the image URL.

- * @return productVariants - */ - @NotNull - @Valid - @JsonProperty("productVariants") - public List getProductVariants(); - - /** - *

The URL of the image.

- * @param imageUrl value to be set - */ - - public void setImageUrl(final String imageUrl); - - /** - *

An array of product variants containing the image URL.

- * @param productVariants values to be set - */ - - @JsonIgnore - public void setProductVariants(final ProductVariant... productVariants); - - /** - *

An array of product variants containing the image URL.

- * @param productVariants values to be set - */ - - public void setProductVariants(final List productVariants); - - /** - * factory method - * @return instance of ResultItem - */ - public static ResultItem of() { - return new ResultItemImpl(); - } - - /** - * factory method to create a shallow copy ResultItem - * @param template instance to be copied - * @return copy instance - */ - public static ResultItem of(final ResultItem template) { - ResultItemImpl instance = new ResultItemImpl(); - instance.setImageUrl(template.getImageUrl()); - instance.setProductVariants(template.getProductVariants()); - return instance; - } - - /** - * factory method to create a deep copy of ResultItem - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ResultItem deepCopy(@Nullable final ResultItem template) { - if (template == null) { - return null; - } - ResultItemImpl instance = new ResultItemImpl(); - instance.setImageUrl(template.getImageUrl()); - instance.setProductVariants(Optional.ofNullable(template.getProductVariants()) - .map(t -> t.stream() - .map(com.commercetools.ml.models.common.ProductVariant::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - return instance; - } - - /** - * builder factory method for ResultItem - * @return builder - */ - public static ResultItemBuilder builder() { - return ResultItemBuilder.of(); - } - - /** - * create builder for ResultItem instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ResultItemBuilder builder(final ResultItem template) { - return ResultItemBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withResultItem(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItemBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItemBuilder.java deleted file mode 100644 index da42fa73c26..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItemBuilder.java +++ /dev/null @@ -1,186 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ResultItemBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ResultItem resultItem = ResultItem.builder()
- *             .imageUrl("{imageUrl}")
- *             .plusProductVariants(productVariantsBuilder -> productVariantsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ResultItemBuilder implements Builder { - - private String imageUrl; - - private java.util.List productVariants; - - /** - *

The URL of the image.

- * @param imageUrl value to be set - * @return Builder - */ - - public ResultItemBuilder imageUrl(final String imageUrl) { - this.imageUrl = imageUrl; - return this; - } - - /** - *

An array of product variants containing the image URL.

- * @param productVariants value to be set - * @return Builder - */ - - public ResultItemBuilder productVariants( - final com.commercetools.ml.models.common.ProductVariant... productVariants) { - this.productVariants = new ArrayList<>(Arrays.asList(productVariants)); - return this; - } - - /** - *

An array of product variants containing the image URL.

- * @param productVariants value to be set - * @return Builder - */ - - public ResultItemBuilder productVariants( - final java.util.List productVariants) { - this.productVariants = productVariants; - return this; - } - - /** - *

An array of product variants containing the image URL.

- * @param productVariants value to be set - * @return Builder - */ - - public ResultItemBuilder plusProductVariants( - final com.commercetools.ml.models.common.ProductVariant... productVariants) { - if (this.productVariants == null) { - this.productVariants = new ArrayList<>(); - } - this.productVariants.addAll(Arrays.asList(productVariants)); - return this; - } - - /** - *

An array of product variants containing the image URL.

- * @param builder function to build the productVariants value - * @return Builder - */ - - public ResultItemBuilder plusProductVariants( - Function builder) { - if (this.productVariants == null) { - this.productVariants = new ArrayList<>(); - } - this.productVariants.add(builder.apply(com.commercetools.ml.models.common.ProductVariantBuilder.of()).build()); - return this; - } - - /** - *

An array of product variants containing the image URL.

- * @param builder function to build the productVariants value - * @return Builder - */ - - public ResultItemBuilder withProductVariants( - Function builder) { - this.productVariants = new ArrayList<>(); - this.productVariants.add(builder.apply(com.commercetools.ml.models.common.ProductVariantBuilder.of()).build()); - return this; - } - - /** - *

An array of product variants containing the image URL.

- * @param builder function to build the productVariants value - * @return Builder - */ - - public ResultItemBuilder addProductVariants( - Function builder) { - return plusProductVariants(builder.apply(com.commercetools.ml.models.common.ProductVariantBuilder.of())); - } - - /** - *

An array of product variants containing the image URL.

- * @param builder function to build the productVariants value - * @return Builder - */ - - public ResultItemBuilder setProductVariants( - Function builder) { - return productVariants(builder.apply(com.commercetools.ml.models.common.ProductVariantBuilder.of())); - } - - /** - *

The URL of the image.

- * @return imageUrl - */ - - public String getImageUrl() { - return this.imageUrl; - } - - /** - *

An array of product variants containing the image URL.

- * @return productVariants - */ - - public java.util.List getProductVariants() { - return this.productVariants; - } - - /** - * builds ResultItem with checking for non-null required values - * @return ResultItem - */ - public ResultItem build() { - Objects.requireNonNull(imageUrl, ResultItem.class + ": imageUrl is missing"); - Objects.requireNonNull(productVariants, ResultItem.class + ": productVariants is missing"); - return new ResultItemImpl(imageUrl, productVariants); - } - - /** - * builds ResultItem without checking for non-null required values - * @return ResultItem - */ - public ResultItem buildUnchecked() { - return new ResultItemImpl(imageUrl, productVariants); - } - - /** - * factory method for an instance of ResultItemBuilder - * @return builder - */ - public static ResultItemBuilder of() { - return new ResultItemBuilder(); - } - - /** - * create builder for ResultItem instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ResultItemBuilder of(final ResultItem template) { - ResultItemBuilder builder = new ResultItemBuilder(); - builder.imageUrl = template.getImageUrl(); - builder.productVariants = template.getProductVariants(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItemImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItemImpl.java deleted file mode 100644 index afa38f6282c..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search/ResultItemImpl.java +++ /dev/null @@ -1,103 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

An image URL and the product variants it is contained in. If no matching images are found, ResultItem is not present.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ResultItemImpl implements ResultItem, ModelBase { - - private String imageUrl; - - private java.util.List productVariants; - - /** - * create instance with all properties - */ - @JsonCreator - ResultItemImpl(@JsonProperty("imageUrl") final String imageUrl, - @JsonProperty("productVariants") final java.util.List productVariants) { - this.imageUrl = imageUrl; - this.productVariants = productVariants; - } - - /** - * create empty instance - */ - public ResultItemImpl() { - } - - /** - *

The URL of the image.

- */ - - public String getImageUrl() { - return this.imageUrl; - } - - /** - *

An array of product variants containing the image URL.

- */ - - public java.util.List getProductVariants() { - return this.productVariants; - } - - public void setImageUrl(final String imageUrl) { - this.imageUrl = imageUrl; - } - - public void setProductVariants(final com.commercetools.ml.models.common.ProductVariant... productVariants) { - this.productVariants = new ArrayList<>(Arrays.asList(productVariants)); - } - - public void setProductVariants( - final java.util.List productVariants) { - this.productVariants = productVariants; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ResultItemImpl that = (ResultItemImpl) o; - - return new EqualsBuilder().append(imageUrl, that.imageUrl) - .append(productVariants, that.productVariants) - .append(imageUrl, that.imageUrl) - .append(productVariants, that.productVariants) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(imageUrl).append(productVariants).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("imageUrl", imageUrl) - .append("productVariants", productVariants) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateAction.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateAction.java deleted file mode 100644 index a008115c443..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateAction.java +++ /dev/null @@ -1,126 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ChangeStatusUpdateAction - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ChangeStatusUpdateAction changeStatusUpdateAction = ChangeStatusUpdateAction.builder()
- *             .status(ImageSearchConfigStatus.ON)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ChangeStatusUpdateActionImpl.class) -public interface ChangeStatusUpdateAction extends ImageSearchConfigUpdateAction { - - /** - * discriminator value for ChangeStatusUpdateAction - */ - String CHANGE_STATUS = "changeStatus"; - - /** - * - * @return status - */ - @NotNull - @JsonProperty("status") - public ImageSearchConfigStatus getStatus(); - - /** - * set status - * @param status value to be set - */ - - public void setStatus(final ImageSearchConfigStatus status); - - /** - * factory method - * @return instance of ChangeStatusUpdateAction - */ - public static ChangeStatusUpdateAction of() { - return new ChangeStatusUpdateActionImpl(); - } - - /** - * factory method to create a shallow copy ChangeStatusUpdateAction - * @param template instance to be copied - * @return copy instance - */ - public static ChangeStatusUpdateAction of(final ChangeStatusUpdateAction template) { - ChangeStatusUpdateActionImpl instance = new ChangeStatusUpdateActionImpl(); - instance.setStatus(template.getStatus()); - return instance; - } - - /** - * factory method to create a deep copy of ChangeStatusUpdateAction - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ChangeStatusUpdateAction deepCopy(@Nullable final ChangeStatusUpdateAction template) { - if (template == null) { - return null; - } - ChangeStatusUpdateActionImpl instance = new ChangeStatusUpdateActionImpl(); - instance.setStatus(template.getStatus()); - return instance; - } - - /** - * builder factory method for ChangeStatusUpdateAction - * @return builder - */ - public static ChangeStatusUpdateActionBuilder builder() { - return ChangeStatusUpdateActionBuilder.of(); - } - - /** - * create builder for ChangeStatusUpdateAction instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ChangeStatusUpdateActionBuilder builder(final ChangeStatusUpdateAction template) { - return ChangeStatusUpdateActionBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withChangeStatusUpdateAction(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionBuilder.java deleted file mode 100644 index 0bc25db60a7..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionBuilder.java +++ /dev/null @@ -1,83 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ChangeStatusUpdateActionBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ChangeStatusUpdateAction changeStatusUpdateAction = ChangeStatusUpdateAction.builder()
- *             .status(ImageSearchConfigStatus.ON)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ChangeStatusUpdateActionBuilder implements Builder { - - private com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status; - - /** - * set the value to the status - * @param status value to be set - * @return Builder - */ - - public ChangeStatusUpdateActionBuilder status( - final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status) { - this.status = status; - return this; - } - - /** - * value of status} - * @return status - */ - - public com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus getStatus() { - return this.status; - } - - /** - * builds ChangeStatusUpdateAction with checking for non-null required values - * @return ChangeStatusUpdateAction - */ - public ChangeStatusUpdateAction build() { - Objects.requireNonNull(status, ChangeStatusUpdateAction.class + ": status is missing"); - return new ChangeStatusUpdateActionImpl(status); - } - - /** - * builds ChangeStatusUpdateAction without checking for non-null required values - * @return ChangeStatusUpdateAction - */ - public ChangeStatusUpdateAction buildUnchecked() { - return new ChangeStatusUpdateActionImpl(status); - } - - /** - * factory method for an instance of ChangeStatusUpdateActionBuilder - * @return builder - */ - public static ChangeStatusUpdateActionBuilder of() { - return new ChangeStatusUpdateActionBuilder(); - } - - /** - * create builder for ChangeStatusUpdateAction instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ChangeStatusUpdateActionBuilder of(final ChangeStatusUpdateAction template) { - ChangeStatusUpdateActionBuilder builder = new ChangeStatusUpdateActionBuilder(); - builder.status = template.getStatus(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionImpl.java deleted file mode 100644 index 6bfa71a4089..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionImpl.java +++ /dev/null @@ -1,95 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ChangeStatusUpdateAction - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ChangeStatusUpdateActionImpl implements ChangeStatusUpdateAction, ModelBase { - - private String action; - - private com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status; - - /** - * create instance with all properties - */ - @JsonCreator - ChangeStatusUpdateActionImpl( - @JsonProperty("status") final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status) { - this.status = status; - this.action = CHANGE_STATUS; - } - - /** - * create empty instance - */ - public ChangeStatusUpdateActionImpl() { - this.action = CHANGE_STATUS; - } - - /** - * - */ - - public String getAction() { - return this.action; - } - - /** - * - */ - - public com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus getStatus() { - return this.status; - } - - public void setStatus(final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status) { - this.status = status; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ChangeStatusUpdateActionImpl that = (ChangeStatusUpdateActionImpl) o; - - return new EqualsBuilder().append(action, that.action) - .append(status, that.status) - .append(action, that.action) - .append(status, that.status) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(action).append(status).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) - .append("status", status) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequest.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequest.java deleted file mode 100644 index 4c644eb14ad..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequest.java +++ /dev/null @@ -1,136 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigRequest - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ImageSearchConfigRequest imageSearchConfigRequest = ImageSearchConfigRequest.builder()
- *             .plusActions(actionsBuilder -> actionsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ImageSearchConfigRequestImpl.class) -public interface ImageSearchConfigRequest { - - /** - *

The list of update actions to be performed on the project.

- * @return actions - */ - @NotNull - @Valid - @JsonProperty("actions") - public List getActions(); - - /** - *

The list of update actions to be performed on the project.

- * @param actions values to be set - */ - - @JsonIgnore - public void setActions(final ImageSearchConfigUpdateAction... actions); - - /** - *

The list of update actions to be performed on the project.

- * @param actions values to be set - */ - - public void setActions(final List actions); - - /** - * factory method - * @return instance of ImageSearchConfigRequest - */ - public static ImageSearchConfigRequest of() { - return new ImageSearchConfigRequestImpl(); - } - - /** - * factory method to create a shallow copy ImageSearchConfigRequest - * @param template instance to be copied - * @return copy instance - */ - public static ImageSearchConfigRequest of(final ImageSearchConfigRequest template) { - ImageSearchConfigRequestImpl instance = new ImageSearchConfigRequestImpl(); - instance.setActions(template.getActions()); - return instance; - } - - /** - * factory method to create a deep copy of ImageSearchConfigRequest - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ImageSearchConfigRequest deepCopy(@Nullable final ImageSearchConfigRequest template) { - if (template == null) { - return null; - } - ImageSearchConfigRequestImpl instance = new ImageSearchConfigRequestImpl(); - instance.setActions(Optional.ofNullable(template.getActions()) - .map(t -> t.stream() - .map(com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateAction::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - return instance; - } - - /** - * builder factory method for ImageSearchConfigRequest - * @return builder - */ - public static ImageSearchConfigRequestBuilder builder() { - return ImageSearchConfigRequestBuilder.of(); - } - - /** - * create builder for ImageSearchConfigRequest instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ImageSearchConfigRequestBuilder builder(final ImageSearchConfigRequest template) { - return ImageSearchConfigRequestBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withImageSearchConfigRequest(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestBuilder.java deleted file mode 100644 index 34a91a85168..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestBuilder.java +++ /dev/null @@ -1,143 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigRequestBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ImageSearchConfigRequest imageSearchConfigRequest = ImageSearchConfigRequest.builder()
- *             .plusActions(actionsBuilder -> actionsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchConfigRequestBuilder implements Builder { - - private java.util.List actions; - - /** - *

The list of update actions to be performed on the project.

- * @param actions value to be set - * @return Builder - */ - - public ImageSearchConfigRequestBuilder actions( - final com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateAction... actions) { - this.actions = new ArrayList<>(Arrays.asList(actions)); - return this; - } - - /** - *

The list of update actions to be performed on the project.

- * @param actions value to be set - * @return Builder - */ - - public ImageSearchConfigRequestBuilder actions( - final java.util.List actions) { - this.actions = actions; - return this; - } - - /** - *

The list of update actions to be performed on the project.

- * @param actions value to be set - * @return Builder - */ - - public ImageSearchConfigRequestBuilder plusActions( - final com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateAction... actions) { - if (this.actions == null) { - this.actions = new ArrayList<>(); - } - this.actions.addAll(Arrays.asList(actions)); - return this; - } - - /** - *

The list of update actions to be performed on the project.

- * @param builder function to build the actions value - * @return Builder - */ - - public ImageSearchConfigRequestBuilder plusActions( - Function> builder) { - if (this.actions == null) { - this.actions = new ArrayList<>(); - } - this.actions.add( - builder.apply(com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateActionBuilder.of()) - .build()); - return this; - } - - /** - *

The list of update actions to be performed on the project.

- * @param builder function to build the actions value - * @return Builder - */ - - public ImageSearchConfigRequestBuilder withActions( - Function> builder) { - this.actions = new ArrayList<>(); - this.actions.add( - builder.apply(com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateActionBuilder.of()) - .build()); - return this; - } - - /** - *

The list of update actions to be performed on the project.

- * @return actions - */ - - public java.util.List getActions() { - return this.actions; - } - - /** - * builds ImageSearchConfigRequest with checking for non-null required values - * @return ImageSearchConfigRequest - */ - public ImageSearchConfigRequest build() { - Objects.requireNonNull(actions, ImageSearchConfigRequest.class + ": actions is missing"); - return new ImageSearchConfigRequestImpl(actions); - } - - /** - * builds ImageSearchConfigRequest without checking for non-null required values - * @return ImageSearchConfigRequest - */ - public ImageSearchConfigRequest buildUnchecked() { - return new ImageSearchConfigRequestImpl(actions); - } - - /** - * factory method for an instance of ImageSearchConfigRequestBuilder - * @return builder - */ - public static ImageSearchConfigRequestBuilder of() { - return new ImageSearchConfigRequestBuilder(); - } - - /** - * create builder for ImageSearchConfigRequest instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ImageSearchConfigRequestBuilder of(final ImageSearchConfigRequest template) { - ImageSearchConfigRequestBuilder builder = new ImageSearchConfigRequestBuilder(); - builder.actions = template.getActions(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestImpl.java deleted file mode 100644 index aaf6c9d190a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestImpl.java +++ /dev/null @@ -1,83 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ImageSearchConfigRequest - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchConfigRequestImpl implements ImageSearchConfigRequest, ModelBase { - - private java.util.List actions; - - /** - * create instance with all properties - */ - @JsonCreator - ImageSearchConfigRequestImpl( - @JsonProperty("actions") final java.util.List actions) { - this.actions = actions; - } - - /** - * create empty instance - */ - public ImageSearchConfigRequestImpl() { - } - - /** - *

The list of update actions to be performed on the project.

- */ - - public java.util.List getActions() { - return this.actions; - } - - public void setActions( - final com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateAction... actions) { - this.actions = new ArrayList<>(Arrays.asList(actions)); - } - - public void setActions( - final java.util.List actions) { - this.actions = actions; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ImageSearchConfigRequestImpl that = (ImageSearchConfigRequestImpl) o; - - return new EqualsBuilder().append(actions, that.actions).append(actions, that.actions).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(actions).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("actions", actions).build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponse.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponse.java deleted file mode 100644 index 50b41cbde99..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponse.java +++ /dev/null @@ -1,140 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.time.ZonedDateTime; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigResponse - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ImageSearchConfigResponse imageSearchConfigResponse = ImageSearchConfigResponse.builder()
- *             .status(ImageSearchConfigStatus.ON)
- *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ImageSearchConfigResponseImpl.class) -public interface ImageSearchConfigResponse { - - /** - *

The image search activation status.

- * @return status - */ - @NotNull - @JsonProperty("status") - public ImageSearchConfigStatus getStatus(); - - /** - * - * @return lastModifiedAt - */ - @NotNull - @JsonProperty("lastModifiedAt") - public ZonedDateTime getLastModifiedAt(); - - /** - *

The image search activation status.

- * @param status value to be set - */ - - public void setStatus(final ImageSearchConfigStatus status); - - /** - * set lastModifiedAt - * @param lastModifiedAt value to be set - */ - - public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); - - /** - * factory method - * @return instance of ImageSearchConfigResponse - */ - public static ImageSearchConfigResponse of() { - return new ImageSearchConfigResponseImpl(); - } - - /** - * factory method to create a shallow copy ImageSearchConfigResponse - * @param template instance to be copied - * @return copy instance - */ - public static ImageSearchConfigResponse of(final ImageSearchConfigResponse template) { - ImageSearchConfigResponseImpl instance = new ImageSearchConfigResponseImpl(); - instance.setStatus(template.getStatus()); - instance.setLastModifiedAt(template.getLastModifiedAt()); - return instance; - } - - /** - * factory method to create a deep copy of ImageSearchConfigResponse - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ImageSearchConfigResponse deepCopy(@Nullable final ImageSearchConfigResponse template) { - if (template == null) { - return null; - } - ImageSearchConfigResponseImpl instance = new ImageSearchConfigResponseImpl(); - instance.setStatus(template.getStatus()); - instance.setLastModifiedAt(template.getLastModifiedAt()); - return instance; - } - - /** - * builder factory method for ImageSearchConfigResponse - * @return builder - */ - public static ImageSearchConfigResponseBuilder builder() { - return ImageSearchConfigResponseBuilder.of(); - } - - /** - * create builder for ImageSearchConfigResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ImageSearchConfigResponseBuilder builder(final ImageSearchConfigResponse template) { - return ImageSearchConfigResponseBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withImageSearchConfigResponse(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseBuilder.java deleted file mode 100644 index d32bfad33b3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseBuilder.java +++ /dev/null @@ -1,108 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.util.*; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigResponseBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ImageSearchConfigResponse imageSearchConfigResponse = ImageSearchConfigResponse.builder()
- *             .status(ImageSearchConfigStatus.ON)
- *             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchConfigResponseBuilder implements Builder { - - private com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status; - - private java.time.ZonedDateTime lastModifiedAt; - - /** - *

The image search activation status.

- * @param status value to be set - * @return Builder - */ - - public ImageSearchConfigResponseBuilder status( - final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status) { - this.status = status; - return this; - } - - /** - * set the value to the lastModifiedAt - * @param lastModifiedAt value to be set - * @return Builder - */ - - public ImageSearchConfigResponseBuilder lastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { - this.lastModifiedAt = lastModifiedAt; - return this; - } - - /** - *

The image search activation status.

- * @return status - */ - - public com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus getStatus() { - return this.status; - } - - /** - * value of lastModifiedAt} - * @return lastModifiedAt - */ - - public java.time.ZonedDateTime getLastModifiedAt() { - return this.lastModifiedAt; - } - - /** - * builds ImageSearchConfigResponse with checking for non-null required values - * @return ImageSearchConfigResponse - */ - public ImageSearchConfigResponse build() { - Objects.requireNonNull(status, ImageSearchConfigResponse.class + ": status is missing"); - Objects.requireNonNull(lastModifiedAt, ImageSearchConfigResponse.class + ": lastModifiedAt is missing"); - return new ImageSearchConfigResponseImpl(status, lastModifiedAt); - } - - /** - * builds ImageSearchConfigResponse without checking for non-null required values - * @return ImageSearchConfigResponse - */ - public ImageSearchConfigResponse buildUnchecked() { - return new ImageSearchConfigResponseImpl(status, lastModifiedAt); - } - - /** - * factory method for an instance of ImageSearchConfigResponseBuilder - * @return builder - */ - public static ImageSearchConfigResponseBuilder of() { - return new ImageSearchConfigResponseBuilder(); - } - - /** - * create builder for ImageSearchConfigResponse instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ImageSearchConfigResponseBuilder of(final ImageSearchConfigResponse template) { - ImageSearchConfigResponseBuilder builder = new ImageSearchConfigResponseBuilder(); - builder.status = template.getStatus(); - builder.lastModifiedAt = template.getLastModifiedAt(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseImpl.java deleted file mode 100644 index bacd70a4870..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseImpl.java +++ /dev/null @@ -1,99 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ImageSearchConfigResponse - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchConfigResponseImpl implements ImageSearchConfigResponse, ModelBase { - - private com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status; - - private java.time.ZonedDateTime lastModifiedAt; - - /** - * create instance with all properties - */ - @JsonCreator - ImageSearchConfigResponseImpl( - @JsonProperty("status") final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status, - @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt) { - this.status = status; - this.lastModifiedAt = lastModifiedAt; - } - - /** - * create empty instance - */ - public ImageSearchConfigResponseImpl() { - } - - /** - *

The image search activation status.

- */ - - public com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus getStatus() { - return this.status; - } - - /** - * - */ - - public java.time.ZonedDateTime getLastModifiedAt() { - return this.lastModifiedAt; - } - - public void setStatus(final com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus status) { - this.status = status; - } - - public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { - this.lastModifiedAt = lastModifiedAt; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ImageSearchConfigResponseImpl that = (ImageSearchConfigResponseImpl) o; - - return new EqualsBuilder().append(status, that.status) - .append(lastModifiedAt, that.lastModifiedAt) - .append(status, that.status) - .append(lastModifiedAt, that.lastModifiedAt) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(status).append(lastModifiedAt).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("status", status) - .append("lastModifiedAt", lastModifiedAt) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigStatus.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigStatus.java deleted file mode 100644 index 87fdaa7ba5b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigStatus.java +++ /dev/null @@ -1,112 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.util.Arrays; -import java.util.Optional; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -import io.vrap.rmf.base.client.JsonEnum; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigStatus - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public interface ImageSearchConfigStatus extends JsonEnum { - - ImageSearchConfigStatus ON = ImageSearchConfigStatusEnum.ON; - - ImageSearchConfigStatus OFF = ImageSearchConfigStatusEnum.OFF; - - /** - * possible values of ImageSearchConfigStatus - */ - enum ImageSearchConfigStatusEnum implements ImageSearchConfigStatus { - /** - * on - */ - ON("on"), - - /** - * off - */ - OFF("off"); - private final String jsonName; - - private ImageSearchConfigStatusEnum(final String jsonName) { - this.jsonName = jsonName; - } - - public String getJsonName() { - return jsonName; - } - - public String toString() { - return jsonName; - } - } - - /** - * the JSON value - * @return json value - */ - @JsonValue - String getJsonName(); - - /** - * the enum value - * @return name - */ - String name(); - - /** - * convert value to string - * @return string representation - */ - String toString(); - - /** - * factory method for a enum value of ImageSearchConfigStatus - * if no enum has been found an anonymous instance will be created - * @param value the enum value to be wrapped - * @return enum instance - */ - @JsonCreator - public static ImageSearchConfigStatus findEnum(String value) { - return findEnumViaJsonName(value).orElse(new ImageSearchConfigStatus() { - @Override - public String getJsonName() { - return value; - } - - @Override - public String name() { - return value.toUpperCase(); - } - - public String toString() { - return value; - } - }); - } - - /** - * method to find enum using the JSON value - * @param jsonName the json value to be wrapped - * @return optional of enum instance - */ - public static Optional findEnumViaJsonName(String jsonName) { - return Arrays.stream(values()).filter(t -> t.getJsonName().equals(jsonName)).findFirst(); - } - - /** - * possible enum values - * @return array of possible enum values - */ - public static ImageSearchConfigStatus[] values() { - return ImageSearchConfigStatusEnum.values(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateAction.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateAction.java deleted file mode 100644 index b3ca741a76e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateAction.java +++ /dev/null @@ -1,92 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigUpdateAction - * - *
- * Example to create a subtype instance using the builder pattern - *
- *

- *     ImageSearchConfigUpdateAction imageSearchConfigUpdateAction = ImageSearchConfigUpdateAction.changeStatusBuilder()
- *             status(ImageSearchConfigStatus.ON)
- *             .build()
- * 
- *
- */ -@JsonSubTypes({ - @JsonSubTypes.Type(value = com.commercetools.ml.models.image_search_config.ChangeStatusUpdateActionImpl.class, name = ChangeStatusUpdateAction.CHANGE_STATUS) }) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "action", defaultImpl = ImageSearchConfigUpdateActionImpl.class, visible = true) -@JsonDeserialize(as = ImageSearchConfigUpdateActionImpl.class) -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public interface ImageSearchConfigUpdateAction { - - /** - * - * @return action - */ - @NotNull - @JsonProperty("action") - public String getAction(); - - /** - * factory method to create a deep copy of ImageSearchConfigUpdateAction - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ImageSearchConfigUpdateAction deepCopy(@Nullable final ImageSearchConfigUpdateAction template) { - if (template == null) { - return null; - } - if (template instanceof com.commercetools.ml.models.image_search_config.ChangeStatusUpdateAction) { - return com.commercetools.ml.models.image_search_config.ChangeStatusUpdateAction - .deepCopy((com.commercetools.ml.models.image_search_config.ChangeStatusUpdateAction) template); - } - ImageSearchConfigUpdateActionImpl instance = new ImageSearchConfigUpdateActionImpl(); - return instance; - } - - /** - * builder for changeStatus subtype - * @return builder - */ - public static com.commercetools.ml.models.image_search_config.ChangeStatusUpdateActionBuilder changeStatusBuilder() { - return com.commercetools.ml.models.image_search_config.ChangeStatusUpdateActionBuilder.of(); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withImageSearchConfigUpdateAction(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateActionBuilder.java deleted file mode 100644 index 1930694ad78..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateActionBuilder.java +++ /dev/null @@ -1,26 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.util.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ImageSearchConfigUpdateActionBuilder - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchConfigUpdateActionBuilder { - - public com.commercetools.ml.models.image_search_config.ChangeStatusUpdateActionBuilder changeStatusBuilder() { - return com.commercetools.ml.models.image_search_config.ChangeStatusUpdateActionBuilder.of(); - } - - /** - * factory method for an instance of ImageSearchConfigUpdateActionBuilder - * @return builder - */ - public static ImageSearchConfigUpdateActionBuilder of() { - return new ImageSearchConfigUpdateActionBuilder(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateActionImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateActionImpl.java deleted file mode 100644 index f91390c32ed..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigUpdateActionImpl.java +++ /dev/null @@ -1,72 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * ImageSearchConfigUpdateAction - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ImageSearchConfigUpdateActionImpl implements ImageSearchConfigUpdateAction, ModelBase { - - private String action; - - /** - * create instance with all properties - */ - @JsonCreator - ImageSearchConfigUpdateActionImpl(@JsonProperty("action") final String action) { - this.action = action; - } - - /** - * create empty instance - */ - public ImageSearchConfigUpdateActionImpl() { - } - - /** - * - */ - - public String getAction() { - return this.action; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ImageSearchConfigUpdateActionImpl that = (ImageSearchConfigUpdateActionImpl) o; - - return new EqualsBuilder().append(action, that.action).append(action, that.action).isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(action).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action).build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelector.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelector.java deleted file mode 100644 index 445f8dba246..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelector.java +++ /dev/null @@ -1,222 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

A set of ProductData for comparison. If no optional attributes are specified, all current ProductData are selected for comparison.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductSetSelector productSetSelector = ProductSetSelector.builder()
- *             .projectKey("{projectKey}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = ProductSetSelectorImpl.class) -public interface ProductSetSelector { - - /** - *

The project containing the project set.

- * @return projectKey - */ - @NotNull - @JsonProperty("projectKey") - public String getProjectKey(); - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @return productIds - */ - - @JsonProperty("productIds") - public List getProductIds(); - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @return productTypeIds - */ - - @JsonProperty("productTypeIds") - public List getProductTypeIds(); - - /** - *

Specifies use of staged or current product data.

- * @return staged - */ - - @JsonProperty("staged") - public Boolean getStaged(); - - /** - *

Specifies use of product variants. If set to true, all product variants are compared, not just the master variant.

- * @return includeVariants - */ - - @JsonProperty("includeVariants") - public Boolean getIncludeVariants(); - - /** - *

Maximum number of products to check (if unspecified, all products are considered). Note that the maximum number of product comparisons between two productSets is 20,000,000. This limit cannot be exceeded. If you need a higher limit, contact https://support.commercetools.com

- * @return productSetLimit - */ - - @JsonProperty("productSetLimit") - public Long getProductSetLimit(); - - /** - *

The project containing the project set.

- * @param projectKey value to be set - */ - - public void setProjectKey(final String projectKey); - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @param productIds values to be set - */ - - @JsonIgnore - public void setProductIds(final String... productIds); - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @param productIds values to be set - */ - - public void setProductIds(final List productIds); - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @param productTypeIds values to be set - */ - - @JsonIgnore - public void setProductTypeIds(final String... productTypeIds); - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @param productTypeIds values to be set - */ - - public void setProductTypeIds(final List productTypeIds); - - /** - *

Specifies use of staged or current product data.

- * @param staged value to be set - */ - - public void setStaged(final Boolean staged); - - /** - *

Specifies use of product variants. If set to true, all product variants are compared, not just the master variant.

- * @param includeVariants value to be set - */ - - public void setIncludeVariants(final Boolean includeVariants); - - /** - *

Maximum number of products to check (if unspecified, all products are considered). Note that the maximum number of product comparisons between two productSets is 20,000,000. This limit cannot be exceeded. If you need a higher limit, contact https://support.commercetools.com

- * @param productSetLimit value to be set - */ - - public void setProductSetLimit(final Long productSetLimit); - - /** - * factory method - * @return instance of ProductSetSelector - */ - public static ProductSetSelector of() { - return new ProductSetSelectorImpl(); - } - - /** - * factory method to create a shallow copy ProductSetSelector - * @param template instance to be copied - * @return copy instance - */ - public static ProductSetSelector of(final ProductSetSelector template) { - ProductSetSelectorImpl instance = new ProductSetSelectorImpl(); - instance.setProjectKey(template.getProjectKey()); - instance.setProductIds(template.getProductIds()); - instance.setProductTypeIds(template.getProductTypeIds()); - instance.setStaged(template.getStaged()); - instance.setIncludeVariants(template.getIncludeVariants()); - instance.setProductSetLimit(template.getProductSetLimit()); - return instance; - } - - /** - * factory method to create a deep copy of ProductSetSelector - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ProductSetSelector deepCopy(@Nullable final ProductSetSelector template) { - if (template == null) { - return null; - } - ProductSetSelectorImpl instance = new ProductSetSelectorImpl(); - instance.setProjectKey(template.getProjectKey()); - instance.setProductIds(Optional.ofNullable(template.getProductIds()).map(ArrayList::new).orElse(null)); - instance.setProductTypeIds(Optional.ofNullable(template.getProductTypeIds()).map(ArrayList::new).orElse(null)); - instance.setStaged(template.getStaged()); - instance.setIncludeVariants(template.getIncludeVariants()); - instance.setProductSetLimit(template.getProductSetLimit()); - return instance; - } - - /** - * builder factory method for ProductSetSelector - * @return builder - */ - public static ProductSetSelectorBuilder builder() { - return ProductSetSelectorBuilder.of(); - } - - /** - * create builder for ProductSetSelector instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductSetSelectorBuilder builder(final ProductSetSelector template) { - return ProductSetSelectorBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withProductSetSelector(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorBuilder.java deleted file mode 100644 index ce5f7e334f4..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorBuilder.java +++ /dev/null @@ -1,261 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * ProductSetSelectorBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     ProductSetSelector productSetSelector = ProductSetSelector.builder()
- *             .projectKey("{projectKey}")
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductSetSelectorBuilder implements Builder { - - private String projectKey; - - @Nullable - private java.util.List productIds; - - @Nullable - private java.util.List productTypeIds; - - @Nullable - private Boolean staged; - - @Nullable - private Boolean includeVariants; - - @Nullable - private Long productSetLimit; - - /** - *

The project containing the project set.

- * @param projectKey value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder projectKey(final String projectKey) { - this.projectKey = projectKey; - return this; - } - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @param productIds value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder productIds(@Nullable final String... productIds) { - this.productIds = new ArrayList<>(Arrays.asList(productIds)); - return this; - } - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @param productIds value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder productIds(@Nullable final java.util.List productIds) { - this.productIds = productIds; - return this; - } - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @param productIds value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder plusProductIds(@Nullable final String... productIds) { - if (this.productIds == null) { - this.productIds = new ArrayList<>(); - } - this.productIds.addAll(Arrays.asList(productIds)); - return this; - } - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @param productTypeIds value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder productTypeIds(@Nullable final String... productTypeIds) { - this.productTypeIds = new ArrayList<>(Arrays.asList(productTypeIds)); - return this; - } - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @param productTypeIds value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder productTypeIds(@Nullable final java.util.List productTypeIds) { - this.productTypeIds = productTypeIds; - return this; - } - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @param productTypeIds value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder plusProductTypeIds(@Nullable final String... productTypeIds) { - if (this.productTypeIds == null) { - this.productTypeIds = new ArrayList<>(); - } - this.productTypeIds.addAll(Arrays.asList(productTypeIds)); - return this; - } - - /** - *

Specifies use of staged or current product data.

- * @param staged value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder staged(@Nullable final Boolean staged) { - this.staged = staged; - return this; - } - - /** - *

Specifies use of product variants. If set to true, all product variants are compared, not just the master variant.

- * @param includeVariants value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder includeVariants(@Nullable final Boolean includeVariants) { - this.includeVariants = includeVariants; - return this; - } - - /** - *

Maximum number of products to check (if unspecified, all products are considered). Note that the maximum number of product comparisons between two productSets is 20,000,000. This limit cannot be exceeded. If you need a higher limit, contact https://support.commercetools.com

- * @param productSetLimit value to be set - * @return Builder - */ - - public ProductSetSelectorBuilder productSetLimit(@Nullable final Long productSetLimit) { - this.productSetLimit = productSetLimit; - return this; - } - - /** - *

The project containing the project set.

- * @return projectKey - */ - - public String getProjectKey() { - return this.projectKey; - } - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- * @return productIds - */ - - @Nullable - public java.util.List getProductIds() { - return this.productIds; - } - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- * @return productTypeIds - */ - - @Nullable - public java.util.List getProductTypeIds() { - return this.productTypeIds; - } - - /** - *

Specifies use of staged or current product data.

- * @return staged - */ - - @Nullable - public Boolean getStaged() { - return this.staged; - } - - /** - *

Specifies use of product variants. If set to true, all product variants are compared, not just the master variant.

- * @return includeVariants - */ - - @Nullable - public Boolean getIncludeVariants() { - return this.includeVariants; - } - - /** - *

Maximum number of products to check (if unspecified, all products are considered). Note that the maximum number of product comparisons between two productSets is 20,000,000. This limit cannot be exceeded. If you need a higher limit, contact https://support.commercetools.com

- * @return productSetLimit - */ - - @Nullable - public Long getProductSetLimit() { - return this.productSetLimit; - } - - /** - * builds ProductSetSelector with checking for non-null required values - * @return ProductSetSelector - */ - public ProductSetSelector build() { - Objects.requireNonNull(projectKey, ProductSetSelector.class + ": projectKey is missing"); - return new ProductSetSelectorImpl(projectKey, productIds, productTypeIds, staged, includeVariants, - productSetLimit); - } - - /** - * builds ProductSetSelector without checking for non-null required values - * @return ProductSetSelector - */ - public ProductSetSelector buildUnchecked() { - return new ProductSetSelectorImpl(projectKey, productIds, productTypeIds, staged, includeVariants, - productSetLimit); - } - - /** - * factory method for an instance of ProductSetSelectorBuilder - * @return builder - */ - public static ProductSetSelectorBuilder of() { - return new ProductSetSelectorBuilder(); - } - - /** - * create builder for ProductSetSelector instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ProductSetSelectorBuilder of(final ProductSetSelector template) { - ProductSetSelectorBuilder builder = new ProductSetSelectorBuilder(); - builder.projectKey = template.getProjectKey(); - builder.productIds = template.getProductIds(); - builder.productTypeIds = template.getProductTypeIds(); - builder.staged = template.getStaged(); - builder.includeVariants = template.getIncludeVariants(); - builder.productSetLimit = template.getProductSetLimit(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorImpl.java deleted file mode 100644 index 714c76aa0fc..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorImpl.java +++ /dev/null @@ -1,188 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

A set of ProductData for comparison. If no optional attributes are specified, all current ProductData are selected for comparison.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ProductSetSelectorImpl implements ProductSetSelector, ModelBase { - - private String projectKey; - - private java.util.List productIds; - - private java.util.List productTypeIds; - - private Boolean staged; - - private Boolean includeVariants; - - private Long productSetLimit; - - /** - * create instance with all properties - */ - @JsonCreator - ProductSetSelectorImpl(@JsonProperty("projectKey") final String projectKey, - @JsonProperty("productIds") final java.util.List productIds, - @JsonProperty("productTypeIds") final java.util.List productTypeIds, - @JsonProperty("staged") final Boolean staged, - @JsonProperty("includeVariants") final Boolean includeVariants, - @JsonProperty("productSetLimit") final Long productSetLimit) { - this.projectKey = projectKey; - this.productIds = productIds; - this.productTypeIds = productTypeIds; - this.staged = staged; - this.includeVariants = includeVariants; - this.productSetLimit = productSetLimit; - } - - /** - * create empty instance - */ - public ProductSetSelectorImpl() { - } - - /** - *

The project containing the project set.

- */ - - public String getProjectKey() { - return this.projectKey; - } - - /** - *

An array of Product IDs to compare. If unspecified, no Product ID filter is applied.

- */ - - public java.util.List getProductIds() { - return this.productIds; - } - - /** - *

An array of product type IDs. Only products with product types in this array are compared. If unspecified, no product type filter is applied.

- */ - - public java.util.List getProductTypeIds() { - return this.productTypeIds; - } - - /** - *

Specifies use of staged or current product data.

- */ - - public Boolean getStaged() { - return this.staged; - } - - /** - *

Specifies use of product variants. If set to true, all product variants are compared, not just the master variant.

- */ - - public Boolean getIncludeVariants() { - return this.includeVariants; - } - - /** - *

Maximum number of products to check (if unspecified, all products are considered). Note that the maximum number of product comparisons between two productSets is 20,000,000. This limit cannot be exceeded. If you need a higher limit, contact https://support.commercetools.com

- */ - - public Long getProductSetLimit() { - return this.productSetLimit; - } - - public void setProjectKey(final String projectKey) { - this.projectKey = projectKey; - } - - public void setProductIds(final String... productIds) { - this.productIds = new ArrayList<>(Arrays.asList(productIds)); - } - - public void setProductIds(final java.util.List productIds) { - this.productIds = productIds; - } - - public void setProductTypeIds(final String... productTypeIds) { - this.productTypeIds = new ArrayList<>(Arrays.asList(productTypeIds)); - } - - public void setProductTypeIds(final java.util.List productTypeIds) { - this.productTypeIds = productTypeIds; - } - - public void setStaged(final Boolean staged) { - this.staged = staged; - } - - public void setIncludeVariants(final Boolean includeVariants) { - this.includeVariants = includeVariants; - } - - public void setProductSetLimit(final Long productSetLimit) { - this.productSetLimit = productSetLimit; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ProductSetSelectorImpl that = (ProductSetSelectorImpl) o; - - return new EqualsBuilder().append(projectKey, that.projectKey) - .append(productIds, that.productIds) - .append(productTypeIds, that.productTypeIds) - .append(staged, that.staged) - .append(includeVariants, that.includeVariants) - .append(productSetLimit, that.productSetLimit) - .append(projectKey, that.projectKey) - .append(productIds, that.productIds) - .append(productTypeIds, that.productTypeIds) - .append(staged, that.staged) - .append(includeVariants, that.includeVariants) - .append(productSetLimit, that.productSetLimit) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(projectKey) - .append(productIds) - .append(productTypeIds) - .append(staged) - .append(includeVariants) - .append(productSetLimit) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("projectKey", projectKey) - .append("productIds", productIds) - .append("productTypeIds", productTypeIds) - .append("staged", staged) - .append("includeVariants", includeVariants) - .append("productSetLimit", productSetLimit) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProduct.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProduct.java deleted file mode 100644 index 1bc4cec9300..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProduct.java +++ /dev/null @@ -1,155 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.Valid; - -import com.commercetools.ml.models.common.ProductReference; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

One part of a SimilarProductPair. Refers to a specific ProductVariant.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProduct similarProduct = SimilarProduct.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductImpl.class) -public interface SimilarProduct { - - /** - *

Reference to Product

- * @return product - */ - @Valid - @JsonProperty("product") - public ProductReference getProduct(); - - /** - *

ID of the ProductVariant that was compared.

- * @return variantId - */ - - @JsonProperty("variantId") - public Long getVariantId(); - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- * @return meta - */ - @Valid - @JsonProperty("meta") - public SimilarProductMeta getMeta(); - - /** - *

Reference to Product

- * @param product value to be set - */ - - public void setProduct(final ProductReference product); - - /** - *

ID of the ProductVariant that was compared.

- * @param variantId value to be set - */ - - public void setVariantId(final Long variantId); - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- * @param meta value to be set - */ - - public void setMeta(final SimilarProductMeta meta); - - /** - * factory method - * @return instance of SimilarProduct - */ - public static SimilarProduct of() { - return new SimilarProductImpl(); - } - - /** - * factory method to create a shallow copy SimilarProduct - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProduct of(final SimilarProduct template) { - SimilarProductImpl instance = new SimilarProductImpl(); - instance.setProduct(template.getProduct()); - instance.setVariantId(template.getVariantId()); - instance.setMeta(template.getMeta()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProduct - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProduct deepCopy(@Nullable final SimilarProduct template) { - if (template == null) { - return null; - } - SimilarProductImpl instance = new SimilarProductImpl(); - instance.setProduct(com.commercetools.ml.models.common.ProductReference.deepCopy(template.getProduct())); - instance.setVariantId(template.getVariantId()); - instance.setMeta(com.commercetools.ml.models.similar_products.SimilarProductMeta.deepCopy(template.getMeta())); - return instance; - } - - /** - * builder factory method for SimilarProduct - * @return builder - */ - public static SimilarProductBuilder builder() { - return SimilarProductBuilder.of(); - } - - /** - * create builder for SimilarProduct instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductBuilder builder(final SimilarProduct template) { - return SimilarProductBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProduct(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductBuilder.java deleted file mode 100644 index d7831d851c3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductBuilder.java +++ /dev/null @@ -1,184 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProduct similarProduct = SimilarProduct.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductBuilder implements Builder { - - @Nullable - private com.commercetools.ml.models.common.ProductReference product; - - @Nullable - private Long variantId; - - @Nullable - private com.commercetools.ml.models.similar_products.SimilarProductMeta meta; - - /** - *

Reference to Product

- * @param builder function to build the product value - * @return Builder - */ - - public SimilarProductBuilder product( - Function builder) { - this.product = builder.apply(com.commercetools.ml.models.common.ProductReferenceBuilder.of()).build(); - return this; - } - - /** - *

Reference to Product

- * @param builder function to build the product value - * @return Builder - */ - - public SimilarProductBuilder withProduct( - Function builder) { - this.product = builder.apply(com.commercetools.ml.models.common.ProductReferenceBuilder.of()); - return this; - } - - /** - *

Reference to Product

- * @param product value to be set - * @return Builder - */ - - public SimilarProductBuilder product(@Nullable final com.commercetools.ml.models.common.ProductReference product) { - this.product = product; - return this; - } - - /** - *

ID of the ProductVariant that was compared.

- * @param variantId value to be set - * @return Builder - */ - - public SimilarProductBuilder variantId(@Nullable final Long variantId) { - this.variantId = variantId; - return this; - } - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- * @param builder function to build the meta value - * @return Builder - */ - - public SimilarProductBuilder meta( - Function builder) { - this.meta = builder.apply(com.commercetools.ml.models.similar_products.SimilarProductMetaBuilder.of()).build(); - return this; - } - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- * @param builder function to build the meta value - * @return Builder - */ - - public SimilarProductBuilder withMeta( - Function builder) { - this.meta = builder.apply(com.commercetools.ml.models.similar_products.SimilarProductMetaBuilder.of()); - return this; - } - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- * @param meta value to be set - * @return Builder - */ - - public SimilarProductBuilder meta( - @Nullable final com.commercetools.ml.models.similar_products.SimilarProductMeta meta) { - this.meta = meta; - return this; - } - - /** - *

Reference to Product

- * @return product - */ - - @Nullable - public com.commercetools.ml.models.common.ProductReference getProduct() { - return this.product; - } - - /** - *

ID of the ProductVariant that was compared.

- * @return variantId - */ - - @Nullable - public Long getVariantId() { - return this.variantId; - } - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- * @return meta - */ - - @Nullable - public com.commercetools.ml.models.similar_products.SimilarProductMeta getMeta() { - return this.meta; - } - - /** - * builds SimilarProduct with checking for non-null required values - * @return SimilarProduct - */ - public SimilarProduct build() { - return new SimilarProductImpl(product, variantId, meta); - } - - /** - * builds SimilarProduct without checking for non-null required values - * @return SimilarProduct - */ - public SimilarProduct buildUnchecked() { - return new SimilarProductImpl(product, variantId, meta); - } - - /** - * factory method for an instance of SimilarProductBuilder - * @return builder - */ - public static SimilarProductBuilder of() { - return new SimilarProductBuilder(); - } - - /** - * create builder for SimilarProduct instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductBuilder of(final SimilarProduct template) { - SimilarProductBuilder builder = new SimilarProductBuilder(); - builder.product = template.getProduct(); - builder.variantId = template.getVariantId(); - builder.meta = template.getMeta(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductImpl.java deleted file mode 100644 index 484ed4a29a1..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductImpl.java +++ /dev/null @@ -1,117 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

One part of a SimilarProductPair. Refers to a specific ProductVariant.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductImpl implements SimilarProduct, ModelBase { - - private com.commercetools.ml.models.common.ProductReference product; - - private Long variantId; - - private com.commercetools.ml.models.similar_products.SimilarProductMeta meta; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductImpl(@JsonProperty("product") final com.commercetools.ml.models.common.ProductReference product, - @JsonProperty("variantId") final Long variantId, - @JsonProperty("meta") final com.commercetools.ml.models.similar_products.SimilarProductMeta meta) { - this.product = product; - this.variantId = variantId; - this.meta = meta; - } - - /** - * create empty instance - */ - public SimilarProductImpl() { - } - - /** - *

Reference to Product

- */ - - public com.commercetools.ml.models.common.ProductReference getProduct() { - return this.product; - } - - /** - *

ID of the ProductVariant that was compared.

- */ - - public Long getVariantId() { - return this.variantId; - } - - /** - *

Supplementary information about the data used for similarity estimation. This information helps you understand the estimated confidence score, but it should not be used to identify a product.

- */ - - public com.commercetools.ml.models.similar_products.SimilarProductMeta getMeta() { - return this.meta; - } - - public void setProduct(final com.commercetools.ml.models.common.ProductReference product) { - this.product = product; - } - - public void setVariantId(final Long variantId) { - this.variantId = variantId; - } - - public void setMeta(final com.commercetools.ml.models.similar_products.SimilarProductMeta meta) { - this.meta = meta; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductImpl that = (SimilarProductImpl) o; - - return new EqualsBuilder().append(product, that.product) - .append(variantId, that.variantId) - .append(meta, that.meta) - .append(product, that.product) - .append(variantId, that.variantId) - .append(meta, that.meta) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(product).append(variantId).append(meta).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("product", product) - .append("variantId", variantId) - .append("meta", meta) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMeta.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMeta.java deleted file mode 100644 index e59a1f11fb4..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMeta.java +++ /dev/null @@ -1,173 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.Valid; - -import com.commercetools.ml.models.common.LocalizedString; -import com.commercetools.ml.models.common.Money; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductMeta - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductMeta similarProductMeta = SimilarProductMeta.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductMetaImpl.class) -public interface SimilarProductMeta { - - /** - *

Localized product name used for similarity estimation.

- * @return name - */ - @Valid - @JsonProperty("name") - public LocalizedString getName(); - - /** - *

Localized product description used for similarity estimation.

- * @return description - */ - @Valid - @JsonProperty("description") - public LocalizedString getDescription(); - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- * @return price - */ - @Valid - @JsonProperty("price") - public Money getPrice(); - - /** - *

Total number of variants associated with the product.

- * @return variantCount - */ - - @JsonProperty("variantCount") - public Long getVariantCount(); - - /** - *

Localized product name used for similarity estimation.

- * @param name value to be set - */ - - public void setName(final LocalizedString name); - - /** - *

Localized product description used for similarity estimation.

- * @param description value to be set - */ - - public void setDescription(final LocalizedString description); - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- * @param price value to be set - */ - - public void setPrice(final Money price); - - /** - *

Total number of variants associated with the product.

- * @param variantCount value to be set - */ - - public void setVariantCount(final Long variantCount); - - /** - * factory method - * @return instance of SimilarProductMeta - */ - public static SimilarProductMeta of() { - return new SimilarProductMetaImpl(); - } - - /** - * factory method to create a shallow copy SimilarProductMeta - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProductMeta of(final SimilarProductMeta template) { - SimilarProductMetaImpl instance = new SimilarProductMetaImpl(); - instance.setName(template.getName()); - instance.setDescription(template.getDescription()); - instance.setPrice(template.getPrice()); - instance.setVariantCount(template.getVariantCount()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProductMeta - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProductMeta deepCopy(@Nullable final SimilarProductMeta template) { - if (template == null) { - return null; - } - SimilarProductMetaImpl instance = new SimilarProductMetaImpl(); - instance.setName(com.commercetools.ml.models.common.LocalizedString.deepCopy(template.getName())); - instance.setDescription(com.commercetools.ml.models.common.LocalizedString.deepCopy(template.getDescription())); - instance.setPrice(com.commercetools.ml.models.common.Money.deepCopy(template.getPrice())); - instance.setVariantCount(template.getVariantCount()); - return instance; - } - - /** - * builder factory method for SimilarProductMeta - * @return builder - */ - public static SimilarProductMetaBuilder builder() { - return SimilarProductMetaBuilder.of(); - } - - /** - * create builder for SimilarProductMeta instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductMetaBuilder builder(final SimilarProductMeta template) { - return SimilarProductMetaBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProductMeta(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaBuilder.java deleted file mode 100644 index 2290b552338..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaBuilder.java +++ /dev/null @@ -1,233 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductMetaBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductMeta similarProductMeta = SimilarProductMeta.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductMetaBuilder implements Builder { - - @Nullable - private com.commercetools.ml.models.common.LocalizedString name; - - @Nullable - private com.commercetools.ml.models.common.LocalizedString description; - - @Nullable - private com.commercetools.ml.models.common.Money price; - - @Nullable - private Long variantCount; - - /** - *

Localized product name used for similarity estimation.

- * @param builder function to build the name value - * @return Builder - */ - - public SimilarProductMetaBuilder name( - Function builder) { - this.name = builder.apply(com.commercetools.ml.models.common.LocalizedStringBuilder.of()).build(); - return this; - } - - /** - *

Localized product name used for similarity estimation.

- * @param builder function to build the name value - * @return Builder - */ - - public SimilarProductMetaBuilder withName( - Function builder) { - this.name = builder.apply(com.commercetools.ml.models.common.LocalizedStringBuilder.of()); - return this; - } - - /** - *

Localized product name used for similarity estimation.

- * @param name value to be set - * @return Builder - */ - - public SimilarProductMetaBuilder name(@Nullable final com.commercetools.ml.models.common.LocalizedString name) { - this.name = name; - return this; - } - - /** - *

Localized product description used for similarity estimation.

- * @param builder function to build the description value - * @return Builder - */ - - public SimilarProductMetaBuilder description( - Function builder) { - this.description = builder.apply(com.commercetools.ml.models.common.LocalizedStringBuilder.of()).build(); - return this; - } - - /** - *

Localized product description used for similarity estimation.

- * @param builder function to build the description value - * @return Builder - */ - - public SimilarProductMetaBuilder withDescription( - Function builder) { - this.description = builder.apply(com.commercetools.ml.models.common.LocalizedStringBuilder.of()); - return this; - } - - /** - *

Localized product description used for similarity estimation.

- * @param description value to be set - * @return Builder - */ - - public SimilarProductMetaBuilder description( - @Nullable final com.commercetools.ml.models.common.LocalizedString description) { - this.description = description; - return this; - } - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- * @param builder function to build the price value - * @return Builder - */ - - public SimilarProductMetaBuilder price( - Function builder) { - this.price = builder.apply(com.commercetools.ml.models.common.MoneyBuilder.of()).build(); - return this; - } - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- * @param builder function to build the price value - * @return Builder - */ - - public SimilarProductMetaBuilder withPrice( - Function builder) { - this.price = builder.apply(com.commercetools.ml.models.common.MoneyBuilder.of()); - return this; - } - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- * @param price value to be set - * @return Builder - */ - - public SimilarProductMetaBuilder price(@Nullable final com.commercetools.ml.models.common.Money price) { - this.price = price; - return this; - } - - /** - *

Total number of variants associated with the product.

- * @param variantCount value to be set - * @return Builder - */ - - public SimilarProductMetaBuilder variantCount(@Nullable final Long variantCount) { - this.variantCount = variantCount; - return this; - } - - /** - *

Localized product name used for similarity estimation.

- * @return name - */ - - @Nullable - public com.commercetools.ml.models.common.LocalizedString getName() { - return this.name; - } - - /** - *

Localized product description used for similarity estimation.

- * @return description - */ - - @Nullable - public com.commercetools.ml.models.common.LocalizedString getDescription() { - return this.description; - } - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- * @return price - */ - - @Nullable - public com.commercetools.ml.models.common.Money getPrice() { - return this.price; - } - - /** - *

Total number of variants associated with the product.

- * @return variantCount - */ - - @Nullable - public Long getVariantCount() { - return this.variantCount; - } - - /** - * builds SimilarProductMeta with checking for non-null required values - * @return SimilarProductMeta - */ - public SimilarProductMeta build() { - return new SimilarProductMetaImpl(name, description, price, variantCount); - } - - /** - * builds SimilarProductMeta without checking for non-null required values - * @return SimilarProductMeta - */ - public SimilarProductMeta buildUnchecked() { - return new SimilarProductMetaImpl(name, description, price, variantCount); - } - - /** - * factory method for an instance of SimilarProductMetaBuilder - * @return builder - */ - public static SimilarProductMetaBuilder of() { - return new SimilarProductMetaBuilder(); - } - - /** - * create builder for SimilarProductMeta instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductMetaBuilder of(final SimilarProductMeta template) { - SimilarProductMetaBuilder builder = new SimilarProductMetaBuilder(); - builder.name = template.getName(); - builder.description = template.getDescription(); - builder.price = template.getPrice(); - builder.variantCount = template.getVariantCount(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaImpl.java deleted file mode 100644 index 39fb6049b39..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaImpl.java +++ /dev/null @@ -1,140 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * SimilarProductMeta - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductMetaImpl implements SimilarProductMeta, ModelBase { - - private com.commercetools.ml.models.common.LocalizedString name; - - private com.commercetools.ml.models.common.LocalizedString description; - - private com.commercetools.ml.models.common.Money price; - - private Long variantCount; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductMetaImpl(@JsonProperty("name") final com.commercetools.ml.models.common.LocalizedString name, - @JsonProperty("description") final com.commercetools.ml.models.common.LocalizedString description, - @JsonProperty("price") final com.commercetools.ml.models.common.Money price, - @JsonProperty("variantCount") final Long variantCount) { - this.name = name; - this.description = description; - this.price = price; - this.variantCount = variantCount; - } - - /** - * create empty instance - */ - public SimilarProductMetaImpl() { - } - - /** - *

Localized product name used for similarity estimation.

- */ - - public com.commercetools.ml.models.common.LocalizedString getName() { - return this.name; - } - - /** - *

Localized product description used for similarity estimation.

- */ - - public com.commercetools.ml.models.common.LocalizedString getDescription() { - return this.description; - } - - /** - *

The product price in cents using the currency defined in SimilarProductSearchRequest If multiple prices exist, the median value is taken as a representative amount.

- */ - - public com.commercetools.ml.models.common.Money getPrice() { - return this.price; - } - - /** - *

Total number of variants associated with the product.

- */ - - public Long getVariantCount() { - return this.variantCount; - } - - public void setName(final com.commercetools.ml.models.common.LocalizedString name) { - this.name = name; - } - - public void setDescription(final com.commercetools.ml.models.common.LocalizedString description) { - this.description = description; - } - - public void setPrice(final com.commercetools.ml.models.common.Money price) { - this.price = price; - } - - public void setVariantCount(final Long variantCount) { - this.variantCount = variantCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductMetaImpl that = (SimilarProductMetaImpl) o; - - return new EqualsBuilder().append(name, that.name) - .append(description, that.description) - .append(price, that.price) - .append(variantCount, that.variantCount) - .append(name, that.name) - .append(description, that.description) - .append(price, that.price) - .append(variantCount, that.variantCount) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(name) - .append(description) - .append(price) - .append(variantCount) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) - .append("description", description) - .append("price", price) - .append("variantCount", variantCount) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPair.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPair.java deleted file mode 100644 index c27a4400099..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPair.java +++ /dev/null @@ -1,154 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

A pair of SimilarProducts

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductPair similarProductPair = SimilarProductPair.builder()
- *             .confidence(0.3)
- *             .plusProducts(productsBuilder -> productsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductPairImpl.class) -public interface SimilarProductPair { - - /** - *

The probability of product similarity.

- * @return confidence - */ - @NotNull - @JsonProperty("confidence") - public Double getConfidence(); - - /** - * - * @return products - */ - @NotNull - @Valid - @JsonProperty("products") - public List getProducts(); - - /** - *

The probability of product similarity.

- * @param confidence value to be set - */ - - public void setConfidence(final Double confidence); - - /** - * set products - * @param products values to be set - */ - - @JsonIgnore - public void setProducts(final SimilarProduct... products); - - /** - * set products - * @param products values to be set - */ - - public void setProducts(final List products); - - /** - * factory method - * @return instance of SimilarProductPair - */ - public static SimilarProductPair of() { - return new SimilarProductPairImpl(); - } - - /** - * factory method to create a shallow copy SimilarProductPair - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProductPair of(final SimilarProductPair template) { - SimilarProductPairImpl instance = new SimilarProductPairImpl(); - instance.setConfidence(template.getConfidence()); - instance.setProducts(template.getProducts()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProductPair - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProductPair deepCopy(@Nullable final SimilarProductPair template) { - if (template == null) { - return null; - } - SimilarProductPairImpl instance = new SimilarProductPairImpl(); - instance.setConfidence(template.getConfidence()); - instance.setProducts(Optional.ofNullable(template.getProducts()) - .map(t -> t.stream() - .map(com.commercetools.ml.models.similar_products.SimilarProduct::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - return instance; - } - - /** - * builder factory method for SimilarProductPair - * @return builder - */ - public static SimilarProductPairBuilder builder() { - return SimilarProductPairBuilder.of(); - } - - /** - * create builder for SimilarProductPair instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductPairBuilder builder(final SimilarProductPair template) { - return SimilarProductPairBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProductPair(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairBuilder.java deleted file mode 100644 index 8b62e451c0b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairBuilder.java +++ /dev/null @@ -1,188 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductPairBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductPair similarProductPair = SimilarProductPair.builder()
- *             .confidence(0.3)
- *             .plusProducts(productsBuilder -> productsBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductPairBuilder implements Builder { - - private Double confidence; - - private java.util.List products; - - /** - *

The probability of product similarity.

- * @param confidence value to be set - * @return Builder - */ - - public SimilarProductPairBuilder confidence(final Double confidence) { - this.confidence = confidence; - return this; - } - - /** - * set values to the products - * @param products value to be set - * @return Builder - */ - - public SimilarProductPairBuilder products( - final com.commercetools.ml.models.similar_products.SimilarProduct... products) { - this.products = new ArrayList<>(Arrays.asList(products)); - return this; - } - - /** - * set value to the products - * @param products value to be set - * @return Builder - */ - - public SimilarProductPairBuilder products( - final java.util.List products) { - this.products = products; - return this; - } - - /** - * add values to the products - * @param products value to be set - * @return Builder - */ - - public SimilarProductPairBuilder plusProducts( - final com.commercetools.ml.models.similar_products.SimilarProduct... products) { - if (this.products == null) { - this.products = new ArrayList<>(); - } - this.products.addAll(Arrays.asList(products)); - return this; - } - - /** - * add the value to the products using the builder function - * @param builder function to build the products value - * @return Builder - */ - - public SimilarProductPairBuilder plusProducts( - Function builder) { - if (this.products == null) { - this.products = new ArrayList<>(); - } - this.products - .add(builder.apply(com.commercetools.ml.models.similar_products.SimilarProductBuilder.of()).build()); - return this; - } - - /** - * set the value to the products using the builder function - * @param builder function to build the products value - * @return Builder - */ - - public SimilarProductPairBuilder withProducts( - Function builder) { - this.products = new ArrayList<>(); - this.products - .add(builder.apply(com.commercetools.ml.models.similar_products.SimilarProductBuilder.of()).build()); - return this; - } - - /** - * add the value to the products using the builder function - * @param builder function to build the products value - * @return Builder - */ - - public SimilarProductPairBuilder addProducts( - Function builder) { - return plusProducts(builder.apply(com.commercetools.ml.models.similar_products.SimilarProductBuilder.of())); - } - - /** - * set the value to the products using the builder function - * @param builder function to build the products value - * @return Builder - */ - - public SimilarProductPairBuilder setProducts( - Function builder) { - return products(builder.apply(com.commercetools.ml.models.similar_products.SimilarProductBuilder.of())); - } - - /** - *

The probability of product similarity.

- * @return confidence - */ - - public Double getConfidence() { - return this.confidence; - } - - /** - * value of products} - * @return products - */ - - public java.util.List getProducts() { - return this.products; - } - - /** - * builds SimilarProductPair with checking for non-null required values - * @return SimilarProductPair - */ - public SimilarProductPair build() { - Objects.requireNonNull(confidence, SimilarProductPair.class + ": confidence is missing"); - Objects.requireNonNull(products, SimilarProductPair.class + ": products is missing"); - return new SimilarProductPairImpl(confidence, products); - } - - /** - * builds SimilarProductPair without checking for non-null required values - * @return SimilarProductPair - */ - public SimilarProductPair buildUnchecked() { - return new SimilarProductPairImpl(confidence, products); - } - - /** - * factory method for an instance of SimilarProductPairBuilder - * @return builder - */ - public static SimilarProductPairBuilder of() { - return new SimilarProductPairBuilder(); - } - - /** - * create builder for SimilarProductPair instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductPairBuilder of(final SimilarProductPair template) { - SimilarProductPairBuilder builder = new SimilarProductPairBuilder(); - builder.confidence = template.getConfidence(); - builder.products = template.getProducts(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairImpl.java deleted file mode 100644 index bc87a618478..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairImpl.java +++ /dev/null @@ -1,103 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

A pair of SimilarProducts

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductPairImpl implements SimilarProductPair, ModelBase { - - private Double confidence; - - private java.util.List products; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductPairImpl(@JsonProperty("confidence") final Double confidence, - @JsonProperty("products") final java.util.List products) { - this.confidence = confidence; - this.products = products; - } - - /** - * create empty instance - */ - public SimilarProductPairImpl() { - } - - /** - *

The probability of product similarity.

- */ - - public Double getConfidence() { - return this.confidence; - } - - /** - * - */ - - public java.util.List getProducts() { - return this.products; - } - - public void setConfidence(final Double confidence) { - this.confidence = confidence; - } - - public void setProducts(final com.commercetools.ml.models.similar_products.SimilarProduct... products) { - this.products = new ArrayList<>(Arrays.asList(products)); - } - - public void setProducts( - final java.util.List products) { - this.products = products; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductPairImpl that = (SimilarProductPairImpl) o; - - return new EqualsBuilder().append(confidence, that.confidence) - .append(products, that.products) - .append(confidence, that.confidence) - .append(products, that.products) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(confidence).append(products).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("confidence", confidence) - .append("products", products) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequest.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequest.java deleted file mode 100644 index f65bd855734..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequest.java +++ /dev/null @@ -1,253 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductSearchRequest - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductSearchRequest similarProductSearchRequest = SimilarProductSearchRequest.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductSearchRequestImpl.class) -public interface SimilarProductSearchRequest { - - /** - *

Number of results requested.

- * @return limit - */ - - @JsonProperty("limit") - public Long getLimit(); - - /** - *

Number of elements skipped.

- * @return offset - */ - - @JsonProperty("offset") - public Long getOffset(); - - /** - *

language tag used to prioritize language for text comparisons.

- * @return language - */ - - @JsonProperty("language") - public String getLanguage(); - - /** - *

The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.

- * @return currencyCode - */ - - @JsonProperty("currencyCode") - public String getCurrencyCode(); - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- * @return similarityMeasures - */ - @Valid - @JsonProperty("similarityMeasures") - public SimilarityMeasures getSimilarityMeasures(); - - /** - *

Array of length 2 of ProductSetSelector

- * @return productSetSelectors - */ - @Valid - @JsonProperty("productSetSelectors") - public List getProductSetSelectors(); - - /** - * - * @return confidenceMin - */ - - @JsonProperty("confidenceMin") - public Double getConfidenceMin(); - - /** - * - * @return confidenceMax - */ - - @JsonProperty("confidenceMax") - public Double getConfidenceMax(); - - /** - *

Number of results requested.

- * @param limit value to be set - */ - - public void setLimit(final Long limit); - - /** - *

Number of elements skipped.

- * @param offset value to be set - */ - - public void setOffset(final Long offset); - - /** - *

language tag used to prioritize language for text comparisons.

- * @param language value to be set - */ - - public void setLanguage(final String language); - - /** - *

The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.

- * @param currencyCode value to be set - */ - - public void setCurrencyCode(final String currencyCode); - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- * @param similarityMeasures value to be set - */ - - public void setSimilarityMeasures(final SimilarityMeasures similarityMeasures); - - /** - *

Array of length 2 of ProductSetSelector

- * @param productSetSelectors values to be set - */ - - @JsonIgnore - public void setProductSetSelectors(final ProductSetSelector... productSetSelectors); - - /** - *

Array of length 2 of ProductSetSelector

- * @param productSetSelectors values to be set - */ - - public void setProductSetSelectors(final List productSetSelectors); - - /** - * set confidenceMin - * @param confidenceMin value to be set - */ - - public void setConfidenceMin(final Double confidenceMin); - - /** - * set confidenceMax - * @param confidenceMax value to be set - */ - - public void setConfidenceMax(final Double confidenceMax); - - /** - * factory method - * @return instance of SimilarProductSearchRequest - */ - public static SimilarProductSearchRequest of() { - return new SimilarProductSearchRequestImpl(); - } - - /** - * factory method to create a shallow copy SimilarProductSearchRequest - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProductSearchRequest of(final SimilarProductSearchRequest template) { - SimilarProductSearchRequestImpl instance = new SimilarProductSearchRequestImpl(); - instance.setLimit(template.getLimit()); - instance.setOffset(template.getOffset()); - instance.setLanguage(template.getLanguage()); - instance.setCurrencyCode(template.getCurrencyCode()); - instance.setSimilarityMeasures(template.getSimilarityMeasures()); - instance.setProductSetSelectors(template.getProductSetSelectors()); - instance.setConfidenceMin(template.getConfidenceMin()); - instance.setConfidenceMax(template.getConfidenceMax()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProductSearchRequest - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProductSearchRequest deepCopy(@Nullable final SimilarProductSearchRequest template) { - if (template == null) { - return null; - } - SimilarProductSearchRequestImpl instance = new SimilarProductSearchRequestImpl(); - instance.setLimit(template.getLimit()); - instance.setOffset(template.getOffset()); - instance.setLanguage(template.getLanguage()); - instance.setCurrencyCode(template.getCurrencyCode()); - instance.setSimilarityMeasures( - com.commercetools.ml.models.similar_products.SimilarityMeasures.deepCopy(template.getSimilarityMeasures())); - instance.setProductSetSelectors(Optional.ofNullable(template.getProductSetSelectors()) - .map(t -> t.stream() - .map(com.commercetools.ml.models.similar_products.ProductSetSelector::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - instance.setConfidenceMin(template.getConfidenceMin()); - instance.setConfidenceMax(template.getConfidenceMax()); - return instance; - } - - /** - * builder factory method for SimilarProductSearchRequest - * @return builder - */ - public static SimilarProductSearchRequestBuilder builder() { - return SimilarProductSearchRequestBuilder.of(); - } - - /** - * create builder for SimilarProductSearchRequest instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductSearchRequestBuilder builder(final SimilarProductSearchRequest template) { - return SimilarProductSearchRequestBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProductSearchRequest(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestBuilder.java deleted file mode 100644 index a3761817b37..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestBuilder.java +++ /dev/null @@ -1,372 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductSearchRequestBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductSearchRequest similarProductSearchRequest = SimilarProductSearchRequest.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductSearchRequestBuilder implements Builder { - - @Nullable - private Long limit; - - @Nullable - private Long offset; - - @Nullable - private String language; - - @Nullable - private String currencyCode; - - @Nullable - private com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures; - - @Nullable - private java.util.List productSetSelectors; - - @Nullable - private Double confidenceMin; - - @Nullable - private Double confidenceMax; - - /** - *

Number of results requested.

- * @param limit value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder limit(@Nullable final Long limit) { - this.limit = limit; - return this; - } - - /** - *

Number of elements skipped.

- * @param offset value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder offset(@Nullable final Long offset) { - this.offset = offset; - return this; - } - - /** - *

language tag used to prioritize language for text comparisons.

- * @param language value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder language(@Nullable final String language) { - this.language = language; - return this; - } - - /** - *

The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.

- * @param currencyCode value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder currencyCode(@Nullable final String currencyCode) { - this.currencyCode = currencyCode; - return this; - } - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- * @param builder function to build the similarityMeasures value - * @return Builder - */ - - public SimilarProductSearchRequestBuilder similarityMeasures( - Function builder) { - this.similarityMeasures = builder - .apply(com.commercetools.ml.models.similar_products.SimilarityMeasuresBuilder.of()) - .build(); - return this; - } - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- * @param builder function to build the similarityMeasures value - * @return Builder - */ - - public SimilarProductSearchRequestBuilder withSimilarityMeasures( - Function builder) { - this.similarityMeasures = builder - .apply(com.commercetools.ml.models.similar_products.SimilarityMeasuresBuilder.of()); - return this; - } - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- * @param similarityMeasures value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder similarityMeasures( - @Nullable final com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures) { - this.similarityMeasures = similarityMeasures; - return this; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param productSetSelectors value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder productSetSelectors( - @Nullable final com.commercetools.ml.models.similar_products.ProductSetSelector... productSetSelectors) { - this.productSetSelectors = new ArrayList<>(Arrays.asList(productSetSelectors)); - return this; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param productSetSelectors value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder productSetSelectors( - @Nullable final java.util.List productSetSelectors) { - this.productSetSelectors = productSetSelectors; - return this; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param productSetSelectors value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder plusProductSetSelectors( - @Nullable final com.commercetools.ml.models.similar_products.ProductSetSelector... productSetSelectors) { - if (this.productSetSelectors == null) { - this.productSetSelectors = new ArrayList<>(); - } - this.productSetSelectors.addAll(Arrays.asList(productSetSelectors)); - return this; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param builder function to build the productSetSelectors value - * @return Builder - */ - - public SimilarProductSearchRequestBuilder plusProductSetSelectors( - Function builder) { - if (this.productSetSelectors == null) { - this.productSetSelectors = new ArrayList<>(); - } - this.productSetSelectors.add( - builder.apply(com.commercetools.ml.models.similar_products.ProductSetSelectorBuilder.of()).build()); - return this; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param builder function to build the productSetSelectors value - * @return Builder - */ - - public SimilarProductSearchRequestBuilder withProductSetSelectors( - Function builder) { - this.productSetSelectors = new ArrayList<>(); - this.productSetSelectors.add( - builder.apply(com.commercetools.ml.models.similar_products.ProductSetSelectorBuilder.of()).build()); - return this; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param builder function to build the productSetSelectors value - * @return Builder - */ - - public SimilarProductSearchRequestBuilder addProductSetSelectors( - Function builder) { - return plusProductSetSelectors( - builder.apply(com.commercetools.ml.models.similar_products.ProductSetSelectorBuilder.of())); - } - - /** - *

Array of length 2 of ProductSetSelector

- * @param builder function to build the productSetSelectors value - * @return Builder - */ - - public SimilarProductSearchRequestBuilder setProductSetSelectors( - Function builder) { - return productSetSelectors( - builder.apply(com.commercetools.ml.models.similar_products.ProductSetSelectorBuilder.of())); - } - - /** - * set the value to the confidenceMin - * @param confidenceMin value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder confidenceMin(@Nullable final Double confidenceMin) { - this.confidenceMin = confidenceMin; - return this; - } - - /** - * set the value to the confidenceMax - * @param confidenceMax value to be set - * @return Builder - */ - - public SimilarProductSearchRequestBuilder confidenceMax(@Nullable final Double confidenceMax) { - this.confidenceMax = confidenceMax; - return this; - } - - /** - *

Number of results requested.

- * @return limit - */ - - @Nullable - public Long getLimit() { - return this.limit; - } - - /** - *

Number of elements skipped.

- * @return offset - */ - - @Nullable - public Long getOffset() { - return this.offset; - } - - /** - *

language tag used to prioritize language for text comparisons.

- * @return language - */ - - @Nullable - public String getLanguage() { - return this.language; - } - - /** - *

The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.

- * @return currencyCode - */ - - @Nullable - public String getCurrencyCode() { - return this.currencyCode; - } - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- * @return similarityMeasures - */ - - @Nullable - public com.commercetools.ml.models.similar_products.SimilarityMeasures getSimilarityMeasures() { - return this.similarityMeasures; - } - - /** - *

Array of length 2 of ProductSetSelector

- * @return productSetSelectors - */ - - @Nullable - public java.util.List getProductSetSelectors() { - return this.productSetSelectors; - } - - /** - * value of confidenceMin} - * @return confidenceMin - */ - - @Nullable - public Double getConfidenceMin() { - return this.confidenceMin; - } - - /** - * value of confidenceMax} - * @return confidenceMax - */ - - @Nullable - public Double getConfidenceMax() { - return this.confidenceMax; - } - - /** - * builds SimilarProductSearchRequest with checking for non-null required values - * @return SimilarProductSearchRequest - */ - public SimilarProductSearchRequest build() { - return new SimilarProductSearchRequestImpl(limit, offset, language, currencyCode, similarityMeasures, - productSetSelectors, confidenceMin, confidenceMax); - } - - /** - * builds SimilarProductSearchRequest without checking for non-null required values - * @return SimilarProductSearchRequest - */ - public SimilarProductSearchRequest buildUnchecked() { - return new SimilarProductSearchRequestImpl(limit, offset, language, currencyCode, similarityMeasures, - productSetSelectors, confidenceMin, confidenceMax); - } - - /** - * factory method for an instance of SimilarProductSearchRequestBuilder - * @return builder - */ - public static SimilarProductSearchRequestBuilder of() { - return new SimilarProductSearchRequestBuilder(); - } - - /** - * create builder for SimilarProductSearchRequest instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductSearchRequestBuilder of(final SimilarProductSearchRequest template) { - SimilarProductSearchRequestBuilder builder = new SimilarProductSearchRequestBuilder(); - builder.limit = template.getLimit(); - builder.offset = template.getOffset(); - builder.language = template.getLanguage(); - builder.currencyCode = template.getCurrencyCode(); - builder.similarityMeasures = template.getSimilarityMeasures(); - builder.productSetSelectors = template.getProductSetSelectors(); - builder.confidenceMin = template.getConfidenceMin(); - builder.confidenceMax = template.getConfidenceMax(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestImpl.java deleted file mode 100644 index 6053dc6b09d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestImpl.java +++ /dev/null @@ -1,225 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * SimilarProductSearchRequest - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductSearchRequestImpl implements SimilarProductSearchRequest, ModelBase { - - private Long limit; - - private Long offset; - - private String language; - - private String currencyCode; - - private com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures; - - private java.util.List productSetSelectors; - - private Double confidenceMin; - - private Double confidenceMax; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductSearchRequestImpl(@JsonProperty("limit") final Long limit, @JsonProperty("offset") final Long offset, - @JsonProperty("language") final String language, @JsonProperty("currencyCode") final String currencyCode, - @JsonProperty("similarityMeasures") final com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures, - @JsonProperty("productSetSelectors") final java.util.List productSetSelectors, - @JsonProperty("confidenceMin") final Double confidenceMin, - @JsonProperty("confidenceMax") final Double confidenceMax) { - this.limit = limit; - this.offset = offset; - this.language = language; - this.currencyCode = currencyCode; - this.similarityMeasures = similarityMeasures; - this.productSetSelectors = productSetSelectors; - this.confidenceMin = confidenceMin; - this.confidenceMax = confidenceMax; - } - - /** - * create empty instance - */ - public SimilarProductSearchRequestImpl() { - } - - /** - *

Number of results requested.

- */ - - public Long getLimit() { - return this.limit; - } - - /** - *

Number of elements skipped.

- */ - - public Long getOffset() { - return this.offset; - } - - /** - *

language tag used to prioritize language for text comparisons.

- */ - - public String getLanguage() { - return this.language; - } - - /** - *

The three-digit currency code to compare prices in. When a product has multiple prices, all prices for the product are converted to the currency provided by the currency attribute and the median price is calculated for comparison. Currencies are converted using the ECB currency exchange rates at the time the request is made. Of the currency codes, only currencies with currency exchange rates provided by the ECB are supported.

- */ - - public String getCurrencyCode() { - return this.currencyCode; - } - - /** - *

similarityMeasures defines the attributes taken into account to measure product similarity.

- */ - - public com.commercetools.ml.models.similar_products.SimilarityMeasures getSimilarityMeasures() { - return this.similarityMeasures; - } - - /** - *

Array of length 2 of ProductSetSelector

- */ - - public java.util.List getProductSetSelectors() { - return this.productSetSelectors; - } - - /** - * - */ - - public Double getConfidenceMin() { - return this.confidenceMin; - } - - /** - * - */ - - public Double getConfidenceMax() { - return this.confidenceMax; - } - - public void setLimit(final Long limit) { - this.limit = limit; - } - - public void setOffset(final Long offset) { - this.offset = offset; - } - - public void setLanguage(final String language) { - this.language = language; - } - - public void setCurrencyCode(final String currencyCode) { - this.currencyCode = currencyCode; - } - - public void setSimilarityMeasures( - final com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures) { - this.similarityMeasures = similarityMeasures; - } - - public void setProductSetSelectors( - final com.commercetools.ml.models.similar_products.ProductSetSelector... productSetSelectors) { - this.productSetSelectors = new ArrayList<>(Arrays.asList(productSetSelectors)); - } - - public void setProductSetSelectors( - final java.util.List productSetSelectors) { - this.productSetSelectors = productSetSelectors; - } - - public void setConfidenceMin(final Double confidenceMin) { - this.confidenceMin = confidenceMin; - } - - public void setConfidenceMax(final Double confidenceMax) { - this.confidenceMax = confidenceMax; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductSearchRequestImpl that = (SimilarProductSearchRequestImpl) o; - - return new EqualsBuilder().append(limit, that.limit) - .append(offset, that.offset) - .append(language, that.language) - .append(currencyCode, that.currencyCode) - .append(similarityMeasures, that.similarityMeasures) - .append(productSetSelectors, that.productSetSelectors) - .append(confidenceMin, that.confidenceMin) - .append(confidenceMax, that.confidenceMax) - .append(limit, that.limit) - .append(offset, that.offset) - .append(language, that.language) - .append(currencyCode, that.currencyCode) - .append(similarityMeasures, that.similarityMeasures) - .append(productSetSelectors, that.productSetSelectors) - .append(confidenceMin, that.confidenceMin) - .append(confidenceMax, that.confidenceMax) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(limit) - .append(offset) - .append(language) - .append(currencyCode) - .append(similarityMeasures) - .append(productSetSelectors) - .append(confidenceMin) - .append(confidenceMax) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("limit", limit) - .append("offset", offset) - .append("language", language) - .append("currencyCode", currencyCode) - .append("similarityMeasures", similarityMeasures) - .append("productSetSelectors", productSetSelectors) - .append("confidenceMin", confidenceMin) - .append("confidenceMax", confidenceMax) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMeta.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMeta.java deleted file mode 100644 index d392eda7341..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMeta.java +++ /dev/null @@ -1,124 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductSearchRequestMeta - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductSearchRequestMeta similarProductSearchRequestMeta = SimilarProductSearchRequestMeta.builder()
- *             .similarityMeasures(similarityMeasuresBuilder -> similarityMeasuresBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductSearchRequestMetaImpl.class) -public interface SimilarProductSearchRequestMeta { - - /** - *

The SimilarityMeasures used in this search.

- * @return similarityMeasures - */ - @NotNull - @Valid - @JsonProperty("similarityMeasures") - public SimilarityMeasures getSimilarityMeasures(); - - /** - *

The SimilarityMeasures used in this search.

- * @param similarityMeasures value to be set - */ - - public void setSimilarityMeasures(final SimilarityMeasures similarityMeasures); - - /** - * factory method - * @return instance of SimilarProductSearchRequestMeta - */ - public static SimilarProductSearchRequestMeta of() { - return new SimilarProductSearchRequestMetaImpl(); - } - - /** - * factory method to create a shallow copy SimilarProductSearchRequestMeta - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProductSearchRequestMeta of(final SimilarProductSearchRequestMeta template) { - SimilarProductSearchRequestMetaImpl instance = new SimilarProductSearchRequestMetaImpl(); - instance.setSimilarityMeasures(template.getSimilarityMeasures()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProductSearchRequestMeta - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProductSearchRequestMeta deepCopy(@Nullable final SimilarProductSearchRequestMeta template) { - if (template == null) { - return null; - } - SimilarProductSearchRequestMetaImpl instance = new SimilarProductSearchRequestMetaImpl(); - instance.setSimilarityMeasures( - com.commercetools.ml.models.similar_products.SimilarityMeasures.deepCopy(template.getSimilarityMeasures())); - return instance; - } - - /** - * builder factory method for SimilarProductSearchRequestMeta - * @return builder - */ - public static SimilarProductSearchRequestMetaBuilder builder() { - return SimilarProductSearchRequestMetaBuilder.of(); - } - - /** - * create builder for SimilarProductSearchRequestMeta instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductSearchRequestMetaBuilder builder(final SimilarProductSearchRequestMeta template) { - return SimilarProductSearchRequestMetaBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProductSearchRequestMeta(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaBuilder.java deleted file mode 100644 index f94e33f58e7..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaBuilder.java +++ /dev/null @@ -1,112 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductSearchRequestMetaBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductSearchRequestMeta similarProductSearchRequestMeta = SimilarProductSearchRequestMeta.builder()
- *             .similarityMeasures(similarityMeasuresBuilder -> similarityMeasuresBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductSearchRequestMetaBuilder implements Builder { - - private com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures; - - /** - *

The SimilarityMeasures used in this search.

- * @param builder function to build the similarityMeasures value - * @return Builder - */ - - public SimilarProductSearchRequestMetaBuilder similarityMeasures( - Function builder) { - this.similarityMeasures = builder - .apply(com.commercetools.ml.models.similar_products.SimilarityMeasuresBuilder.of()) - .build(); - return this; - } - - /** - *

The SimilarityMeasures used in this search.

- * @param builder function to build the similarityMeasures value - * @return Builder - */ - - public SimilarProductSearchRequestMetaBuilder withSimilarityMeasures( - Function builder) { - this.similarityMeasures = builder - .apply(com.commercetools.ml.models.similar_products.SimilarityMeasuresBuilder.of()); - return this; - } - - /** - *

The SimilarityMeasures used in this search.

- * @param similarityMeasures value to be set - * @return Builder - */ - - public SimilarProductSearchRequestMetaBuilder similarityMeasures( - final com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures) { - this.similarityMeasures = similarityMeasures; - return this; - } - - /** - *

The SimilarityMeasures used in this search.

- * @return similarityMeasures - */ - - public com.commercetools.ml.models.similar_products.SimilarityMeasures getSimilarityMeasures() { - return this.similarityMeasures; - } - - /** - * builds SimilarProductSearchRequestMeta with checking for non-null required values - * @return SimilarProductSearchRequestMeta - */ - public SimilarProductSearchRequestMeta build() { - Objects.requireNonNull(similarityMeasures, - SimilarProductSearchRequestMeta.class + ": similarityMeasures is missing"); - return new SimilarProductSearchRequestMetaImpl(similarityMeasures); - } - - /** - * builds SimilarProductSearchRequestMeta without checking for non-null required values - * @return SimilarProductSearchRequestMeta - */ - public SimilarProductSearchRequestMeta buildUnchecked() { - return new SimilarProductSearchRequestMetaImpl(similarityMeasures); - } - - /** - * factory method for an instance of SimilarProductSearchRequestMetaBuilder - * @return builder - */ - public static SimilarProductSearchRequestMetaBuilder of() { - return new SimilarProductSearchRequestMetaBuilder(); - } - - /** - * create builder for SimilarProductSearchRequestMeta instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductSearchRequestMetaBuilder of(final SimilarProductSearchRequestMeta template) { - SimilarProductSearchRequestMetaBuilder builder = new SimilarProductSearchRequestMetaBuilder(); - builder.similarityMeasures = template.getSimilarityMeasures(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaImpl.java deleted file mode 100644 index a3e820ef6ac..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaImpl.java +++ /dev/null @@ -1,82 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * SimilarProductSearchRequestMeta - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductSearchRequestMetaImpl implements SimilarProductSearchRequestMeta, ModelBase { - - private com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductSearchRequestMetaImpl( - @JsonProperty("similarityMeasures") final com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures) { - this.similarityMeasures = similarityMeasures; - } - - /** - * create empty instance - */ - public SimilarProductSearchRequestMetaImpl() { - } - - /** - *

The SimilarityMeasures used in this search.

- */ - - public com.commercetools.ml.models.similar_products.SimilarityMeasures getSimilarityMeasures() { - return this.similarityMeasures; - } - - public void setSimilarityMeasures( - final com.commercetools.ml.models.similar_products.SimilarityMeasures similarityMeasures) { - this.similarityMeasures = similarityMeasures; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductSearchRequestMetaImpl that = (SimilarProductSearchRequestMetaImpl) o; - - return new EqualsBuilder().append(similarityMeasures, that.similarityMeasures) - .append(similarityMeasures, that.similarityMeasures) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(similarityMeasures).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) - .append("similarityMeasures", similarityMeasures) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResult.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResult.java deleted file mode 100644 index 8b11314b7cc..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResult.java +++ /dev/null @@ -1,210 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductsPagedQueryResult - * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductsPagedQueryResult similarProductsPagedQueryResult = SimilarProductsPagedQueryResult.builder()
- *             .count(0.3)
- *             .total(0.3)
- *             .offset(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .meta(metaBuilder -> metaBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductsPagedQueryResultImpl.class) -public interface SimilarProductsPagedQueryResult { - - /** - * - * @return count - */ - @NotNull - @JsonProperty("count") - public Long getCount(); - - /** - * - * @return total - */ - @NotNull - @JsonProperty("total") - public Long getTotal(); - - /** - *

Number of elements skipped.

- * @return offset - */ - @NotNull - @JsonProperty("offset") - public Long getOffset(); - - /** - * - * @return results - */ - @NotNull - @Valid - @JsonProperty("results") - public List getResults(); - - /** - * - * @return meta - */ - @NotNull - @Valid - @JsonProperty("meta") - public SimilarProductSearchRequestMeta getMeta(); - - /** - * set count - * @param count value to be set - */ - - public void setCount(final Long count); - - /** - * set total - * @param total value to be set - */ - - public void setTotal(final Long total); - - /** - *

Number of elements skipped.

- * @param offset value to be set - */ - - public void setOffset(final Long offset); - - /** - * set results - * @param results values to be set - */ - - @JsonIgnore - public void setResults(final SimilarProductPair... results); - - /** - * set results - * @param results values to be set - */ - - public void setResults(final List results); - - /** - * set meta - * @param meta value to be set - */ - - public void setMeta(final SimilarProductSearchRequestMeta meta); - - /** - * factory method - * @return instance of SimilarProductsPagedQueryResult - */ - public static SimilarProductsPagedQueryResult of() { - return new SimilarProductsPagedQueryResultImpl(); - } - - /** - * factory method to create a shallow copy SimilarProductsPagedQueryResult - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProductsPagedQueryResult of(final SimilarProductsPagedQueryResult template) { - SimilarProductsPagedQueryResultImpl instance = new SimilarProductsPagedQueryResultImpl(); - instance.setCount(template.getCount()); - instance.setTotal(template.getTotal()); - instance.setOffset(template.getOffset()); - instance.setResults(template.getResults()); - instance.setMeta(template.getMeta()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProductsPagedQueryResult - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProductsPagedQueryResult deepCopy(@Nullable final SimilarProductsPagedQueryResult template) { - if (template == null) { - return null; - } - SimilarProductsPagedQueryResultImpl instance = new SimilarProductsPagedQueryResultImpl(); - instance.setCount(template.getCount()); - instance.setTotal(template.getTotal()); - instance.setOffset(template.getOffset()); - instance.setResults(Optional.ofNullable(template.getResults()) - .map(t -> t.stream() - .map(com.commercetools.ml.models.similar_products.SimilarProductPair::deepCopy) - .collect(Collectors.toList())) - .orElse(null)); - instance.setMeta( - com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta.deepCopy(template.getMeta())); - return instance; - } - - /** - * builder factory method for SimilarProductsPagedQueryResult - * @return builder - */ - public static SimilarProductsPagedQueryResultBuilder builder() { - return SimilarProductsPagedQueryResultBuilder.of(); - } - - /** - * create builder for SimilarProductsPagedQueryResult instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductsPagedQueryResultBuilder builder(final SimilarProductsPagedQueryResult template) { - return SimilarProductsPagedQueryResultBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProductsPagedQueryResult(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultBuilder.java deleted file mode 100644 index 30aef887a26..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultBuilder.java +++ /dev/null @@ -1,291 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductsPagedQueryResultBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductsPagedQueryResult similarProductsPagedQueryResult = SimilarProductsPagedQueryResult.builder()
- *             .count(0.3)
- *             .total(0.3)
- *             .offset(0.3)
- *             .plusResults(resultsBuilder -> resultsBuilder)
- *             .meta(metaBuilder -> metaBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductsPagedQueryResultBuilder implements Builder { - - private Long count; - - private Long total; - - private Long offset; - - private java.util.List results; - - private com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta meta; - - /** - * set the value to the count - * @param count value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder count(final Long count) { - this.count = count; - return this; - } - - /** - * set the value to the total - * @param total value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder total(final Long total) { - this.total = total; - return this; - } - - /** - *

Number of elements skipped.

- * @param offset value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder offset(final Long offset) { - this.offset = offset; - return this; - } - - /** - * set values to the results - * @param results value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder results( - final com.commercetools.ml.models.similar_products.SimilarProductPair... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - return this; - } - - /** - * set value to the results - * @param results value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder results( - final java.util.List results) { - this.results = results; - return this; - } - - /** - * add values to the results - * @param results value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder plusResults( - final com.commercetools.ml.models.similar_products.SimilarProductPair... results) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.addAll(Arrays.asList(results)); - return this; - } - - /** - * add the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder plusResults( - Function builder) { - if (this.results == null) { - this.results = new ArrayList<>(); - } - this.results.add( - builder.apply(com.commercetools.ml.models.similar_products.SimilarProductPairBuilder.of()).build()); - return this; - } - - /** - * set the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder withResults( - Function builder) { - this.results = new ArrayList<>(); - this.results.add( - builder.apply(com.commercetools.ml.models.similar_products.SimilarProductPairBuilder.of()).build()); - return this; - } - - /** - * add the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder addResults( - Function builder) { - return plusResults(builder.apply(com.commercetools.ml.models.similar_products.SimilarProductPairBuilder.of())); - } - - /** - * set the value to the results using the builder function - * @param builder function to build the results value - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder setResults( - Function builder) { - return results(builder.apply(com.commercetools.ml.models.similar_products.SimilarProductPairBuilder.of())); - } - - /** - * set the value to the meta using the builder function - * @param builder function to build the meta value - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder meta( - Function builder) { - this.meta = builder - .apply(com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMetaBuilder.of()) - .build(); - return this; - } - - /** - * set the value to the meta using the builder function - * @param builder function to build the meta value - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder withMeta( - Function builder) { - this.meta = builder - .apply(com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMetaBuilder.of()); - return this; - } - - /** - * set the value to the meta - * @param meta value to be set - * @return Builder - */ - - public SimilarProductsPagedQueryResultBuilder meta( - final com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta meta) { - this.meta = meta; - return this; - } - - /** - * value of count} - * @return count - */ - - public Long getCount() { - return this.count; - } - - /** - * value of total} - * @return total - */ - - public Long getTotal() { - return this.total; - } - - /** - *

Number of elements skipped.

- * @return offset - */ - - public Long getOffset() { - return this.offset; - } - - /** - * value of results} - * @return results - */ - - public java.util.List getResults() { - return this.results; - } - - /** - * value of meta} - * @return meta - */ - - public com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta getMeta() { - return this.meta; - } - - /** - * builds SimilarProductsPagedQueryResult with checking for non-null required values - * @return SimilarProductsPagedQueryResult - */ - public SimilarProductsPagedQueryResult build() { - Objects.requireNonNull(count, SimilarProductsPagedQueryResult.class + ": count is missing"); - Objects.requireNonNull(total, SimilarProductsPagedQueryResult.class + ": total is missing"); - Objects.requireNonNull(offset, SimilarProductsPagedQueryResult.class + ": offset is missing"); - Objects.requireNonNull(results, SimilarProductsPagedQueryResult.class + ": results is missing"); - Objects.requireNonNull(meta, SimilarProductsPagedQueryResult.class + ": meta is missing"); - return new SimilarProductsPagedQueryResultImpl(count, total, offset, results, meta); - } - - /** - * builds SimilarProductsPagedQueryResult without checking for non-null required values - * @return SimilarProductsPagedQueryResult - */ - public SimilarProductsPagedQueryResult buildUnchecked() { - return new SimilarProductsPagedQueryResultImpl(count, total, offset, results, meta); - } - - /** - * factory method for an instance of SimilarProductsPagedQueryResultBuilder - * @return builder - */ - public static SimilarProductsPagedQueryResultBuilder of() { - return new SimilarProductsPagedQueryResultBuilder(); - } - - /** - * create builder for SimilarProductsPagedQueryResult instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductsPagedQueryResultBuilder of(final SimilarProductsPagedQueryResult template) { - SimilarProductsPagedQueryResultBuilder builder = new SimilarProductsPagedQueryResultBuilder(); - builder.count = template.getCount(); - builder.total = template.getTotal(); - builder.offset = template.getOffset(); - builder.results = template.getResults(); - builder.meta = template.getMeta(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultImpl.java deleted file mode 100644 index 11b55aabddf..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultImpl.java +++ /dev/null @@ -1,164 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * SimilarProductsPagedQueryResult - */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductsPagedQueryResultImpl implements SimilarProductsPagedQueryResult, ModelBase { - - private Long count; - - private Long total; - - private Long offset; - - private java.util.List results; - - private com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta meta; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductsPagedQueryResultImpl(@JsonProperty("count") final Long count, - @JsonProperty("total") final Long total, @JsonProperty("offset") final Long offset, - @JsonProperty("results") final java.util.List results, - @JsonProperty("meta") final com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta meta) { - this.count = count; - this.total = total; - this.offset = offset; - this.results = results; - this.meta = meta; - } - - /** - * create empty instance - */ - public SimilarProductsPagedQueryResultImpl() { - } - - /** - * - */ - - public Long getCount() { - return this.count; - } - - /** - * - */ - - public Long getTotal() { - return this.total; - } - - /** - *

Number of elements skipped.

- */ - - public Long getOffset() { - return this.offset; - } - - /** - * - */ - - public java.util.List getResults() { - return this.results; - } - - /** - * - */ - - public com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta getMeta() { - return this.meta; - } - - public void setCount(final Long count) { - this.count = count; - } - - public void setTotal(final Long total) { - this.total = total; - } - - public void setOffset(final Long offset) { - this.offset = offset; - } - - public void setResults(final com.commercetools.ml.models.similar_products.SimilarProductPair... results) { - this.results = new ArrayList<>(Arrays.asList(results)); - } - - public void setResults( - final java.util.List results) { - this.results = results; - } - - public void setMeta(final com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMeta meta) { - this.meta = meta; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductsPagedQueryResultImpl that = (SimilarProductsPagedQueryResultImpl) o; - - return new EqualsBuilder().append(count, that.count) - .append(total, that.total) - .append(offset, that.offset) - .append(results, that.results) - .append(meta, that.meta) - .append(count, that.count) - .append(total, that.total) - .append(offset, that.offset) - .append(results, that.results) - .append(meta, that.meta) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(count) - .append(total) - .append(offset) - .append(results) - .append(meta) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("count", count) - .append("total", total) - .append("offset", offset) - .append("results", results) - .append("meta", meta) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatus.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatus.java deleted file mode 100644 index 47deb723c34..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatus.java +++ /dev/null @@ -1,161 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.time.ZonedDateTime; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; - -import com.commercetools.ml.models.common.TaskStatusEnum; -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

Represents a URL path to poll to get the results of an Asynchronous Request.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductsTaskStatus similarProductsTaskStatus = SimilarProductsTaskStatus.builder()
- *             .state(TaskStatusEnum.PENDING)
- *             .result(resultBuilder -> resultBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarProductsTaskStatusImpl.class) -public interface SimilarProductsTaskStatus { - - /** - * - * @return state - */ - @NotNull - @JsonProperty("state") - public TaskStatusEnum getState(); - - /** - *

The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.

- * @return expires - */ - - @JsonProperty("expires") - public ZonedDateTime getExpires(); - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- * @return result - */ - @NotNull - @Valid - @JsonProperty("result") - public SimilarProductsPagedQueryResult getResult(); - - /** - * set state - * @param state value to be set - */ - - public void setState(final TaskStatusEnum state); - - /** - *

The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.

- * @param expires value to be set - */ - - public void setExpires(final ZonedDateTime expires); - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- * @param result value to be set - */ - - public void setResult(final SimilarProductsPagedQueryResult result); - - /** - * factory method - * @return instance of SimilarProductsTaskStatus - */ - public static SimilarProductsTaskStatus of() { - return new SimilarProductsTaskStatusImpl(); - } - - /** - * factory method to create a shallow copy SimilarProductsTaskStatus - * @param template instance to be copied - * @return copy instance - */ - public static SimilarProductsTaskStatus of(final SimilarProductsTaskStatus template) { - SimilarProductsTaskStatusImpl instance = new SimilarProductsTaskStatusImpl(); - instance.setState(template.getState()); - instance.setExpires(template.getExpires()); - instance.setResult(template.getResult()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarProductsTaskStatus - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarProductsTaskStatus deepCopy(@Nullable final SimilarProductsTaskStatus template) { - if (template == null) { - return null; - } - SimilarProductsTaskStatusImpl instance = new SimilarProductsTaskStatusImpl(); - instance.setState(template.getState()); - instance.setExpires(template.getExpires()); - instance.setResult(com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult - .deepCopy(template.getResult())); - return instance; - } - - /** - * builder factory method for SimilarProductsTaskStatus - * @return builder - */ - public static SimilarProductsTaskStatusBuilder builder() { - return SimilarProductsTaskStatusBuilder.of(); - } - - /** - * create builder for SimilarProductsTaskStatus instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductsTaskStatusBuilder builder(final SimilarProductsTaskStatus template) { - return SimilarProductsTaskStatusBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarProductsTaskStatus(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusBuilder.java deleted file mode 100644 index 83dd5c8239f..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusBuilder.java +++ /dev/null @@ -1,163 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarProductsTaskStatusBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarProductsTaskStatus similarProductsTaskStatus = SimilarProductsTaskStatus.builder()
- *             .state(TaskStatusEnum.PENDING)
- *             .result(resultBuilder -> resultBuilder)
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductsTaskStatusBuilder implements Builder { - - private com.commercetools.ml.models.common.TaskStatusEnum state; - - @Nullable - private java.time.ZonedDateTime expires; - - private com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult result; - - /** - * set the value to the state - * @param state value to be set - * @return Builder - */ - - public SimilarProductsTaskStatusBuilder state(final com.commercetools.ml.models.common.TaskStatusEnum state) { - this.state = state; - return this; - } - - /** - *

The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.

- * @param expires value to be set - * @return Builder - */ - - public SimilarProductsTaskStatusBuilder expires(@Nullable final java.time.ZonedDateTime expires) { - this.expires = expires; - return this; - } - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- * @param builder function to build the result value - * @return Builder - */ - - public SimilarProductsTaskStatusBuilder result( - Function builder) { - this.result = builder - .apply(com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResultBuilder.of()) - .build(); - return this; - } - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- * @param builder function to build the result value - * @return Builder - */ - - public SimilarProductsTaskStatusBuilder withResult( - Function builder) { - this.result = builder - .apply(com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResultBuilder.of()); - return this; - } - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- * @param result value to be set - * @return Builder - */ - - public SimilarProductsTaskStatusBuilder result( - final com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult result) { - this.result = result; - return this; - } - - /** - * value of state} - * @return state - */ - - public com.commercetools.ml.models.common.TaskStatusEnum getState() { - return this.state; - } - - /** - *

The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.

- * @return expires - */ - - @Nullable - public java.time.ZonedDateTime getExpires() { - return this.expires; - } - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- * @return result - */ - - public com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult getResult() { - return this.result; - } - - /** - * builds SimilarProductsTaskStatus with checking for non-null required values - * @return SimilarProductsTaskStatus - */ - public SimilarProductsTaskStatus build() { - Objects.requireNonNull(state, SimilarProductsTaskStatus.class + ": state is missing"); - Objects.requireNonNull(result, SimilarProductsTaskStatus.class + ": result is missing"); - return new SimilarProductsTaskStatusImpl(state, expires, result); - } - - /** - * builds SimilarProductsTaskStatus without checking for non-null required values - * @return SimilarProductsTaskStatus - */ - public SimilarProductsTaskStatus buildUnchecked() { - return new SimilarProductsTaskStatusImpl(state, expires, result); - } - - /** - * factory method for an instance of SimilarProductsTaskStatusBuilder - * @return builder - */ - public static SimilarProductsTaskStatusBuilder of() { - return new SimilarProductsTaskStatusBuilder(); - } - - /** - * create builder for SimilarProductsTaskStatus instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarProductsTaskStatusBuilder of(final SimilarProductsTaskStatus template) { - SimilarProductsTaskStatusBuilder builder = new SimilarProductsTaskStatusBuilder(); - builder.state = template.getState(); - builder.expires = template.getExpires(); - builder.result = template.getResult(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusImpl.java deleted file mode 100644 index e9bcbcc9f66..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusImpl.java +++ /dev/null @@ -1,117 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

Represents a URL path to poll to get the results of an Asynchronous Request.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarProductsTaskStatusImpl implements SimilarProductsTaskStatus, ModelBase { - - private com.commercetools.ml.models.common.TaskStatusEnum state; - - private java.time.ZonedDateTime expires; - - private com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult result; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarProductsTaskStatusImpl(@JsonProperty("state") final com.commercetools.ml.models.common.TaskStatusEnum state, - @JsonProperty("expires") final java.time.ZonedDateTime expires, - @JsonProperty("result") final com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult result) { - this.state = state; - this.expires = expires; - this.result = result; - } - - /** - * create empty instance - */ - public SimilarProductsTaskStatusImpl() { - } - - /** - * - */ - - public com.commercetools.ml.models.common.TaskStatusEnum getState() { - return this.state; - } - - /** - *

The expiry date of the result. You cannot access the result after the expiry date. Default: 1 day after the result first becomes available. This is only available when the TaskStatus state is SUCCESS.

- */ - - public java.time.ZonedDateTime getExpires() { - return this.expires; - } - - /** - *

The response to an asynchronous request. The type depends on the request initiated. Only populated when the status is SUCCESS.

- */ - - public com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult getResult() { - return this.result; - } - - public void setState(final com.commercetools.ml.models.common.TaskStatusEnum state) { - this.state = state; - } - - public void setExpires(final java.time.ZonedDateTime expires) { - this.expires = expires; - } - - public void setResult(final com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResult result) { - this.result = result; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarProductsTaskStatusImpl that = (SimilarProductsTaskStatusImpl) o; - - return new EqualsBuilder().append(state, that.state) - .append(expires, that.expires) - .append(result, that.result) - .append(state, that.state) - .append(expires, that.expires) - .append(result, that.result) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(state).append(expires).append(result).toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("state", state) - .append("expires", expires) - .append("result", result) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasures.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasures.java deleted file mode 100644 index c47408e1b4f..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasures.java +++ /dev/null @@ -1,187 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; -import java.util.function.Function; - -import javax.annotation.Nullable; - -import com.fasterxml.jackson.annotation.*; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.utils.Generated; - -/** - *

Specify which ProductData attributes to use for estimating similarity and how to weigh them. An attribute's weight can be any whole positive integer, starting with 0. The larger the integer, the higher its weight.

- * - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarityMeasures similarityMeasures = SimilarityMeasures.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@JsonDeserialize(as = SimilarityMeasuresImpl.class) -public interface SimilarityMeasures { - - /** - *

Importance of the name attribute in overall similarity.

- * @return name - */ - - @JsonProperty("name") - public Long getName(); - - /** - *

Importance of the description attribute in overall similarity.

- * @return description - */ - - @JsonProperty("description") - public Long getDescription(); - - /** - *

Importance of the description attribute in overall similarity.

- * @return attribute - */ - - @JsonProperty("attribute") - public Long getAttribute(); - - /** - *

Importance of the number of product variants in overall similarity.

- * @return variantCount - */ - - @JsonProperty("variantCount") - public Long getVariantCount(); - - /** - *

Importance of the price attribute in overall similarity.

- * @return price - */ - - @JsonProperty("price") - public Long getPrice(); - - /** - *

Importance of the name attribute in overall similarity.

- * @param name value to be set - */ - - public void setName(final Long name); - - /** - *

Importance of the description attribute in overall similarity.

- * @param description value to be set - */ - - public void setDescription(final Long description); - - /** - *

Importance of the description attribute in overall similarity.

- * @param attribute value to be set - */ - - public void setAttribute(final Long attribute); - - /** - *

Importance of the number of product variants in overall similarity.

- * @param variantCount value to be set - */ - - public void setVariantCount(final Long variantCount); - - /** - *

Importance of the price attribute in overall similarity.

- * @param price value to be set - */ - - public void setPrice(final Long price); - - /** - * factory method - * @return instance of SimilarityMeasures - */ - public static SimilarityMeasures of() { - return new SimilarityMeasuresImpl(); - } - - /** - * factory method to create a shallow copy SimilarityMeasures - * @param template instance to be copied - * @return copy instance - */ - public static SimilarityMeasures of(final SimilarityMeasures template) { - SimilarityMeasuresImpl instance = new SimilarityMeasuresImpl(); - instance.setName(template.getName()); - instance.setDescription(template.getDescription()); - instance.setAttribute(template.getAttribute()); - instance.setVariantCount(template.getVariantCount()); - instance.setPrice(template.getPrice()); - return instance; - } - - /** - * factory method to create a deep copy of SimilarityMeasures - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static SimilarityMeasures deepCopy(@Nullable final SimilarityMeasures template) { - if (template == null) { - return null; - } - SimilarityMeasuresImpl instance = new SimilarityMeasuresImpl(); - instance.setName(template.getName()); - instance.setDescription(template.getDescription()); - instance.setAttribute(template.getAttribute()); - instance.setVariantCount(template.getVariantCount()); - instance.setPrice(template.getPrice()); - return instance; - } - - /** - * builder factory method for SimilarityMeasures - * @return builder - */ - public static SimilarityMeasuresBuilder builder() { - return SimilarityMeasuresBuilder.of(); - } - - /** - * create builder for SimilarityMeasures instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarityMeasuresBuilder builder(final SimilarityMeasures template) { - return SimilarityMeasuresBuilder.of(template); - } - - /** - * accessor map function - * @param mapped type - * @param helper function to map the object - * @return mapped value - */ - default T withSimilarityMeasures(Function helper) { - return helper.apply(this); - } - - /** - * gives a TypeReference for usage with Jackson DataBind - * @return TypeReference - */ - public static com.fasterxml.jackson.core.type.TypeReference typeReference() { - return new com.fasterxml.jackson.core.type.TypeReference() { - @Override - public String toString() { - return "TypeReference"; - } - }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresBuilder.java deleted file mode 100644 index 76e0d1477dd..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresBuilder.java +++ /dev/null @@ -1,184 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.*; - -import javax.annotation.Nullable; - -import io.vrap.rmf.base.client.Builder; -import io.vrap.rmf.base.client.utils.Generated; - -/** - * SimilarityMeasuresBuilder - *
- * Example to create an instance using the builder pattern - *
- *

- *     SimilarityMeasures similarityMeasures = SimilarityMeasures.builder()
- *             .build()
- * 
- *
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarityMeasuresBuilder implements Builder { - - @Nullable - private Long name; - - @Nullable - private Long description; - - @Nullable - private Long attribute; - - @Nullable - private Long variantCount; - - @Nullable - private Long price; - - /** - *

Importance of the name attribute in overall similarity.

- * @param name value to be set - * @return Builder - */ - - public SimilarityMeasuresBuilder name(@Nullable final Long name) { - this.name = name; - return this; - } - - /** - *

Importance of the description attribute in overall similarity.

- * @param description value to be set - * @return Builder - */ - - public SimilarityMeasuresBuilder description(@Nullable final Long description) { - this.description = description; - return this; - } - - /** - *

Importance of the description attribute in overall similarity.

- * @param attribute value to be set - * @return Builder - */ - - public SimilarityMeasuresBuilder attribute(@Nullable final Long attribute) { - this.attribute = attribute; - return this; - } - - /** - *

Importance of the number of product variants in overall similarity.

- * @param variantCount value to be set - * @return Builder - */ - - public SimilarityMeasuresBuilder variantCount(@Nullable final Long variantCount) { - this.variantCount = variantCount; - return this; - } - - /** - *

Importance of the price attribute in overall similarity.

- * @param price value to be set - * @return Builder - */ - - public SimilarityMeasuresBuilder price(@Nullable final Long price) { - this.price = price; - return this; - } - - /** - *

Importance of the name attribute in overall similarity.

- * @return name - */ - - @Nullable - public Long getName() { - return this.name; - } - - /** - *

Importance of the description attribute in overall similarity.

- * @return description - */ - - @Nullable - public Long getDescription() { - return this.description; - } - - /** - *

Importance of the description attribute in overall similarity.

- * @return attribute - */ - - @Nullable - public Long getAttribute() { - return this.attribute; - } - - /** - *

Importance of the number of product variants in overall similarity.

- * @return variantCount - */ - - @Nullable - public Long getVariantCount() { - return this.variantCount; - } - - /** - *

Importance of the price attribute in overall similarity.

- * @return price - */ - - @Nullable - public Long getPrice() { - return this.price; - } - - /** - * builds SimilarityMeasures with checking for non-null required values - * @return SimilarityMeasures - */ - public SimilarityMeasures build() { - return new SimilarityMeasuresImpl(name, description, attribute, variantCount, price); - } - - /** - * builds SimilarityMeasures without checking for non-null required values - * @return SimilarityMeasures - */ - public SimilarityMeasures buildUnchecked() { - return new SimilarityMeasuresImpl(name, description, attribute, variantCount, price); - } - - /** - * factory method for an instance of SimilarityMeasuresBuilder - * @return builder - */ - public static SimilarityMeasuresBuilder of() { - return new SimilarityMeasuresBuilder(); - } - - /** - * create builder for SimilarityMeasures instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static SimilarityMeasuresBuilder of(final SimilarityMeasures template) { - SimilarityMeasuresBuilder builder = new SimilarityMeasuresBuilder(); - builder.name = template.getName(); - builder.description = template.getDescription(); - builder.attribute = template.getAttribute(); - builder.variantCount = template.getVariantCount(); - builder.price = template.getPrice(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresImpl.java b/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresImpl.java deleted file mode 100644 index 6c7f3babbf7..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresImpl.java +++ /dev/null @@ -1,158 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.*; -import java.util.*; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.*; - -import io.vrap.rmf.base.client.ModelBase; -import io.vrap.rmf.base.client.utils.Generated; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - *

Specify which ProductData attributes to use for estimating similarity and how to weigh them. An attribute's weight can be any whole positive integer, starting with 0. The larger the integer, the higher its weight.

- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class SimilarityMeasuresImpl implements SimilarityMeasures, ModelBase { - - private Long name; - - private Long description; - - private Long attribute; - - private Long variantCount; - - private Long price; - - /** - * create instance with all properties - */ - @JsonCreator - SimilarityMeasuresImpl(@JsonProperty("name") final Long name, @JsonProperty("description") final Long description, - @JsonProperty("attribute") final Long attribute, @JsonProperty("variantCount") final Long variantCount, - @JsonProperty("price") final Long price) { - this.name = name; - this.description = description; - this.attribute = attribute; - this.variantCount = variantCount; - this.price = price; - } - - /** - * create empty instance - */ - public SimilarityMeasuresImpl() { - } - - /** - *

Importance of the name attribute in overall similarity.

- */ - - public Long getName() { - return this.name; - } - - /** - *

Importance of the description attribute in overall similarity.

- */ - - public Long getDescription() { - return this.description; - } - - /** - *

Importance of the description attribute in overall similarity.

- */ - - public Long getAttribute() { - return this.attribute; - } - - /** - *

Importance of the number of product variants in overall similarity.

- */ - - public Long getVariantCount() { - return this.variantCount; - } - - /** - *

Importance of the price attribute in overall similarity.

- */ - - public Long getPrice() { - return this.price; - } - - public void setName(final Long name) { - this.name = name; - } - - public void setDescription(final Long description) { - this.description = description; - } - - public void setAttribute(final Long attribute) { - this.attribute = attribute; - } - - public void setVariantCount(final Long variantCount) { - this.variantCount = variantCount; - } - - public void setPrice(final Long price) { - this.price = price; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - SimilarityMeasuresImpl that = (SimilarityMeasuresImpl) o; - - return new EqualsBuilder().append(name, that.name) - .append(description, that.description) - .append(attribute, that.attribute) - .append(variantCount, that.variantCount) - .append(price, that.price) - .append(name, that.name) - .append(description, that.description) - .append(attribute, that.attribute) - .append(variantCount, that.variantCount) - .append(price, that.price) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(name) - .append(description) - .append(attribute) - .append(variantCount) - .append(price) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) - .append("description", description) - .append("attribute", attribute) - .append("variantCount", variantCount) - .append("price", price) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/MLCorrelationIdProvider.java b/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/MLCorrelationIdProvider.java deleted file mode 100644 index ab35feccdd8..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/MLCorrelationIdProvider.java +++ /dev/null @@ -1,19 +0,0 @@ - -package com.commercetools.ml.client; - -import java.util.UUID; - -import io.vrap.rmf.base.client.http.CorrelationIdProvider; - -public class MLCorrelationIdProvider implements CorrelationIdProvider { - private final String projectKey; - - public MLCorrelationIdProvider(String projectKey) { - this.projectKey = projectKey; - } - - @Override - public String getCorrelationId() { - return projectKey + "/" + UUID.randomUUID(); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/ProjectApiRoot.java b/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/ProjectApiRoot.java deleted file mode 100644 index 1f068f928cb..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/ProjectApiRoot.java +++ /dev/null @@ -1,61 +0,0 @@ - -package com.commercetools.ml.client; - -import java.io.Closeable; - -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.SerializerOnlyApiHttpClient; - -public class ProjectApiRoot implements Closeable, ProjectScopedApiRoot { - private final String projectKey; - private final ApiHttpClient apiHttpClient; - - private ProjectApiRoot(final String projectKey, final ApiHttpClient apiHttpClient) { - this.projectKey = projectKey; - this.apiHttpClient = apiHttpClient; - } - - public static ProjectApiRoot of(final String projectKey) { - return new ProjectApiRoot(projectKey, SerializerOnlyApiHttpClient.of()); - } - - public static ProjectApiRoot fromClient(final String projectKey, final ApiHttpClient apiHttpClient) { - return new ProjectApiRoot(projectKey, apiHttpClient); - } - - @Override - public ByProjectKeyRequestBuilder with() { - return ApiRoot.fromClient(apiHttpClient).withProjectKey(projectKey); - } - - public ByProjectKeyRequestBuilder withProjectKey(final String projectKey) { - return ApiRoot.fromClient(apiHttpClient).withProjectKey(projectKey); - } - - @Override - public ByProjectKeyImageSearchRequestBuilder imageSearch() { - return with().imageSearch(); - } - - @Override - public ByProjectKeyRecommendationsRequestBuilder recommendations() { - return with().recommendations(); - } - - @Override - public ByProjectKeySimilaritiesRequestBuilder similarities() { - return with().similarities(); - } - - @Override - public void close() { - if (apiHttpClient == null) { - return; - } - try { - apiHttpClient.close(); - } - catch (final Throwable ignored) { - } - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/ProjectScopedApiRoot.java b/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/ProjectScopedApiRoot.java deleted file mode 100644 index b23d0db385e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/client/ProjectScopedApiRoot.java +++ /dev/null @@ -1,12 +0,0 @@ - -package com.commercetools.ml.client; - -public interface ProjectScopedApiRoot { - ByProjectKeyRequestBuilder with(); - - ByProjectKeyImageSearchRequestBuilder imageSearch(); - - ByProjectKeyRecommendationsRequestBuilder recommendations(); - - ByProjectKeySimilaritiesRequestBuilder similarities(); -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/defaultconfig/MLApiRootBuilder.java b/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/defaultconfig/MLApiRootBuilder.java deleted file mode 100644 index a0d88e8c840..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/defaultconfig/MLApiRootBuilder.java +++ /dev/null @@ -1,481 +0,0 @@ - -package com.commercetools.ml.defaultconfig; - -import java.net.URI; -import java.time.Duration; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.ScheduledExecutorService; -import java.util.function.Function; -import java.util.function.Supplier; -import java.util.function.UnaryOperator; - -import javax.annotation.Nullable; - -import com.commercetools.ml.client.ApiRoot; -import com.commercetools.ml.client.ByProjectKeyRequestBuilder; -import com.commercetools.ml.client.MLCorrelationIdProvider; -import com.commercetools.ml.client.ProjectApiRoot; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.error.HttpExceptionFactory; -import io.vrap.rmf.base.client.http.*; -import io.vrap.rmf.base.client.oauth2.ClientCredentials; -import io.vrap.rmf.base.client.oauth2.TokenSupplier; - -import org.slf4j.event.Level; - -import dev.failsafe.spi.Scheduler; - -public class MLApiRootBuilder { - private final ClientBuilder builder; - - private MLApiRootBuilder(ClientBuilder builder) { - this.builder = builder; - } - - public static MLApiRootBuilder of() { - return new MLApiRootBuilder(ClientBuilder.of()); - } - - public static MLApiRootBuilder of(final VrapHttpClient httpClient) { - return new MLApiRootBuilder(ClientBuilder.of(httpClient)); - } - - public static MLApiRootBuilder of(final HandlerStack stack) { - return new MLApiRootBuilder(ClientBuilder.of(stack)); - } - - public MLApiRootBuilder withAuthCircuitBreaker() { - builder.withAuthCircuitBreaker(); - return this; - } - - public MLApiRootBuilder withoutAuthCircuitBreaker() { - builder.withoutAuthCircuitBreaker(); - return this; - } - - public MLApiRootBuilder withAuthRetries(final int authRetries) { - builder.withAuthRetries(authRetries); - return this; - } - - public MLApiRootBuilder withHandlerStack(final HandlerStack stack) { - builder.withHandlerStack(stack); - return this; - } - - public MLApiRootBuilder withHttpClient(final VrapHttpClient httpClient) { - builder.withHttpClient(httpClient); - return this; - } - - public MLApiRootBuilder withSerializer(final ResponseSerializer serializer) { - builder.withSerializer(serializer); - return this; - } - - public MLApiRootBuilder withSerializer(final Supplier serializer) { - builder.withSerializer(serializer); - return this; - } - - public MLApiRootBuilder withHttpExceptionFactory(final HttpExceptionFactory factory) { - builder.withHttpExceptionFactory(factory); - return this; - } - - public MLApiRootBuilder withHttpExceptionFactory(final Function factory) { - builder.withHttpExceptionFactory(factory); - return this; - } - - public MLApiRootBuilder withHttpExceptionFactory(final Supplier factory) { - builder.withHttpExceptionFactory(factory); - return this; - } - - public MLApiRootBuilder defaultClient(final ClientCredentials credentials) { - return defaultClient(credentials, ServiceRegion.GCP_EUROPE); - } - - public MLApiRootBuilder defaultClient(final ClientCredentials credentials, ServiceRegionConfig serviceRegion) { - builder.defaultClient(credentials, serviceRegion); - - return this; - } - - public MLApiRootBuilder defaultClient(final ClientCredentials credentials, final String tokenEndpoint, - final String apiEndpoint) { - return this.defaultClient(URI.create(apiEndpoint)).withClientCredentialsFlow(credentials, tokenEndpoint); - } - - public MLApiRootBuilder defaultClient(final String apiEndpoint, final ClientCredentials credentials, - final String tokenEndpoint) { - return this.defaultClient(URI.create(apiEndpoint)).withClientCredentialsFlow(credentials, tokenEndpoint); - } - - public MLApiRootBuilder defaultClient(final String apiEndpoint) { - return this.defaultClient(URI.create(apiEndpoint)); - } - - public MLApiRootBuilder defaultClient(final URI apiEndpoint) { - builder.defaultClient(apiEndpoint); - - return this; - } - - public MLApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, final String tokenEndpoint) { - builder.withClientCredentialsFlow(credentials, tokenEndpoint); - - return this; - } - - public MLApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, final String tokenEndpoint, - final VrapHttpClient httpClient) { - builder.withClientCredentialsFlow(credentials, tokenEndpoint, httpClient); - - return this; - } - - public MLApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, final URI tokenEndpoint) { - builder.withClientCredentialsFlow(credentials, tokenEndpoint); - - return this; - } - - public MLApiRootBuilder withClientCredentialsFlow(final ClientCredentials credentials, final URI tokenEndpoint, - final VrapHttpClient httpClient) { - builder.withClientCredentialsFlow(credentials, tokenEndpoint, httpClient); - - return this; - } - - public MLApiRootBuilder withStaticTokenFlow(final AuthenticationToken token) { - builder.withStaticTokenFlow(token); - - return this; - } - - public MLApiRootBuilder withAnonymousSessionFlow(final ClientCredentials credentials, final String tokenEndpoint) { - builder.withAnonymousSessionFlow(credentials, tokenEndpoint); - - return this; - } - - public MLApiRootBuilder withAnonymousSessionFlow(final ClientCredentials credentials, final String tokenEndpoint, - final VrapHttpClient httpClient) { - builder.withAnonymousSessionFlow(credentials, tokenEndpoint, httpClient); - - return this; - } - - public MLApiRootBuilder withGlobalCustomerPasswordFlow(final ClientCredentials credentials, final String email, - final String password, final String tokenEndpoint) { - builder.withGlobalCustomerPasswordFlow(credentials, email, password, tokenEndpoint); - - return this; - } - - public MLApiRootBuilder withGlobalCustomerPasswordFlow(final ClientCredentials credentials, final String email, - final String password, final String tokenEndpoint, final VrapHttpClient httpClient) { - builder.withGlobalCustomerPasswordFlow(credentials, email, password, tokenEndpoint, httpClient); - - return this; - } - - public MLApiRootBuilder addAcceptGZipMiddleware() { - builder.addAcceptGZipMiddleware(); - - return this; - } - - public MLApiRootBuilder withErrorMiddleware() { - builder.withErrorMiddleware(); - - return this; - } - - public MLApiRootBuilder withErrorMiddleware(final ErrorMiddleware errorMiddleware) { - builder.withErrorMiddleware(errorMiddleware); - - return this; - } - - public MLApiRootBuilder withPolicies(final Function fn) { - return with(clientBuilder -> clientBuilder.withPolicies(fn)); - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(Supplier retryMiddleware) { - builder.withRetryMiddleware(retryMiddleware); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(RetryRequestMiddleware retryMiddleware) { - builder.withRetryMiddleware(retryMiddleware); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(final int maxRetries) { - builder.withRetryMiddleware(maxRetries); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(final int maxRetries, List statusCodes) { - builder.withRetryMiddleware(maxRetries, statusCodes); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(final int maxRetries, List statusCodes, - final List> failures) { - builder.withRetryMiddleware(maxRetries, statusCodes, failures); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(final int maxRetries, final long delay, final long maxDelay, - List statusCodes, final List> failures, - final FailsafeRetryPolicyBuilderOptions fn) { - builder.withRetryMiddleware(maxRetries, delay, maxDelay, statusCodes, failures, fn); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withRetryMiddleware(final int maxRetries, final long delay, final long maxDelay, - final FailsafeRetryPolicyBuilderOptions fn) { - builder.withRetryMiddleware(maxRetries, delay, maxDelay, fn); - - return this; - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withQueueMiddleware(final Supplier queueMiddleware) { - return with(clientBuilder -> clientBuilder.withQueueMiddleware(queueMiddleware)); - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withQueueMiddleware(final QueueRequestMiddleware queueMiddleware) { - return with(clientBuilder -> clientBuilder.withQueueMiddleware(queueMiddleware)); - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withQueueMiddleware(final int maxRequests, final Duration maxWaitTime) { - return with(clientBuilder -> clientBuilder.withQueueMiddleware(maxRequests, maxWaitTime)); - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withQueueMiddleware(final Scheduler scheduler, final int maxRequests, - final Duration maxWaitTime) { - return with(clientBuilder -> clientBuilder.withQueueMiddleware(scheduler, maxRequests, maxWaitTime)); - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withQueueMiddleware(final ScheduledExecutorService executorService, final int maxRequests, - final Duration maxWaitTime) { - return with(clientBuilder -> clientBuilder.withQueueMiddleware(executorService, maxRequests, maxWaitTime)); - } - - /** - * @deprecated use {@link #withPolicies(Function)} instead - */ - @Deprecated - public MLApiRootBuilder withQueueMiddleware(final ExecutorService executorService, final int maxRequests, - final Duration maxWaitTime) { - return with(clientBuilder -> clientBuilder.withQueueMiddleware(executorService, maxRequests, maxWaitTime)); - } - - public MLApiRootBuilder withOAuthMiddleware(final Supplier oAuthMiddleware) { - builder.withOAuthMiddleware(oAuthMiddleware); - - return this; - } - - public MLApiRootBuilder withOAuthMiddleware(final OAuthMiddleware oAuthMiddleware) { - builder.withOAuthMiddleware(oAuthMiddleware); - - return this; - } - - public MLApiRootBuilder withTokenSupplier(final TokenSupplier tokenSupplier) { - builder.withTokenSupplier(tokenSupplier); - - return this; - } - - public MLApiRootBuilder withTokenSupplier(final Supplier tokenSupplier) { - builder.withTokenSupplier(tokenSupplier); - - return this; - } - - public MLApiRootBuilder withInternalLoggerMiddleware(final InternalLoggerMiddleware internalLoggerMiddleware) { - builder.withInternalLoggerMiddleware(internalLoggerMiddleware); - - return this; - } - - public MLApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory) { - builder.withInternalLoggerFactory(internalLoggerFactory); - - return this; - } - - public MLApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory, - final Level responseLogEvent, final Level deprecationLogEvent) { - builder.withInternalLoggerFactory(internalLoggerFactory, responseLogEvent, deprecationLogEvent); - - return this; - } - - public MLApiRootBuilder withInternalLoggerFactory(final InternalLoggerFactory internalLoggerFactory, - final Level responseLogEvent, final Level deprecationLogEvent, final Level defaultExceptionLogEvent, - final Map, Level> exceptionLogEvents) { - builder.withInternalLoggerFactory(internalLoggerFactory, responseLogEvent, deprecationLogEvent, - defaultExceptionLogEvent, exceptionLogEvents); - - return this; - } - - public MLApiRootBuilder withApiBaseUrl(String apiBaseUrl) { - builder.withApiBaseUrl(apiBaseUrl); - - return this; - } - - public MLApiRootBuilder withApiBaseUrl(final URI apiBaseUrl) { - builder.withApiBaseUrl(apiBaseUrl); - - return this; - } - - public MLApiRootBuilder withUserAgentSupplier(final Supplier userAgentSupplier) { - builder.withUserAgentSupplier(userAgentSupplier); - - return this; - } - - public MLApiRootBuilder addCorrelationIdProvider(final @Nullable CorrelationIdProvider correlationIdProvider) { - return addCorrelationIdProvider(correlationIdProvider, true); - } - - private MLApiRootBuilder addCorrelationIdProvider(final @Nullable CorrelationIdProvider correlationIdProvider, - final boolean replace) { - builder.addCorrelationIdProvider(correlationIdProvider, replace); - - return this; - } - - public MLApiRootBuilder withMiddleware(final Middleware middleware, final Middleware... middlewares) { - builder.withMiddleware(middleware, middlewares); - - return this; - } - - public MLApiRootBuilder addMiddleware(final Middleware middleware, final Middleware... middlewares) { - builder.addMiddleware(middleware, middlewares); - - return this; - } - - public MLApiRootBuilder withMiddlewares(final List middlewares) { - builder.withMiddlewares(middlewares); - - return this; - } - - public MLApiRootBuilder addMiddlewares(final List middlewares) { - builder.addMiddlewares(middlewares); - - return this; - } - - public MLApiRootBuilder with(UnaryOperator builderUnaryOperator) { - builderUnaryOperator.apply(builder); - - return this; - } - - public ApiRoot build() { - return ApiRoot.fromClient(clientSupplier().get()); - } - - public ApiHttpClient buildClient() { - return clientSupplier().get(); - } - - public Supplier clientSupplier() { - return builder::build; - } - - /** - * @deprecated use {@link #build(String)} instead - */ - @Deprecated - public ByProjectKeyRequestBuilder buildForProject(final String projectKey) { - addCorrelationIdProvider(new MLCorrelationIdProvider(projectKey), false); - return ApiRoot.fromClient(builder.build()).withProjectKey(projectKey); - } - - /** - * @deprecated use {@link #build(String)} instead - */ - @Deprecated - public ProjectApiRoot buildProjectRoot(final String projectKey) { - addCorrelationIdProvider(new MLCorrelationIdProvider(projectKey), false); - return ProjectApiRoot.fromClient(projectKey, builder.build()); - } - - public ProjectApiRoot build(final String projectKey) { - addCorrelationIdProvider(new MLCorrelationIdProvider(projectKey), false); - return ProjectApiRoot.fromClient(projectKey, builder.build()); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/defaultconfig/ServiceRegion.java b/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/defaultconfig/ServiceRegion.java deleted file mode 100644 index 5be8214776f..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java/com/commercetools/ml/defaultconfig/ServiceRegion.java +++ /dev/null @@ -1,40 +0,0 @@ - -package com.commercetools.ml.defaultconfig; - -import io.vrap.rmf.base.client.ServiceRegionConfig; - -public enum ServiceRegion implements ServiceRegionConfig { - - GCP_EUROPE(new RegionHosts("https://ml-eu.europe-west1.gcp.commercetools.com/", - "https://auth.europe-west1.gcp.commercetools.com")), - GCP_US(new RegionHosts("https://ml-us.europe-west1.gcp.commercetools.com/", - "https://auth.us-central1.gcp.commercetools.com")), - - ; - - public static class RegionHosts { - private final String apiUrl; - private final String authUrl; - - private RegionHosts(String apiUrl, String authUrl) { - this.apiUrl = apiUrl; - this.authUrl = authUrl; - } - } - - private final RegionHosts regionHosts; - - ServiceRegion(RegionHosts regionHosts) { - this.regionHosts = regionHosts; - } - - @Override - public String getApiUrl() { - return regionHosts.apiUrl; - } - - @Override - public String getAuthUrl() { - return regionHosts.authUrl; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/main/java/gen.properties b/commercetools/commercetools-sdk-java-ml/src/main/java/gen.properties deleted file mode 100644 index eaf4565918e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/main/java/gen.properties +++ /dev/null @@ -1 +0,0 @@ -hash=09c34b613d837c40c1e80132207eb2fa7e1d3ae2 diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyImageSearchConfigTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyImageSearchConfigTest.java deleted file mode 100644 index f4879658eee..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyImageSearchConfigTest.java +++ /dev/null @@ -1,86 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletableFuture; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.ApiHttpRequest; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.error.ApiClientException; -import io.vrap.rmf.base.client.error.ApiServerException; -import io.vrap.rmf.base.client.utils.Generated; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyImageSearchConfigTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @TestTemplate - @UseDataProvider("requestWithMethodParameters") - public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { - Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); - Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeServerException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiServerException.class); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeClientException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiClientException.class); - } - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] { - new Object[] { - apiRoot.withProjectKey("test_projectKey").imageSearch().config().get().createHttpRequest(), - "get", "test_projectKey/image-search/config", }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .config() - .post(com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest.of()) - .createHttpRequest(), "post", "test_projectKey/image-search/config", } }; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] { - new Object[] { apiRoot.withProjectKey("test_projectKey").imageSearch().config().get(), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .config() - .post(com.commercetools.ml.models.image_search_config.ImageSearchConfigRequest.of()), } }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyImageSearchTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyImageSearchTest.java deleted file mode 100644 index bb29706d8a0..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyImageSearchTest.java +++ /dev/null @@ -1,98 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletableFuture; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.ApiHttpRequest; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.error.ApiClientException; -import io.vrap.rmf.base.client.error.ApiServerException; -import io.vrap.rmf.base.client.utils.Generated; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyImageSearchTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @TestTemplate - @UseDataProvider("requestWithMethodParameters") - public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { - Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); - Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeServerException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiServerException.class); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeClientException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiClientException.class); - } - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] { - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .post(FileTestUtils.testFileFor(ByProjectKeyImageSearchTest.class)) - .withLimit(7) - .createHttpRequest(), "post", "test_projectKey/image-search?limit=7", }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .post(FileTestUtils.testFileFor(ByProjectKeyImageSearchTest.class)) - .withOffset(3) - .createHttpRequest(), "post", "test_projectKey/image-search?offset=3", }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .post(FileTestUtils.testFileFor(ByProjectKeyImageSearchTest.class)) - .createHttpRequest(), "post", "test_projectKey/image-search", } }; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] { - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .post(FileTestUtils.testFileFor(ByProjectKeyImageSearchTest.class)) - .withLimit(7), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .post(FileTestUtils.testFileFor(ByProjectKeyImageSearchTest.class)) - .withOffset(3), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .imageSearch() - .post(FileTestUtils.testFileFor(ByProjectKeyImageSearchTest.class)), } }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsGeneralCategoriesTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsGeneralCategoriesTest.java deleted file mode 100644 index aa3e43a88d6..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsGeneralCategoriesTest.java +++ /dev/null @@ -1,158 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletableFuture; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.ApiHttpRequest; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.error.ApiClientException; -import io.vrap.rmf.base.client.error.ApiServerException; -import io.vrap.rmf.base.client.utils.Generated; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyRecommendationsGeneralCategoriesTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @TestTemplate - @UseDataProvider("requestWithMethodParameters") - public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { - Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); - Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeServerException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiServerException.class); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeClientException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiClientException.class); - } - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] { - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withProductImageUrl("productImageUrl") - .createHttpRequest(), - "get", "test_projectKey/recommendations/general-categories?productImageUrl=productImageUrl", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withProductName("productName") - .createHttpRequest(), - "get", "test_projectKey/recommendations/general-categories?productName=productName", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withLimit(7) - .createHttpRequest(), - "get", "test_projectKey/recommendations/general-categories?limit=7", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withOffset(3) - .createHttpRequest(), - "get", "test_projectKey/recommendations/general-categories?offset=3", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withConfidenceMin(0.7340351) - .createHttpRequest(), - "get", "test_projectKey/recommendations/general-categories?confidenceMin=0.7340351", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withConfidenceMax(0.30089796) - .createHttpRequest(), - "get", "test_projectKey/recommendations/general-categories?confidenceMax=0.30089796", }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .createHttpRequest(), "get", "test_projectKey/recommendations/general-categories", } }; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] { - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withProductImageUrl("productImageUrl"), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withProductName("productName"), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withLimit(7), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withOffset(3), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withConfidenceMin(0.7340351), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .generalCategories() - .get() - .withConfidenceMax(0.30089796), }, - new Object[] { - apiRoot.withProjectKey("test_projectKey").recommendations().generalCategories().get(), } }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsProjectCategoriesByProductIdTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsProjectCategoriesByProductIdTest.java deleted file mode 100644 index 69b9d4ab3ec..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsProjectCategoriesByProductIdTest.java +++ /dev/null @@ -1,163 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletableFuture; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.ApiHttpRequest; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.error.ApiClientException; -import io.vrap.rmf.base.client.error.ApiServerException; -import io.vrap.rmf.base.client.utils.Generated; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyRecommendationsProjectCategoriesByProductIdTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @TestTemplate - @UseDataProvider("requestWithMethodParameters") - public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { - Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); - Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeServerException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiServerException.class); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeClientException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiClientException.class); - } - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] { - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withLimit(7) - .createHttpRequest(), - "get", "test_projectKey/recommendations/project-categories/test_productId?limit=7", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withOffset(3) - .createHttpRequest(), - "get", "test_projectKey/recommendations/project-categories/test_productId?offset=3", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withStaged(true) - .createHttpRequest(), - "get", "test_projectKey/recommendations/project-categories/test_productId?staged=true", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withConfidenceMin(0.7340351) - .createHttpRequest(), - "get", - "test_projectKey/recommendations/project-categories/test_productId?confidenceMin=0.7340351", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withConfidenceMax(0.30089796) - .createHttpRequest(), - "get", - "test_projectKey/recommendations/project-categories/test_productId?confidenceMax=0.30089796", }, - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .createHttpRequest(), - "get", "test_projectKey/recommendations/project-categories/test_productId", } }; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] { - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withLimit(7), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withOffset(3), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withStaged(true), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withConfidenceMin(0.7340351), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get() - .withConfidenceMax(0.30089796), }, - new Object[] { apiRoot.withProjectKey("test_projectKey") - .recommendations() - .projectCategories() - .withProductId("test_productId") - .get(), } }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsProjectCategoriesTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsProjectCategoriesTest.java deleted file mode 100644 index 2a7d8dd611b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsProjectCategoriesTest.java +++ /dev/null @@ -1,35 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyRecommendationsProjectCategoriesTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] {}; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] {}; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsTest.java deleted file mode 100644 index 0f4ea55b896..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyRecommendationsTest.java +++ /dev/null @@ -1,35 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyRecommendationsTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] {}; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] {}; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsStatusByTaskIdTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsStatusByTaskIdTest.java deleted file mode 100644 index a98ac2ba4ac..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsStatusByTaskIdTest.java +++ /dev/null @@ -1,87 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletableFuture; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.ApiHttpRequest; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.error.ApiClientException; -import io.vrap.rmf.base.client.error.ApiServerException; -import io.vrap.rmf.base.client.utils.Generated; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeySimilaritiesProductsStatusByTaskIdTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @TestTemplate - @UseDataProvider("requestWithMethodParameters") - public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { - Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); - Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeServerException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiServerException.class); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeClientException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiClientException.class); - } - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] { - new Object[] { - apiRoot.withProjectKey("test_projectKey") - .similarities() - .products() - .status() - .withTaskId("test_taskId") - .get() - .createHttpRequest(), - "get", "test_projectKey/similarities/products/status/test_taskId", } }; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") - .similarities() - .products() - .status() - .withTaskId("test_taskId") - .get(), } }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsStatusTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsStatusTest.java deleted file mode 100644 index c4d2ec79363..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsStatusTest.java +++ /dev/null @@ -1,35 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeySimilaritiesProductsStatusTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] {}; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] {}; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsTest.java deleted file mode 100644 index b405c0e435d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesProductsTest.java +++ /dev/null @@ -1,80 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.nio.charset.StandardCharsets; -import java.util.concurrent.CompletableFuture; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.ApiHttpRequest; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.error.ApiClientException; -import io.vrap.rmf.base.client.error.ApiServerException; -import io.vrap.rmf.base.client.utils.Generated; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeySimilaritiesProductsTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @TestTemplate - @UseDataProvider("requestWithMethodParameters") - public void withMethods(ApiHttpRequest request, String httpMethod, String uri) { - Assertions.assertThat(httpMethod).isEqualTo(request.getMethod().name().toLowerCase()); - Assertions.assertThat(uri).isEqualTo(request.getUri().toString()); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeServerException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(500, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiServerException.class); - } - - @TestTemplate - @UseDataProvider("executeMethodParameters") - public void executeClientException(HttpRequestCommand httpRequest) throws Exception { - Mockito.when(httpClientMock.execute(Mockito.any())) - .thenReturn(CompletableFuture.completedFuture( - new ApiHttpResponse<>(400, null, "".getBytes(StandardCharsets.UTF_8), "Oops!"))); - - Assertions.assertThatThrownBy(() -> client.execute(httpRequest).toCompletableFuture().get()) - .hasCauseInstanceOf(ApiClientException.class); - } - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") - .similarities() - .products() - .post(com.commercetools.ml.models.similar_products.SimilarProductSearchRequest.of()) - .createHttpRequest(), "post", "test_projectKey/similarities/products", } }; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] { new Object[] { apiRoot.withProjectKey("test_projectKey") - .similarities() - .products() - .post(com.commercetools.ml.models.similar_products.SimilarProductSearchRequest.of()), } }; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesTest.java deleted file mode 100644 index 579dc21a77d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeySimilaritiesTest.java +++ /dev/null @@ -1,35 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeySimilaritiesTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] {}; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] {}; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyTest.java deleted file mode 100644 index f816fd17381..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/client/resource/ByProjectKeyTest.java +++ /dev/null @@ -1,35 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import com.commercetools.ml.client.ApiRoot; -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import io.vrap.rmf.base.client.*; -import io.vrap.rmf.base.client.ApiHttpClient; -import io.vrap.rmf.base.client.VrapHttpClient; -import io.vrap.rmf.base.client.utils.Generated; - -import org.junit.jupiter.api.extension.ExtendWith; -import org.mockito.Mockito; - -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ByProjectKeyTest { - private final VrapHttpClient httpClientMock = Mockito.mock(VrapHttpClient.class); - private final String projectKey = "test_projectKey"; - private final static ApiRoot apiRoot = ApiRoot.of(); - private final ApiHttpClient client = ClientBuilder.of(httpClientMock).defaultClient("").build(); - - @DataProvider - public static Object[][] requestWithMethodParameters() { - return new Object[][] {}; - } - - @DataProvider - public static Object[][] executeMethodParameters() { - return new Object[][] {}; - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaTest.java deleted file mode 100644 index bf832cfdb9e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationMetaTest.java +++ /dev/null @@ -1,56 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProjectCategoryRecommendationMetaTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ProjectCategoryRecommendationMetaBuilder builder) { - ProjectCategoryRecommendationMeta projectCategoryRecommendationMeta = builder.buildUnchecked(); - Assertions.assertThat(projectCategoryRecommendationMeta).isInstanceOf(ProjectCategoryRecommendationMeta.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ProjectCategoryRecommendationMeta.builder().productName("productName") }, - new Object[] { ProjectCategoryRecommendationMeta.builder().productImageUrl("productImageUrl") }, - new Object[] { ProjectCategoryRecommendationMeta.builder() - .generalCategoryNames(Collections.singletonList("generalCategoryNames")) } }; - } - - @Test - public void productName() { - ProjectCategoryRecommendationMeta value = ProjectCategoryRecommendationMeta.of(); - value.setProductName("productName"); - Assertions.assertThat(value.getProductName()).isEqualTo("productName"); - } - - @Test - public void productImageUrl() { - ProjectCategoryRecommendationMeta value = ProjectCategoryRecommendationMeta.of(); - value.setProductImageUrl("productImageUrl"); - Assertions.assertThat(value.getProductImageUrl()).isEqualTo("productImageUrl"); - } - - @Test - public void generalCategoryNames() { - ProjectCategoryRecommendationMeta value = ProjectCategoryRecommendationMeta.of(); - value.setGeneralCategoryNames(Collections.singletonList("generalCategoryNames")); - Assertions.assertThat(value.getGeneralCategoryNames()) - .isEqualTo(Collections.singletonList("generalCategoryNames")); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseTest.java deleted file mode 100644 index 4b49a441d38..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationPagedQueryResponseTest.java +++ /dev/null @@ -1,81 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProjectCategoryRecommendationPagedQueryResponseTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ProjectCategoryRecommendationPagedQueryResponseBuilder builder) { - ProjectCategoryRecommendationPagedQueryResponse projectCategoryRecommendationPagedQueryResponse = builder - .buildUnchecked(); - Assertions.assertThat(projectCategoryRecommendationPagedQueryResponse) - .isInstanceOf(ProjectCategoryRecommendationPagedQueryResponse.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ProjectCategoryRecommendationPagedQueryResponse.builder().count(2L) }, - new Object[] { ProjectCategoryRecommendationPagedQueryResponse.builder().total(1L) }, - new Object[] { ProjectCategoryRecommendationPagedQueryResponse.builder().offset(3L) }, - new Object[] { ProjectCategoryRecommendationPagedQueryResponse.builder() - .results(Collections.singletonList( - new com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationImpl())) }, - new Object[] { ProjectCategoryRecommendationPagedQueryResponse.builder() - .meta( - new com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMetaImpl()) } }; - } - - @Test - public void count() { - ProjectCategoryRecommendationPagedQueryResponse value = ProjectCategoryRecommendationPagedQueryResponse.of(); - value.setCount(2L); - Assertions.assertThat(value.getCount()).isEqualTo(2L); - } - - @Test - public void total() { - ProjectCategoryRecommendationPagedQueryResponse value = ProjectCategoryRecommendationPagedQueryResponse.of(); - value.setTotal(1L); - Assertions.assertThat(value.getTotal()).isEqualTo(1L); - } - - @Test - public void offset() { - ProjectCategoryRecommendationPagedQueryResponse value = ProjectCategoryRecommendationPagedQueryResponse.of(); - value.setOffset(3L); - Assertions.assertThat(value.getOffset()).isEqualTo(3L); - } - - @Test - public void results() { - ProjectCategoryRecommendationPagedQueryResponse value = ProjectCategoryRecommendationPagedQueryResponse.of(); - value.setResults(Collections.singletonList( - new com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationImpl())); - Assertions.assertThat(value.getResults()) - .isEqualTo(Collections.singletonList( - new com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationImpl())); - } - - @Test - public void meta() { - ProjectCategoryRecommendationPagedQueryResponse value = ProjectCategoryRecommendationPagedQueryResponse.of(); - value.setMeta(new com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMetaImpl()); - Assertions.assertThat(value.getMeta()) - .isEqualTo( - new com.commercetools.ml.models.category_recommendations.ProjectCategoryRecommendationMetaImpl()); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationTest.java deleted file mode 100644 index d1b741322b7..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/category_recommendations/ProjectCategoryRecommendationTest.java +++ /dev/null @@ -1,55 +0,0 @@ - -package com.commercetools.ml.models.category_recommendations; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProjectCategoryRecommendationTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ProjectCategoryRecommendationBuilder builder) { - ProjectCategoryRecommendation projectCategoryRecommendation = builder.buildUnchecked(); - Assertions.assertThat(projectCategoryRecommendation).isInstanceOf(ProjectCategoryRecommendation.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { ProjectCategoryRecommendation.builder() - .category(new com.commercetools.ml.models.common.CategoryReferenceImpl()) }, - new Object[] { ProjectCategoryRecommendation.builder().confidence(0.7333717) }, - new Object[] { ProjectCategoryRecommendation.builder().path("path") } }; - } - - @Test - public void category() { - ProjectCategoryRecommendation value = ProjectCategoryRecommendation.of(); - value.setCategory(new com.commercetools.ml.models.common.CategoryReferenceImpl()); - Assertions.assertThat(value.getCategory()) - .isEqualTo(new com.commercetools.ml.models.common.CategoryReferenceImpl()); - } - - @Test - public void confidence() { - ProjectCategoryRecommendation value = ProjectCategoryRecommendation.of(); - value.setConfidence(0.7333717); - Assertions.assertThat(value.getConfidence()).isEqualTo(0.7333717); - } - - @Test - public void path() { - ProjectCategoryRecommendation value = ProjectCategoryRecommendation.of(); - value.setPath("path"); - Assertions.assertThat(value.getPath()).isEqualTo("path"); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/CategoryReferenceTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/CategoryReferenceTest.java deleted file mode 100644 index 6e69bf24b57..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/CategoryReferenceTest.java +++ /dev/null @@ -1,13 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class CategoryReferenceTest { - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/LocalizedStringTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/LocalizedStringTest.java deleted file mode 100644 index 87c8ed9083d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/LocalizedStringTest.java +++ /dev/null @@ -1,13 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class LocalizedStringTest { - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/MoneyTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/MoneyTest.java deleted file mode 100644 index be32f98c8e8..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/MoneyTest.java +++ /dev/null @@ -1,44 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class MoneyTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(MoneyBuilder builder) { - Money money = builder.buildUnchecked(); - Assertions.assertThat(money).isInstanceOf(Money.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { Money.builder().centAmount(3L) }, - new Object[] { Money.builder().currencyCode("currencyCode") } }; - } - - @Test - public void centAmount() { - Money value = Money.of(); - value.setCentAmount(3L); - Assertions.assertThat(value.getCentAmount()).isEqualTo(3L); - } - - @Test - public void currencyCode() { - Money value = Money.of(); - value.setCurrencyCode("currencyCode"); - Assertions.assertThat(value.getCurrencyCode()).isEqualTo("currencyCode"); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductReferenceTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductReferenceTest.java deleted file mode 100644 index 68831dc82f3..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductReferenceTest.java +++ /dev/null @@ -1,13 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProductReferenceTest { - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceTest.java deleted file mode 100644 index 43fadea8aa4..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductTypeReferenceTest.java +++ /dev/null @@ -1,13 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProductTypeReferenceTest { - -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductVariantTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductVariantTest.java deleted file mode 100644 index 61510df446a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/ProductVariantTest.java +++ /dev/null @@ -1,55 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProductVariantTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ProductVariantBuilder builder) { - ProductVariant productVariant = builder.buildUnchecked(); - Assertions.assertThat(productVariant).isInstanceOf(ProductVariant.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { ProductVariant.builder() - .product(new com.commercetools.ml.models.common.ProductReferenceImpl()) }, - new Object[] { ProductVariant.builder().staged(true) }, - new Object[] { ProductVariant.builder().variantId(5) } }; - } - - @Test - public void product() { - ProductVariant value = ProductVariant.of(); - value.setProduct(new com.commercetools.ml.models.common.ProductReferenceImpl()); - Assertions.assertThat(value.getProduct()) - .isEqualTo(new com.commercetools.ml.models.common.ProductReferenceImpl()); - } - - @Test - public void staged() { - ProductVariant value = ProductVariant.of(); - value.setStaged(true); - Assertions.assertThat(value.getStaged()).isEqualTo(true); - } - - @Test - public void variantId() { - ProductVariant value = ProductVariant.of(); - value.setVariantId(5); - Assertions.assertThat(value.getVariantId()).isEqualTo(5); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/TaskTokenTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/TaskTokenTest.java deleted file mode 100644 index f5cb104713b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/common/TaskTokenTest.java +++ /dev/null @@ -1,44 +0,0 @@ - -package com.commercetools.ml.models.common; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class TaskTokenTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(TaskTokenBuilder builder) { - TaskToken taskToken = builder.buildUnchecked(); - Assertions.assertThat(taskToken).isInstanceOf(TaskToken.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { TaskToken.builder().taskId("taskId") }, - new Object[] { TaskToken.builder().uriPath("uriPath") } }; - } - - @Test - public void taskId() { - TaskToken value = TaskToken.of(); - value.setTaskId("taskId"); - Assertions.assertThat(value.getTaskId()).isEqualTo("taskId"); - } - - @Test - public void uriPath() { - TaskToken value = TaskToken.of(); - value.setUriPath("uriPath"); - Assertions.assertThat(value.getUriPath()).isEqualTo("uriPath"); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseTest.java deleted file mode 100644 index 05449a83bea..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationPagedQueryResponseTest.java +++ /dev/null @@ -1,69 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class GeneralCategoryRecommendationPagedQueryResponseTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(GeneralCategoryRecommendationPagedQueryResponseBuilder builder) { - GeneralCategoryRecommendationPagedQueryResponse generalCategoryRecommendationPagedQueryResponse = builder - .buildUnchecked(); - Assertions.assertThat(generalCategoryRecommendationPagedQueryResponse) - .isInstanceOf(GeneralCategoryRecommendationPagedQueryResponse.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { GeneralCategoryRecommendationPagedQueryResponse.builder().count(2L) }, - new Object[] { GeneralCategoryRecommendationPagedQueryResponse.builder().total(1L) }, - new Object[] { GeneralCategoryRecommendationPagedQueryResponse.builder().offset(3L) }, - new Object[] { GeneralCategoryRecommendationPagedQueryResponse.builder() - .results(Collections.singletonList( - new com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationImpl())) } }; - } - - @Test - public void count() { - GeneralCategoryRecommendationPagedQueryResponse value = GeneralCategoryRecommendationPagedQueryResponse.of(); - value.setCount(2L); - Assertions.assertThat(value.getCount()).isEqualTo(2L); - } - - @Test - public void total() { - GeneralCategoryRecommendationPagedQueryResponse value = GeneralCategoryRecommendationPagedQueryResponse.of(); - value.setTotal(1L); - Assertions.assertThat(value.getTotal()).isEqualTo(1L); - } - - @Test - public void offset() { - GeneralCategoryRecommendationPagedQueryResponse value = GeneralCategoryRecommendationPagedQueryResponse.of(); - value.setOffset(3L); - Assertions.assertThat(value.getOffset()).isEqualTo(3L); - } - - @Test - public void results() { - GeneralCategoryRecommendationPagedQueryResponse value = GeneralCategoryRecommendationPagedQueryResponse.of(); - value.setResults(Collections.singletonList( - new com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationImpl())); - Assertions.assertThat(value.getResults()) - .isEqualTo(Collections.singletonList( - new com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationImpl())); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationTest.java deleted file mode 100644 index 5dcf75df91d..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/general_category_recommendations/GeneralCategoryRecommendationTest.java +++ /dev/null @@ -1,44 +0,0 @@ - -package com.commercetools.ml.models.general_category_recommendations; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class GeneralCategoryRecommendationTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(GeneralCategoryRecommendationBuilder builder) { - GeneralCategoryRecommendation generalCategoryRecommendation = builder.buildUnchecked(); - Assertions.assertThat(generalCategoryRecommendation).isInstanceOf(GeneralCategoryRecommendation.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { GeneralCategoryRecommendation.builder().categoryName("categoryName") }, - new Object[] { GeneralCategoryRecommendation.builder().confidence(0.7333717) } }; - } - - @Test - public void categoryName() { - GeneralCategoryRecommendation value = GeneralCategoryRecommendation.of(); - value.setCategoryName("categoryName"); - Assertions.assertThat(value.getCategoryName()).isEqualTo("categoryName"); - } - - @Test - public void confidence() { - GeneralCategoryRecommendation value = GeneralCategoryRecommendation.of(); - value.setConfidence(0.7333717); - Assertions.assertThat(value.getConfidence()).isEqualTo(0.7333717); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseTest.java deleted file mode 100644 index ad0cd2ba537..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search/ImageSearchResponseTest.java +++ /dev/null @@ -1,65 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ImageSearchResponseTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ImageSearchResponseBuilder builder) { - ImageSearchResponse imageSearchResponse = builder.buildUnchecked(); - Assertions.assertThat(imageSearchResponse).isInstanceOf(ImageSearchResponse.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ImageSearchResponse.builder().count(2) }, - new Object[] { ImageSearchResponse.builder().offset(0.7475848) }, - new Object[] { ImageSearchResponse.builder().total(1) }, - new Object[] { ImageSearchResponse.builder() - .results(Collections - .singletonList(new com.commercetools.ml.models.image_search.ResultItemImpl())) } }; - } - - @Test - public void count() { - ImageSearchResponse value = ImageSearchResponse.of(); - value.setCount(2); - Assertions.assertThat(value.getCount()).isEqualTo(2); - } - - @Test - public void offset() { - ImageSearchResponse value = ImageSearchResponse.of(); - value.setOffset(0.7475848); - Assertions.assertThat(value.getOffset()).isEqualTo(0.7475848); - } - - @Test - public void total() { - ImageSearchResponse value = ImageSearchResponse.of(); - value.setTotal(1); - Assertions.assertThat(value.getTotal()).isEqualTo(1); - } - - @Test - public void results() { - ImageSearchResponse value = ImageSearchResponse.of(); - value.setResults(Collections.singletonList(new com.commercetools.ml.models.image_search.ResultItemImpl())); - Assertions.assertThat(value.getResults()) - .isEqualTo(Collections.singletonList(new com.commercetools.ml.models.image_search.ResultItemImpl())); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search/ResultItemTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search/ResultItemTest.java deleted file mode 100644 index 487cefee687..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search/ResultItemTest.java +++ /dev/null @@ -1,50 +0,0 @@ - -package com.commercetools.ml.models.image_search; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ResultItemTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ResultItemBuilder builder) { - ResultItem resultItem = builder.buildUnchecked(); - Assertions.assertThat(resultItem).isInstanceOf(ResultItem.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ResultItem.builder().imageUrl("imageUrl") }, - new Object[] { ResultItem.builder() - .productVariants( - Collections.singletonList(new com.commercetools.ml.models.common.ProductVariantImpl())) } }; - } - - @Test - public void imageUrl() { - ResultItem value = ResultItem.of(); - value.setImageUrl("imageUrl"); - Assertions.assertThat(value.getImageUrl()).isEqualTo("imageUrl"); - } - - @Test - public void productVariants() { - ResultItem value = ResultItem.of(); - value.setProductVariants( - Collections.singletonList(new com.commercetools.ml.models.common.ProductVariantImpl())); - Assertions.assertThat(value.getProductVariants()) - .isEqualTo(Collections.singletonList(new com.commercetools.ml.models.common.ProductVariantImpl())); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionTest.java deleted file mode 100644 index eed08d93b98..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ChangeStatusUpdateActionTest.java +++ /dev/null @@ -1,38 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ChangeStatusUpdateActionTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ChangeStatusUpdateActionBuilder builder) { - ChangeStatusUpdateAction changeStatusUpdateAction = builder.buildUnchecked(); - Assertions.assertThat(changeStatusUpdateAction).isInstanceOf(ChangeStatusUpdateAction.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ChangeStatusUpdateAction.builder() - .status(com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus.findEnum("on")) } }; - } - - @Test - public void status() { - ChangeStatusUpdateAction value = ChangeStatusUpdateAction.of(); - value.setStatus(com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus.findEnum("on")); - Assertions.assertThat(value.getStatus()) - .isEqualTo(com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus.findEnum("on")); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestTest.java deleted file mode 100644 index 4b1b068e91a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigRequestTest.java +++ /dev/null @@ -1,43 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ImageSearchConfigRequestTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ImageSearchConfigRequestBuilder builder) { - ImageSearchConfigRequest imageSearchConfigRequest = builder.buildUnchecked(); - Assertions.assertThat(imageSearchConfigRequest).isInstanceOf(ImageSearchConfigRequest.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ImageSearchConfigRequest.builder() - .actions(Collections.singletonList( - new com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateActionImpl())) } }; - } - - @Test - public void actions() { - ImageSearchConfigRequest value = ImageSearchConfigRequest.of(); - value.setActions(Collections.singletonList( - new com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateActionImpl())); - Assertions.assertThat(value.getActions()) - .isEqualTo(Collections.singletonList( - new com.commercetools.ml.models.image_search_config.ImageSearchConfigUpdateActionImpl())); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseTest.java deleted file mode 100644 index 60a2dfe26dd..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/image_search_config/ImageSearchConfigResponseTest.java +++ /dev/null @@ -1,52 +0,0 @@ - -package com.commercetools.ml.models.image_search_config; - -import java.time.ZonedDateTime; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ImageSearchConfigResponseTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ImageSearchConfigResponseBuilder builder) { - ImageSearchConfigResponse imageSearchConfigResponse = builder.buildUnchecked(); - Assertions.assertThat(imageSearchConfigResponse).isInstanceOf(ImageSearchConfigResponse.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { - ImageSearchConfigResponse.builder() - .status(com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus - .findEnum("on")) }, - new Object[] { ImageSearchConfigResponse.builder() - .lastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")) } }; - } - - @Test - public void status() { - ImageSearchConfigResponse value = ImageSearchConfigResponse.of(); - value.setStatus(com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus.findEnum("on")); - Assertions.assertThat(value.getStatus()) - .isEqualTo(com.commercetools.ml.models.image_search_config.ImageSearchConfigStatus.findEnum("on")); - } - - @Test - public void lastModifiedAt() { - ImageSearchConfigResponse value = ImageSearchConfigResponse.of(); - value.setLastModifiedAt(ZonedDateTime.parse("2023-06-01T12:00Z")); - Assertions.assertThat(value.getLastModifiedAt()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorTest.java deleted file mode 100644 index 758ea5fd85b..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/ProductSetSelectorTest.java +++ /dev/null @@ -1,79 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class ProductSetSelectorTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ProductSetSelectorBuilder builder) { - ProductSetSelector productSetSelector = builder.buildUnchecked(); - Assertions.assertThat(productSetSelector).isInstanceOf(ProductSetSelector.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ProductSetSelector.builder().projectKey("projectKey") }, - new Object[] { ProductSetSelector.builder().productIds(Collections.singletonList("productIds")) }, - new Object[] { - ProductSetSelector.builder().productTypeIds(Collections.singletonList("productTypeIds")) }, - new Object[] { ProductSetSelector.builder().staged(true) }, - new Object[] { ProductSetSelector.builder().includeVariants(true) }, - new Object[] { ProductSetSelector.builder().productSetLimit(6L) } }; - } - - @Test - public void projectKey() { - ProductSetSelector value = ProductSetSelector.of(); - value.setProjectKey("projectKey"); - Assertions.assertThat(value.getProjectKey()).isEqualTo("projectKey"); - } - - @Test - public void productIds() { - ProductSetSelector value = ProductSetSelector.of(); - value.setProductIds(Collections.singletonList("productIds")); - Assertions.assertThat(value.getProductIds()).isEqualTo(Collections.singletonList("productIds")); - } - - @Test - public void productTypeIds() { - ProductSetSelector value = ProductSetSelector.of(); - value.setProductTypeIds(Collections.singletonList("productTypeIds")); - Assertions.assertThat(value.getProductTypeIds()).isEqualTo(Collections.singletonList("productTypeIds")); - } - - @Test - public void staged() { - ProductSetSelector value = ProductSetSelector.of(); - value.setStaged(true); - Assertions.assertThat(value.getStaged()).isEqualTo(true); - } - - @Test - public void includeVariants() { - ProductSetSelector value = ProductSetSelector.of(); - value.setIncludeVariants(true); - Assertions.assertThat(value.getIncludeVariants()).isEqualTo(true); - } - - @Test - public void productSetLimit() { - ProductSetSelector value = ProductSetSelector.of(); - value.setProductSetLimit(6L); - Assertions.assertThat(value.getProductSetLimit()).isEqualTo(6L); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaTest.java deleted file mode 100644 index 9c9eabfb67a..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductMetaTest.java +++ /dev/null @@ -1,64 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductMetaTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductMetaBuilder builder) { - SimilarProductMeta similarProductMeta = builder.buildUnchecked(); - Assertions.assertThat(similarProductMeta).isInstanceOf(SimilarProductMeta.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { SimilarProductMeta.builder() - .name(new com.commercetools.ml.models.common.LocalizedStringImpl()) }, - new Object[] { SimilarProductMeta.builder() - .description(new com.commercetools.ml.models.common.LocalizedStringImpl()) }, - new Object[] { SimilarProductMeta.builder().price(new com.commercetools.ml.models.common.MoneyImpl()) }, - new Object[] { SimilarProductMeta.builder().variantCount(5L) } }; - } - - @Test - public void name() { - SimilarProductMeta value = SimilarProductMeta.of(); - value.setName(new com.commercetools.ml.models.common.LocalizedStringImpl()); - Assertions.assertThat(value.getName()).isEqualTo(new com.commercetools.ml.models.common.LocalizedStringImpl()); - } - - @Test - public void description() { - SimilarProductMeta value = SimilarProductMeta.of(); - value.setDescription(new com.commercetools.ml.models.common.LocalizedStringImpl()); - Assertions.assertThat(value.getDescription()) - .isEqualTo(new com.commercetools.ml.models.common.LocalizedStringImpl()); - } - - @Test - public void price() { - SimilarProductMeta value = SimilarProductMeta.of(); - value.setPrice(new com.commercetools.ml.models.common.MoneyImpl()); - Assertions.assertThat(value.getPrice()).isEqualTo(new com.commercetools.ml.models.common.MoneyImpl()); - } - - @Test - public void variantCount() { - SimilarProductMeta value = SimilarProductMeta.of(); - value.setVariantCount(5L); - Assertions.assertThat(value.getVariantCount()).isEqualTo(5L); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairTest.java deleted file mode 100644 index 0618bbf782f..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductPairTest.java +++ /dev/null @@ -1,51 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductPairTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductPairBuilder builder) { - SimilarProductPair similarProductPair = builder.buildUnchecked(); - Assertions.assertThat(similarProductPair).isInstanceOf(SimilarProductPair.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { SimilarProductPair.builder().confidence(0.7333717) }, - new Object[] { SimilarProductPair.builder() - .products(Collections.singletonList( - new com.commercetools.ml.models.similar_products.SimilarProductImpl())) } }; - } - - @Test - public void confidence() { - SimilarProductPair value = SimilarProductPair.of(); - value.setConfidence(0.7333717); - Assertions.assertThat(value.getConfidence()).isEqualTo(0.7333717); - } - - @Test - public void products() { - SimilarProductPair value = SimilarProductPair.of(); - value.setProducts( - Collections.singletonList(new com.commercetools.ml.models.similar_products.SimilarProductImpl())); - Assertions.assertThat(value.getProducts()) - .isEqualTo( - Collections.singletonList(new com.commercetools.ml.models.similar_products.SimilarProductImpl())); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaTest.java deleted file mode 100644 index 844a8e85696..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestMetaTest.java +++ /dev/null @@ -1,38 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductSearchRequestMetaTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductSearchRequestMetaBuilder builder) { - SimilarProductSearchRequestMeta similarProductSearchRequestMeta = builder.buildUnchecked(); - Assertions.assertThat(similarProductSearchRequestMeta).isInstanceOf(SimilarProductSearchRequestMeta.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { SimilarProductSearchRequestMeta.builder() - .similarityMeasures(new com.commercetools.ml.models.similar_products.SimilarityMeasuresImpl()) } }; - } - - @Test - public void similarityMeasures() { - SimilarProductSearchRequestMeta value = SimilarProductSearchRequestMeta.of(); - value.setSimilarityMeasures(new com.commercetools.ml.models.similar_products.SimilarityMeasuresImpl()); - Assertions.assertThat(value.getSimilarityMeasures()) - .isEqualTo(new com.commercetools.ml.models.similar_products.SimilarityMeasuresImpl()); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestTest.java deleted file mode 100644 index a819a644cc6..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductSearchRequestTest.java +++ /dev/null @@ -1,102 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductSearchRequestTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductSearchRequestBuilder builder) { - SimilarProductSearchRequest similarProductSearchRequest = builder.buildUnchecked(); - Assertions.assertThat(similarProductSearchRequest).isInstanceOf(SimilarProductSearchRequest.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { SimilarProductSearchRequest.builder().limit(7L) }, - new Object[] { SimilarProductSearchRequest.builder().offset(3L) }, - new Object[] { SimilarProductSearchRequest.builder().language("language") }, - new Object[] { SimilarProductSearchRequest.builder().currencyCode("currencyCode") }, - new Object[] { SimilarProductSearchRequest.builder() - .similarityMeasures( - new com.commercetools.ml.models.similar_products.SimilarityMeasuresImpl()) }, - new Object[] { SimilarProductSearchRequest.builder() - .productSetSelectors(Collections.singletonList( - new com.commercetools.ml.models.similar_products.ProductSetSelectorImpl())) }, - new Object[] { SimilarProductSearchRequest.builder().confidenceMin(0.7340351) }, - new Object[] { SimilarProductSearchRequest.builder().confidenceMax(0.30089796) } }; - } - - @Test - public void limit() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setLimit(7L); - Assertions.assertThat(value.getLimit()).isEqualTo(7L); - } - - @Test - public void offset() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setOffset(3L); - Assertions.assertThat(value.getOffset()).isEqualTo(3L); - } - - @Test - public void language() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setLanguage("language"); - Assertions.assertThat(value.getLanguage()).isEqualTo("language"); - } - - @Test - public void currencyCode() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setCurrencyCode("currencyCode"); - Assertions.assertThat(value.getCurrencyCode()).isEqualTo("currencyCode"); - } - - @Test - public void similarityMeasures() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setSimilarityMeasures(new com.commercetools.ml.models.similar_products.SimilarityMeasuresImpl()); - Assertions.assertThat(value.getSimilarityMeasures()) - .isEqualTo(new com.commercetools.ml.models.similar_products.SimilarityMeasuresImpl()); - } - - @Test - public void productSetSelectors() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setProductSetSelectors( - Collections.singletonList(new com.commercetools.ml.models.similar_products.ProductSetSelectorImpl())); - Assertions.assertThat(value.getProductSetSelectors()) - .isEqualTo(Collections - .singletonList(new com.commercetools.ml.models.similar_products.ProductSetSelectorImpl())); - } - - @Test - public void confidenceMin() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setConfidenceMin(0.7340351); - Assertions.assertThat(value.getConfidenceMin()).isEqualTo(0.7340351); - } - - @Test - public void confidenceMax() { - SimilarProductSearchRequest value = SimilarProductSearchRequest.of(); - value.setConfidenceMax(0.30089796); - Assertions.assertThat(value.getConfidenceMax()).isEqualTo(0.30089796); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductTest.java deleted file mode 100644 index e186f2b01f5..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductTest.java +++ /dev/null @@ -1,56 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductBuilder builder) { - SimilarProduct similarProduct = builder.buildUnchecked(); - Assertions.assertThat(similarProduct).isInstanceOf(SimilarProduct.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { SimilarProduct.builder() - .product(new com.commercetools.ml.models.common.ProductReferenceImpl()) }, - new Object[] { SimilarProduct.builder().variantId(5L) }, new Object[] { SimilarProduct.builder() - .meta(new com.commercetools.ml.models.similar_products.SimilarProductMetaImpl()) } }; - } - - @Test - public void product() { - SimilarProduct value = SimilarProduct.of(); - value.setProduct(new com.commercetools.ml.models.common.ProductReferenceImpl()); - Assertions.assertThat(value.getProduct()) - .isEqualTo(new com.commercetools.ml.models.common.ProductReferenceImpl()); - } - - @Test - public void variantId() { - SimilarProduct value = SimilarProduct.of(); - value.setVariantId(5L); - Assertions.assertThat(value.getVariantId()).isEqualTo(5L); - } - - @Test - public void meta() { - SimilarProduct value = SimilarProduct.of(); - value.setMeta(new com.commercetools.ml.models.similar_products.SimilarProductMetaImpl()); - Assertions.assertThat(value.getMeta()) - .isEqualTo(new com.commercetools.ml.models.similar_products.SimilarProductMetaImpl()); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultTest.java deleted file mode 100644 index 34ef3897e92..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsPagedQueryResultTest.java +++ /dev/null @@ -1,78 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.util.Collections; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductsPagedQueryResultTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductsPagedQueryResultBuilder builder) { - SimilarProductsPagedQueryResult similarProductsPagedQueryResult = builder.buildUnchecked(); - Assertions.assertThat(similarProductsPagedQueryResult).isInstanceOf(SimilarProductsPagedQueryResult.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { SimilarProductsPagedQueryResult.builder().count(2L) }, - new Object[] { SimilarProductsPagedQueryResult.builder().total(1L) }, - new Object[] { SimilarProductsPagedQueryResult.builder().offset(3L) }, - new Object[] { SimilarProductsPagedQueryResult.builder() - .results(Collections.singletonList( - new com.commercetools.ml.models.similar_products.SimilarProductPairImpl())) }, - new Object[] { SimilarProductsPagedQueryResult.builder() - .meta( - new com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMetaImpl()) } }; - } - - @Test - public void count() { - SimilarProductsPagedQueryResult value = SimilarProductsPagedQueryResult.of(); - value.setCount(2L); - Assertions.assertThat(value.getCount()).isEqualTo(2L); - } - - @Test - public void total() { - SimilarProductsPagedQueryResult value = SimilarProductsPagedQueryResult.of(); - value.setTotal(1L); - Assertions.assertThat(value.getTotal()).isEqualTo(1L); - } - - @Test - public void offset() { - SimilarProductsPagedQueryResult value = SimilarProductsPagedQueryResult.of(); - value.setOffset(3L); - Assertions.assertThat(value.getOffset()).isEqualTo(3L); - } - - @Test - public void results() { - SimilarProductsPagedQueryResult value = SimilarProductsPagedQueryResult.of(); - value.setResults( - Collections.singletonList(new com.commercetools.ml.models.similar_products.SimilarProductPairImpl())); - Assertions.assertThat(value.getResults()) - .isEqualTo(Collections - .singletonList(new com.commercetools.ml.models.similar_products.SimilarProductPairImpl())); - } - - @Test - public void meta() { - SimilarProductsPagedQueryResult value = SimilarProductsPagedQueryResult.of(); - value.setMeta(new com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMetaImpl()); - Assertions.assertThat(value.getMeta()) - .isEqualTo(new com.commercetools.ml.models.similar_products.SimilarProductSearchRequestMetaImpl()); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusTest.java deleted file mode 100644 index effe882e456..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarProductsTaskStatusTest.java +++ /dev/null @@ -1,60 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import java.time.ZonedDateTime; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarProductsTaskStatusTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarProductsTaskStatusBuilder builder) { - SimilarProductsTaskStatus similarProductsTaskStatus = builder.buildUnchecked(); - Assertions.assertThat(similarProductsTaskStatus).isInstanceOf(SimilarProductsTaskStatus.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { - new Object[] { SimilarProductsTaskStatus.builder() - .state(com.commercetools.ml.models.common.TaskStatusEnum.findEnum("PENDING")) }, - new Object[] { SimilarProductsTaskStatus.builder().expires(ZonedDateTime.parse("2023-06-01T12:00Z")) }, - new Object[] { SimilarProductsTaskStatus.builder() - .result( - new com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResultImpl()) } }; - } - - @Test - public void state() { - SimilarProductsTaskStatus value = SimilarProductsTaskStatus.of(); - value.setState(com.commercetools.ml.models.common.TaskStatusEnum.findEnum("PENDING")); - Assertions.assertThat(value.getState()) - .isEqualTo(com.commercetools.ml.models.common.TaskStatusEnum.findEnum("PENDING")); - } - - @Test - public void expires() { - SimilarProductsTaskStatus value = SimilarProductsTaskStatus.of(); - value.setExpires(ZonedDateTime.parse("2023-06-01T12:00Z")); - Assertions.assertThat(value.getExpires()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); - } - - @Test - public void result() { - SimilarProductsTaskStatus value = SimilarProductsTaskStatus.of(); - value.setResult(new com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResultImpl()); - Assertions.assertThat(value.getResult()) - .isEqualTo(new com.commercetools.ml.models.similar_products.SimilarProductsPagedQueryResultImpl()); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresTest.java b/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresTest.java deleted file mode 100644 index c9a0559cd5e..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java-generated/com/commercetools/ml/models/similar_products/SimilarityMeasuresTest.java +++ /dev/null @@ -1,68 +0,0 @@ - -package com.commercetools.ml.models.similar_products; - -import com.tngtech.junit.dataprovider.DataProvider; -import com.tngtech.junit.dataprovider.DataProviderExtension; -import com.tngtech.junit.dataprovider.UseDataProvider; -import com.tngtech.junit.dataprovider.UseDataProviderExtension; - -import org.assertj.core.api.Assertions; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestTemplate; -import org.junit.jupiter.api.extension.ExtendWith; - -@ExtendWith(UseDataProviderExtension.class) -@ExtendWith(DataProviderExtension.class) -public class SimilarityMeasuresTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(SimilarityMeasuresBuilder builder) { - SimilarityMeasures similarityMeasures = builder.buildUnchecked(); - Assertions.assertThat(similarityMeasures).isInstanceOf(SimilarityMeasures.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { SimilarityMeasures.builder().name(4L) }, - new Object[] { SimilarityMeasures.builder().description(6L) }, - new Object[] { SimilarityMeasures.builder().attribute(8L) }, - new Object[] { SimilarityMeasures.builder().variantCount(5L) }, - new Object[] { SimilarityMeasures.builder().price(6L) } }; - } - - @Test - public void name() { - SimilarityMeasures value = SimilarityMeasures.of(); - value.setName(4L); - Assertions.assertThat(value.getName()).isEqualTo(4L); - } - - @Test - public void description() { - SimilarityMeasures value = SimilarityMeasures.of(); - value.setDescription(6L); - Assertions.assertThat(value.getDescription()).isEqualTo(6L); - } - - @Test - public void attribute() { - SimilarityMeasures value = SimilarityMeasures.of(); - value.setAttribute(8L); - Assertions.assertThat(value.getAttribute()).isEqualTo(8L); - } - - @Test - public void variantCount() { - SimilarityMeasures value = SimilarityMeasures.of(); - value.setVariantCount(5L); - Assertions.assertThat(value.getVariantCount()).isEqualTo(5L); - } - - @Test - public void price() { - SimilarityMeasures value = SimilarityMeasures.of(); - value.setPrice(6L); - Assertions.assertThat(value.getPrice()).isEqualTo(6L); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/java/com/commercetools/ml/client/resource/FileTestUtils.java b/commercetools/commercetools-sdk-java-ml/src/test/java/com/commercetools/ml/client/resource/FileTestUtils.java deleted file mode 100644 index 5389175f3f1..00000000000 --- a/commercetools/commercetools-sdk-java-ml/src/test/java/com/commercetools/ml/client/resource/FileTestUtils.java +++ /dev/null @@ -1,20 +0,0 @@ - -package com.commercetools.ml.client.resource; - -import java.io.File; -import java.net.URISyntaxException; - -public class FileTestUtils { - public static File fileFromResource(final String resourcePath) { - try { - return new File(Thread.currentThread().getContextClassLoader().getResource(resourcePath).toURI()); - } - catch (URISyntaxException e) { - throw new RuntimeException(e); - } - } - - public static File testFileFor(Class clazz) { - return fileFromResource("example_flower.jpg"); - } -} diff --git a/commercetools/commercetools-sdk-java-ml/src/test/resources/example_flower.jpg b/commercetools/commercetools-sdk-java-ml/src/test/resources/example_flower.jpg deleted file mode 100644 index b0f2052e045..00000000000 Binary files a/commercetools/commercetools-sdk-java-ml/src/test/resources/example_flower.jpg and /dev/null differ diff --git a/src/main/javadoc/overview.html b/src/main/javadoc/overview.html index 0f9572d4e37..7909dc23df9 100644 --- a/src/main/javadoc/overview.html +++ b/src/main/javadoc/overview.html @@ -18,7 +18,6 @@

First steps

  • {@link com.commercetools.api.client.ByProjectKeyRequestBuilder Project API}
  • {@link com.commercetools.importapi.client.ByProjectKeyRequestBuilder Import API}
  • -
  • {@link com.commercetools.ml.client.ByProjectKeyRequestBuilder Machine learning API}
  • {@link com.commercetools.history.client.ByProjectKeyRequestBuilder Audit log API}