From 9b49f2e4cca9cb49f42c85c588acc3b3b19e3b48 Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Fri, 20 Dec 2024 09:37:18 +0000
Subject: [PATCH] build(codegen): updating SDK
---
changes.md | 51 +---
.../main/resources/graphql/schema.graphqls | 24 ++
...ProjectKeyBusinessUnitsRequestBuilder.java | 8 +
.../ByProjectKeyBusinessUnitsSearchHead.java | 109 ++++++++
...yBusinessUnitsSearchIndexingStatusGet.java | 112 ++++++++
...itsSearchIndexingStatusRequestBuilder.java | 23 ++
.../ByProjectKeyBusinessUnitsSearchPost.java | 130 +++++++++
...ojectKeyBusinessUnitsSearchPostString.java | 129 +++++++++
...tKeyBusinessUnitsSearchRequestBuilder.java | 39 +++
.../BusinessUnitIndexingProgress.java | 158 +++++++++++
.../BusinessUnitIndexingProgressBuilder.java | 132 +++++++++
.../BusinessUnitIndexingProgressImpl.java | 117 ++++++++
.../BusinessUnitPagedSearchResponse.java | 191 +++++++++++++
...usinessUnitPagedSearchResponseBuilder.java | 242 ++++++++++++++++
.../BusinessUnitPagedSearchResponseImpl.java | 141 ++++++++++
...inessUnitSearchIndexingStatusResponse.java | 197 +++++++++++++
...itSearchIndexingStatusResponseBuilder.java | 218 +++++++++++++++
...sUnitSearchIndexingStatusResponseImpl.java | 162 +++++++++++
.../BusinessUnitSearchRequest.java | 187 +++++++++++++
.../BusinessUnitSearchRequestBuilder.java | 263 ++++++++++++++++++
.../BusinessUnitSearchRequestImpl.java | 139 +++++++++
.../BusinessUnitSearchResult.java | 140 ++++++++++
.../BusinessUnitSearchResultBuilder.java | 107 +++++++
.../BusinessUnitSearchResultImpl.java | 98 +++++++
.../project/BusinessUnitIndexingStatus.java | 131 +++++++++
.../project/BusinessUnitSearchStatus.java | 115 ++++++++
...tChangeBusinessUnitSearchStatusAction.java | 131 +++++++++
...BusinessUnitSearchStatusActionBuilder.java | 85 ++++++
...ngeBusinessUnitSearchStatusActionImpl.java | 96 +++++++
.../models/project/ProjectUpdateAction.java | 17 +-
.../project/ProjectUpdateActionBuilder.java | 4 +
.../project/SearchIndexingConfiguration.java | 18 ++
.../SearchIndexingConfigurationBuilder.java | 57 +++-
.../SearchIndexingConfigurationImpl.java | 23 +-
...ssUnitIndexingProgressQueryBuilderDsl.java | 32 +++
...nitPagedSearchResponseQueryBuilderDsl.java | 47 ++++
...IndexingStatusResponseQueryBuilderDsl.java | 50 ++++
...inessUnitSearchRequestQueryBuilderDsl.java | 50 ++++
...sinessUnitSearchResultQueryBuilderDsl.java | 25 ++
...UnitSearchStatusActionQueryBuilderDsl.java | 26 ++
.../ProjectUpdateActionQueryBuilderDsl.java | 8 +
...hIndexingConfigurationQueryBuilderDsl.java | 10 +
...BusinessUnitsSearchIndexingStatusTest.java | 81 ++++++
.../ByProjectKeyBusinessUnitsSearchTest.java | 86 ++++++
.../BusinessUnitIndexingProgressTest.java | 52 ++++
.../BusinessUnitPagedSearchResponseTest.java | 67 +++++
...sUnitSearchIndexingStatusResponseTest.java | 81 ++++++
.../BusinessUnitSearchRequestTest.java | 66 +++++
.../BusinessUnitSearchResultTest.java | 44 +++
...ngeBusinessUnitSearchStatusActionTest.java | 40 +++
.../SearchIndexingConfigurationTest.java | 12 +-
references.txt | 1 +
52 files changed, 4529 insertions(+), 43 deletions(-)
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyBusinessUnitsSearchHead.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyBusinessUnitsSearchIndexingStatusGet.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyBusinessUnitsSearchIndexingStatusRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyBusinessUnitsSearchPost.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyBusinessUnitsSearchPostString.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyBusinessUnitsSearchRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgress.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgressBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgressImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponse.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponseBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponseImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponse.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponseBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponseImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequestImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResult.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResultBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResultImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/BusinessUnitIndexingStatus.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/BusinessUnitSearchStatus.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusAction.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusActionBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusActionImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitIndexingProgressQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitPagedSearchResponseQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitSearchIndexingStatusResponseQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitSearchRequestQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitSearchResultQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/project/ProjectChangeBusinessUnitSearchStatusActionQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyBusinessUnitsSearchIndexingStatusTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyBusinessUnitsSearchTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgressTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponseTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponseTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequestTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResultTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusActionTest.java
diff --git a/changes.md b/changes.md
index 630717f7ed1..9fa5dc98a07 100644
--- a/changes.md
+++ b/changes.md
@@ -3,60 +3,37 @@
Added Resource(s)
-- added resource `/{projectKey}/channels/key={key}`
+- added resource `/{projectKey}/business-units/search`
+- added resource `/{projectKey}/business-units/search/indexing-status`
Added Method(s)
-- added method `apiRoot.withProjectKey().channels().withKey().get()`
-- added method `apiRoot.withProjectKey().channels().withKey().head()`
-- added method `apiRoot.withProjectKey().channels().withKey().post()`
-- added method `apiRoot.withProjectKey().channels().withKey().delete()`
+- added method `apiRoot.withProjectKey().businessUnits().search().post()`
+- added method `apiRoot.withProjectKey().businessUnits().search().head()`
+- added method `apiRoot.withProjectKey().businessUnits().searchIndexingStatus().get()`
Added Type(s)
-- added type `CartDiscountPatternTarget`
-- added type `CountOnCustomLineItemUnits`
-- added type `CountOnLineItemUnits`
-- added type `PatternComponent`
-- added type `ShoppingListLineItemAddedMessage`
-- added type `ShoppingListLineItemRemovedMessage`
-- added type `ShoppingListMessage`
-- added type `ShoppingListLineItemAddedMessagePayload`
-- added type `ShoppingListLineItemRemovedMessagePayload`
-- added type `ShoppingListMessagePayload`
-Added Enum(s)
-
-- added enum `Canceled` to type `ShipmentState`
-- added enum `shopping-list` to type `MessageSubscriptionResourceTypeId`
+- added type `BusinessUnitIndexingProgress`
+- added type `BusinessUnitIndexingStatus`
+- added type `BusinessUnitPagedSearchResponse`
+- added type `BusinessUnitSearchIndexingStatusResponse`
+- added type `BusinessUnitSearchRequest`
+- added type `BusinessUnitSearchResult`
+- added type `BusinessUnitSearchStatus`
+- added type `ProjectChangeBusinessUnitSearchStatusAction`
Added Property(s)
-- added property `applicationMode` to type `CartDiscountValueFixed`
-- added property `applicationMode` to type `CartDiscountValueFixedDraft`
-- added property `custom` to type `CartSetCustomShippingMethodAction`
-- added property `custom` to type `StagedOrderSetCustomShippingMethodAction`
-- added property `custom` to type `StagedOrderSetShippingAddressAndCustomShippingMethodAction`
-Added Type(s)
-
-- added type `ChangeTargetPatternChangeValue`
-- added type `PatternComponent`
+- added property `businessUnits` to type `SearchIndexingConfiguration`
Checks whether a search index of Business Units exists for a Project. Returns a 200 OK
if an index exists; otherwise, returns a 409 Conflict
.
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .businessUnits()
+ * .search()
+ * .head()
+ * .execute()
+ * }
+ * Returns the indexing status of the Business Unit Search for a Project.
+ * + *{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .businessUnits()
+ * .searchIndexingStatus()
+ * .get()
+ * .execute()
+ * }
+ * If the initial indexing is in progress or the feature is inactive, A SearchNotReady error is returned. If inactive, you can reactivate it.
+ * + *{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .businessUnits()
+ * .search()
+ * .post(null)
+ * .execute()
+ * }
+ * If the initial indexing is in progress or the feature is inactive, A SearchNotReady error is returned. If inactive, you can reactivate it.
+ * + *{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .businessUnits()
+ * .search()
+ * .post("")
+ * .execute()
+ * }
+ *
+ * BusinessUnitIndexingProgress businessUnitIndexingProgress = BusinessUnitIndexingProgress.builder()
+ * .indexed(0.3)
+ * .failed(0.3)
+ * .estimatedTotal(0.3)
+ * .build()
+ *
+ * The number of Business Units successfully indexed.
+ * @return indexed + */ + @NotNull + @JsonProperty("indexed") + public Integer getIndexed(); + + /** + *The number of Business Units that failed to be indexed.
+ * @return failed + */ + @NotNull + @JsonProperty("failed") + public Integer getFailed(); + + /** + *The estimated total number of Business Units to be indexed.
+ * @return estimatedTotal + */ + @NotNull + @JsonProperty("estimatedTotal") + public Integer getEstimatedTotal(); + + /** + *The number of Business Units successfully indexed.
+ * @param indexed value to be set + */ + + public void setIndexed(final Integer indexed); + + /** + *The number of Business Units that failed to be indexed.
+ * @param failed value to be set + */ + + public void setFailed(final Integer failed); + + /** + *The estimated total number of Business Units to be indexed.
+ * @param estimatedTotal value to be set + */ + + public void setEstimatedTotal(final Integer estimatedTotal); + + /** + * factory method + * @return instance of BusinessUnitIndexingProgress + */ + public static BusinessUnitIndexingProgress of() { + return new BusinessUnitIndexingProgressImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitIndexingProgress + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitIndexingProgress of(final BusinessUnitIndexingProgress template) { + BusinessUnitIndexingProgressImpl instance = new BusinessUnitIndexingProgressImpl(); + instance.setIndexed(template.getIndexed()); + instance.setFailed(template.getFailed()); + instance.setEstimatedTotal(template.getEstimatedTotal()); + return instance; + } + + /** + * factory method to create a deep copy of BusinessUnitIndexingProgress + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitIndexingProgress deepCopy(@Nullable final BusinessUnitIndexingProgress template) { + if (template == null) { + return null; + } + BusinessUnitIndexingProgressImpl instance = new BusinessUnitIndexingProgressImpl(); + instance.setIndexed(template.getIndexed()); + instance.setFailed(template.getFailed()); + instance.setEstimatedTotal(template.getEstimatedTotal()); + return instance; + } + + /** + * builder factory method for BusinessUnitIndexingProgress + * @return builder + */ + public static BusinessUnitIndexingProgressBuilder builder() { + return BusinessUnitIndexingProgressBuilder.of(); + } + + /** + * create builder for BusinessUnitIndexingProgress instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitIndexingProgressBuilder builder(final BusinessUnitIndexingProgress template) { + return BusinessUnitIndexingProgressBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * BusinessUnitIndexingProgress businessUnitIndexingProgress = BusinessUnitIndexingProgress.builder()
+ * .indexed(0.3)
+ * .failed(0.3)
+ * .estimatedTotal(0.3)
+ * .build()
+ *
+ * The number of Business Units successfully indexed.
+ * @param indexed value to be set + * @return Builder + */ + + public BusinessUnitIndexingProgressBuilder indexed(final Integer indexed) { + this.indexed = indexed; + return this; + } + + /** + *The number of Business Units that failed to be indexed.
+ * @param failed value to be set + * @return Builder + */ + + public BusinessUnitIndexingProgressBuilder failed(final Integer failed) { + this.failed = failed; + return this; + } + + /** + *The estimated total number of Business Units to be indexed.
+ * @param estimatedTotal value to be set + * @return Builder + */ + + public BusinessUnitIndexingProgressBuilder estimatedTotal(final Integer estimatedTotal) { + this.estimatedTotal = estimatedTotal; + return this; + } + + /** + *The number of Business Units successfully indexed.
+ * @return indexed + */ + + public Integer getIndexed() { + return this.indexed; + } + + /** + *The number of Business Units that failed to be indexed.
+ * @return failed + */ + + public Integer getFailed() { + return this.failed; + } + + /** + *The estimated total number of Business Units to be indexed.
+ * @return estimatedTotal + */ + + public Integer getEstimatedTotal() { + return this.estimatedTotal; + } + + /** + * builds BusinessUnitIndexingProgress with checking for non-null required values + * @return BusinessUnitIndexingProgress + */ + public BusinessUnitIndexingProgress build() { + Objects.requireNonNull(indexed, BusinessUnitIndexingProgress.class + ": indexed is missing"); + Objects.requireNonNull(failed, BusinessUnitIndexingProgress.class + ": failed is missing"); + Objects.requireNonNull(estimatedTotal, BusinessUnitIndexingProgress.class + ": estimatedTotal is missing"); + return new BusinessUnitIndexingProgressImpl(indexed, failed, estimatedTotal); + } + + /** + * builds BusinessUnitIndexingProgress without checking for non-null required values + * @return BusinessUnitIndexingProgress + */ + public BusinessUnitIndexingProgress buildUnchecked() { + return new BusinessUnitIndexingProgressImpl(indexed, failed, estimatedTotal); + } + + /** + * factory method for an instance of BusinessUnitIndexingProgressBuilder + * @return builder + */ + public static BusinessUnitIndexingProgressBuilder of() { + return new BusinessUnitIndexingProgressBuilder(); + } + + /** + * create builder for BusinessUnitIndexingProgress instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitIndexingProgressBuilder of(final BusinessUnitIndexingProgress template) { + BusinessUnitIndexingProgressBuilder builder = new BusinessUnitIndexingProgressBuilder(); + builder.indexed = template.getIndexed(); + builder.failed = template.getFailed(); + builder.estimatedTotal = template.getEstimatedTotal(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgressImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgressImpl.java new file mode 100644 index 00000000000..fb8ab6fde6b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitIndexingProgressImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.api.models.business_unit_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; + +/** + * BusinessUnitIndexingProgress + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitIndexingProgressImpl implements BusinessUnitIndexingProgress, ModelBase { + + private Integer indexed; + + private Integer failed; + + private Integer estimatedTotal; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitIndexingProgressImpl(@JsonProperty("indexed") final Integer indexed, + @JsonProperty("failed") final Integer failed, + @JsonProperty("estimatedTotal") final Integer estimatedTotal) { + this.indexed = indexed; + this.failed = failed; + this.estimatedTotal = estimatedTotal; + } + + /** + * create empty instance + */ + public BusinessUnitIndexingProgressImpl() { + } + + /** + *The number of Business Units successfully indexed.
+ */ + + public Integer getIndexed() { + return this.indexed; + } + + /** + *The number of Business Units that failed to be indexed.
+ */ + + public Integer getFailed() { + return this.failed; + } + + /** + *The estimated total number of Business Units to be indexed.
+ */ + + public Integer getEstimatedTotal() { + return this.estimatedTotal; + } + + public void setIndexed(final Integer indexed) { + this.indexed = indexed; + } + + public void setFailed(final Integer failed) { + this.failed = failed; + } + + public void setEstimatedTotal(final Integer estimatedTotal) { + this.estimatedTotal = estimatedTotal; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitIndexingProgressImpl that = (BusinessUnitIndexingProgressImpl) o; + + return new EqualsBuilder().append(indexed, that.indexed) + .append(failed, that.failed) + .append(estimatedTotal, that.estimatedTotal) + .append(indexed, that.indexed) + .append(failed, that.failed) + .append(estimatedTotal, that.estimatedTotal) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(indexed).append(failed).append(estimatedTotal).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("indexed", indexed) + .append("failed", failed) + .append("estimatedTotal", estimatedTotal) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponse.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponse.java new file mode 100644 index 00000000000..0f9b4c511fc --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitPagedSearchResponse.java @@ -0,0 +1,191 @@ + +package com.commercetools.api.models.business_unit_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + * BusinessUnitPagedSearchResponse + * + *
+ * BusinessUnitPagedSearchResponse businessUnitPagedSearchResponse = BusinessUnitPagedSearchResponse.builder()
+ * .total(0.3)
+ * .limit(0.3)
+ * .offset(0.3)
+ * .plusResults(resultsBuilder -> resultsBuilder)
+ * .build()
+ *
+ * Total number of results matching the query.
+ * @return total + */ + @NotNull + @JsonProperty("total") + public Long getTotal(); + + /** + *Number of results requested.
+ * @return limit + */ + @NotNull + @JsonProperty("limit") + public Integer getLimit(); + + /** + *Number of elements skipped.
+ * @return offset + */ + @NotNull + @JsonProperty("offset") + public Integer getOffset(); + + /** + *Search result containing the Business Units matching the search query.
+ * @return results + */ + @NotNull + @Valid + @JsonProperty("results") + public ListTotal number of results matching the query.
+ * @param total value to be set + */ + + public void setTotal(final Long total); + + /** + *Number of results requested.
+ * @param limit value to be set + */ + + public void setLimit(final Integer limit); + + /** + *Number of elements skipped.
+ * @param offset value to be set + */ + + public void setOffset(final Integer offset); + + /** + *Search result containing the Business Units matching the search query.
+ * @param results values to be set + */ + + @JsonIgnore + public void setResults(final BusinessUnitSearchResult... results); + + /** + *Search result containing the Business Units matching the search query.
+ * @param results values to be set + */ + + public void setResults(final List
+ * BusinessUnitPagedSearchResponse businessUnitPagedSearchResponse = BusinessUnitPagedSearchResponse.builder()
+ * .total(0.3)
+ * .limit(0.3)
+ * .offset(0.3)
+ * .plusResults(resultsBuilder -> resultsBuilder)
+ * .build()
+ *
+ * Total number of results matching the query.
+ * @param total value to be set + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder total(final Long total) { + this.total = total; + return this; + } + + /** + *Number of results requested.
+ * @param limit value to be set + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder limit(final Integer limit) { + this.limit = limit; + return this; + } + + /** + *Number of elements skipped.
+ * @param offset value to be set + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder offset(final Integer offset) { + this.offset = offset; + return this; + } + + /** + *Search result containing the Business Units matching the search query.
+ * @param results value to be set + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder results( + final com.commercetools.api.models.business_unit_search.BusinessUnitSearchResult... results) { + this.results = new ArrayList<>(Arrays.asList(results)); + return this; + } + + /** + *Search result containing the Business Units matching the search query.
+ * @param results value to be set + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder results( + final java.util.ListSearch result containing the Business Units matching the search query.
+ * @param results value to be set + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder plusResults( + final com.commercetools.api.models.business_unit_search.BusinessUnitSearchResult... results) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.addAll(Arrays.asList(results)); + return this; + } + + /** + *Search result containing the Business Units matching the search query.
+ * @param builder function to build the results value + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder plusResults( + FunctionSearch result containing the Business Units matching the search query.
+ * @param builder function to build the results value + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder withResults( + FunctionSearch result containing the Business Units matching the search query.
+ * @param builder function to build the results value + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder addResults( + FunctionSearch result containing the Business Units matching the search query.
+ * @param builder function to build the results value + * @return Builder + */ + + public BusinessUnitPagedSearchResponseBuilder setResults( + FunctionTotal number of results matching the query.
+ * @return total + */ + + public Long getTotal() { + return this.total; + } + + /** + *Number of results requested.
+ * @return limit + */ + + public Integer getLimit() { + return this.limit; + } + + /** + *Number of elements skipped.
+ * @return offset + */ + + public Integer getOffset() { + return this.offset; + } + + /** + *Search result containing the Business Units matching the search query.
+ * @return results + */ + + public java.util.ListTotal number of results matching the query.
+ */ + + public Long getTotal() { + return this.total; + } + + /** + *Number of results requested.
+ */ + + public Integer getLimit() { + return this.limit; + } + + /** + *Number of elements skipped.
+ */ + + public Integer getOffset() { + return this.offset; + } + + /** + *Search result containing the Business Units matching the search query.
+ */ + + public java.util.List
+ * BusinessUnitSearchIndexingStatusResponse businessUnitSearchIndexingStatusResponse = BusinessUnitSearchIndexingStatusResponse.builder()
+ * .status(BusinessUnitIndexingStatus.SCHEDULED)
+ * .build()
+ *
+ * Current status of indexing the Business Unit Search.
+ * @return status + */ + @NotNull + @JsonProperty("status") + public BusinessUnitIndexingStatus getStatus(); + + /** + *Progress of indexing. Only available when indexing is in progress.
+ * @return states + */ + @Valid + @JsonProperty("states") + public BusinessUnitIndexingProgress getStates(); + + /** + *Date and time (UTC) when the last indexing started.
+ * @return startedAt + */ + + @JsonProperty("startedAt") + public ZonedDateTime getStartedAt(); + + /** + *Time when the status was last modified.
+ * @return lastModifiedAt + */ + + @JsonProperty("lastModifiedAt") + public ZonedDateTime getLastModifiedAt(); + + /** + *Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.
+ * @return retryCount + */ + + @JsonProperty("retryCount") + public Integer getRetryCount(); + + /** + *Current status of indexing the Business Unit Search.
+ * @param status value to be set + */ + + public void setStatus(final BusinessUnitIndexingStatus status); + + /** + *Progress of indexing. Only available when indexing is in progress.
+ * @param states value to be set + */ + + public void setStates(final BusinessUnitIndexingProgress states); + + /** + *Date and time (UTC) when the last indexing started.
+ * @param startedAt value to be set + */ + + public void setStartedAt(final ZonedDateTime startedAt); + + /** + *Time when the status was last modified.
+ * @param lastModifiedAt value to be set + */ + + public void setLastModifiedAt(final ZonedDateTime lastModifiedAt); + + /** + *Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.
+ * @param retryCount value to be set + */ + + public void setRetryCount(final Integer retryCount); + + /** + * factory method + * @return instance of BusinessUnitSearchIndexingStatusResponse + */ + public static BusinessUnitSearchIndexingStatusResponse of() { + return new BusinessUnitSearchIndexingStatusResponseImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitSearchIndexingStatusResponse + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitSearchIndexingStatusResponse of(final BusinessUnitSearchIndexingStatusResponse template) { + BusinessUnitSearchIndexingStatusResponseImpl instance = new BusinessUnitSearchIndexingStatusResponseImpl(); + instance.setStatus(template.getStatus()); + instance.setStates(template.getStates()); + instance.setStartedAt(template.getStartedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRetryCount(template.getRetryCount()); + return instance; + } + + /** + * factory method to create a deep copy of BusinessUnitSearchIndexingStatusResponse + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitSearchIndexingStatusResponse deepCopy( + @Nullable final BusinessUnitSearchIndexingStatusResponse template) { + if (template == null) { + return null; + } + BusinessUnitSearchIndexingStatusResponseImpl instance = new BusinessUnitSearchIndexingStatusResponseImpl(); + instance.setStatus(template.getStatus()); + instance.setStates(com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress + .deepCopy(template.getStates())); + instance.setStartedAt(template.getStartedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setRetryCount(template.getRetryCount()); + return instance; + } + + /** + * builder factory method for BusinessUnitSearchIndexingStatusResponse + * @return builder + */ + public static BusinessUnitSearchIndexingStatusResponseBuilder builder() { + return BusinessUnitSearchIndexingStatusResponseBuilder.of(); + } + + /** + * create builder for BusinessUnitSearchIndexingStatusResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitSearchIndexingStatusResponseBuilder builder( + final BusinessUnitSearchIndexingStatusResponse template) { + return BusinessUnitSearchIndexingStatusResponseBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * BusinessUnitSearchIndexingStatusResponse businessUnitSearchIndexingStatusResponse = BusinessUnitSearchIndexingStatusResponse.builder()
+ * .status(BusinessUnitIndexingStatus.SCHEDULED)
+ * .build()
+ *
+ * Current status of indexing the Business Unit Search.
+ * @param status value to be set + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder status( + final com.commercetools.api.models.project.BusinessUnitIndexingStatus status) { + this.status = status; + return this; + } + + /** + *Progress of indexing. Only available when indexing is in progress.
+ * @param builder function to build the states value + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder states( + FunctionProgress of indexing. Only available when indexing is in progress.
+ * @param builder function to build the states value + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder withStates( + FunctionProgress of indexing. Only available when indexing is in progress.
+ * @param states value to be set + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder states( + @Nullable final com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress states) { + this.states = states; + return this; + } + + /** + *Date and time (UTC) when the last indexing started.
+ * @param startedAt value to be set + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder startedAt( + @Nullable final java.time.ZonedDateTime startedAt) { + this.startedAt = startedAt; + return this; + } + + /** + *Time when the status was last modified.
+ * @param lastModifiedAt value to be set + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder lastModifiedAt( + @Nullable final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + return this; + } + + /** + *Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.
+ * @param retryCount value to be set + * @return Builder + */ + + public BusinessUnitSearchIndexingStatusResponseBuilder retryCount(@Nullable final Integer retryCount) { + this.retryCount = retryCount; + return this; + } + + /** + *Current status of indexing the Business Unit Search.
+ * @return status + */ + + public com.commercetools.api.models.project.BusinessUnitIndexingStatus getStatus() { + return this.status; + } + + /** + *Progress of indexing. Only available when indexing is in progress.
+ * @return states + */ + + @Nullable + public com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress getStates() { + return this.states; + } + + /** + *Date and time (UTC) when the last indexing started.
+ * @return startedAt + */ + + @Nullable + public java.time.ZonedDateTime getStartedAt() { + return this.startedAt; + } + + /** + *Time when the status was last modified.
+ * @return lastModifiedAt + */ + + @Nullable + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.
+ * @return retryCount + */ + + @Nullable + public Integer getRetryCount() { + return this.retryCount; + } + + /** + * builds BusinessUnitSearchIndexingStatusResponse with checking for non-null required values + * @return BusinessUnitSearchIndexingStatusResponse + */ + public BusinessUnitSearchIndexingStatusResponse build() { + Objects.requireNonNull(status, BusinessUnitSearchIndexingStatusResponse.class + ": status is missing"); + return new BusinessUnitSearchIndexingStatusResponseImpl(status, states, startedAt, lastModifiedAt, retryCount); + } + + /** + * builds BusinessUnitSearchIndexingStatusResponse without checking for non-null required values + * @return BusinessUnitSearchIndexingStatusResponse + */ + public BusinessUnitSearchIndexingStatusResponse buildUnchecked() { + return new BusinessUnitSearchIndexingStatusResponseImpl(status, states, startedAt, lastModifiedAt, retryCount); + } + + /** + * factory method for an instance of BusinessUnitSearchIndexingStatusResponseBuilder + * @return builder + */ + public static BusinessUnitSearchIndexingStatusResponseBuilder of() { + return new BusinessUnitSearchIndexingStatusResponseBuilder(); + } + + /** + * create builder for BusinessUnitSearchIndexingStatusResponse instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitSearchIndexingStatusResponseBuilder of( + final BusinessUnitSearchIndexingStatusResponse template) { + BusinessUnitSearchIndexingStatusResponseBuilder builder = new BusinessUnitSearchIndexingStatusResponseBuilder(); + builder.status = template.getStatus(); + builder.states = template.getStates(); + builder.startedAt = template.getStartedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.retryCount = template.getRetryCount(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponseImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponseImpl.java new file mode 100644 index 00000000000..e235338f527 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchIndexingStatusResponseImpl.java @@ -0,0 +1,162 @@ + +package com.commercetools.api.models.business_unit_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; + +/** + * BusinessUnitSearchIndexingStatusResponse + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitSearchIndexingStatusResponseImpl + implements BusinessUnitSearchIndexingStatusResponse, ModelBase { + + private com.commercetools.api.models.project.BusinessUnitIndexingStatus status; + + private com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress states; + + private java.time.ZonedDateTime startedAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private Integer retryCount; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitSearchIndexingStatusResponseImpl( + @JsonProperty("status") final com.commercetools.api.models.project.BusinessUnitIndexingStatus status, + @JsonProperty("states") final com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress states, + @JsonProperty("startedAt") final java.time.ZonedDateTime startedAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("retryCount") final Integer retryCount) { + this.status = status; + this.states = states; + this.startedAt = startedAt; + this.lastModifiedAt = lastModifiedAt; + this.retryCount = retryCount; + } + + /** + * create empty instance + */ + public BusinessUnitSearchIndexingStatusResponseImpl() { + } + + /** + *Current status of indexing the Business Unit Search.
+ */ + + public com.commercetools.api.models.project.BusinessUnitIndexingStatus getStatus() { + return this.status; + } + + /** + *Progress of indexing. Only available when indexing is in progress.
+ */ + + public com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress getStates() { + return this.states; + } + + /** + *Date and time (UTC) when the last indexing started.
+ */ + + public java.time.ZonedDateTime getStartedAt() { + return this.startedAt; + } + + /** + *Time when the status was last modified.
+ */ + + public java.time.ZonedDateTime getLastModifiedAt() { + return this.lastModifiedAt; + } + + /** + *Indicates how many times the system tried to start indexing after failed attempts. The counter is set to null after an indexing finished successfully.
+ */ + + public Integer getRetryCount() { + return this.retryCount; + } + + public void setStatus(final com.commercetools.api.models.project.BusinessUnitIndexingStatus status) { + this.status = status; + } + + public void setStates(final com.commercetools.api.models.business_unit_search.BusinessUnitIndexingProgress states) { + this.states = states; + } + + public void setStartedAt(final java.time.ZonedDateTime startedAt) { + this.startedAt = startedAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setRetryCount(final Integer retryCount) { + this.retryCount = retryCount; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitSearchIndexingStatusResponseImpl that = (BusinessUnitSearchIndexingStatusResponseImpl) o; + + return new EqualsBuilder().append(status, that.status) + .append(states, that.states) + .append(startedAt, that.startedAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(retryCount, that.retryCount) + .append(status, that.status) + .append(states, that.states) + .append(startedAt, that.startedAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(retryCount, that.retryCount) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(status) + .append(states) + .append(startedAt) + .append(lastModifiedAt) + .append(retryCount) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("status", status) + .append("states", states) + .append("startedAt", startedAt) + .append("lastModifiedAt", lastModifiedAt) + .append("retryCount", retryCount) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequest.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequest.java new file mode 100644 index 00000000000..22d2b1e740e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequest.java @@ -0,0 +1,187 @@ + +package com.commercetools.api.models.business_unit_search; + +import java.time.*; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.search.SearchQuery; +import com.commercetools.api.models.search.SearchSorting; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; + +/** + * BusinessUnitSearchRequest + * + *
+ * BusinessUnitSearchRequest businessUnitSearchRequest = BusinessUnitSearchRequest.builder()
+ * .build()
+ *
+ * The Business Unit Search query.
+ * @return query + */ + @Valid + @JsonProperty("query") + public SearchQuery getQuery(); + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @return sort + */ + @Valid + @JsonProperty("sort") + public ListThe maximum number of search results to be returned.
+ * @return limit + */ + + @JsonProperty("limit") + public Integer getLimit(); + + /** + *The number of search results to be skipped in the response for pagination.
+ * @return offset + */ + + @JsonProperty("offset") + public Integer getOffset(); + + /** + *The Business Unit Search query.
+ * @param query value to be set + */ + + public void setQuery(final SearchQuery query); + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param sort values to be set + */ + + @JsonIgnore + public void setSort(final SearchSorting... sort); + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param sort values to be set + */ + + public void setSort(final ListThe maximum number of search results to be returned.
+ * @param limit value to be set + */ + + public void setLimit(final Integer limit); + + /** + *The number of search results to be skipped in the response for pagination.
+ * @param offset value to be set + */ + + public void setOffset(final Integer offset); + + /** + * factory method + * @return instance of BusinessUnitSearchRequest + */ + public static BusinessUnitSearchRequest of() { + return new BusinessUnitSearchRequestImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitSearchRequest + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitSearchRequest of(final BusinessUnitSearchRequest template) { + BusinessUnitSearchRequestImpl instance = new BusinessUnitSearchRequestImpl(); + instance.setQuery(template.getQuery()); + instance.setSort(template.getSort()); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + return instance; + } + + /** + * factory method to create a deep copy of BusinessUnitSearchRequest + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitSearchRequest deepCopy(@Nullable final BusinessUnitSearchRequest template) { + if (template == null) { + return null; + } + BusinessUnitSearchRequestImpl instance = new BusinessUnitSearchRequestImpl(); + instance.setQuery(com.commercetools.api.models.search.SearchQuery.deepCopy(template.getQuery())); + instance.setSort(Optional.ofNullable(template.getSort()) + .map(t -> t.stream() + .map(com.commercetools.api.models.search.SearchSorting::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); + instance.setLimit(template.getLimit()); + instance.setOffset(template.getOffset()); + return instance; + } + + /** + * builder factory method for BusinessUnitSearchRequest + * @return builder + */ + public static BusinessUnitSearchRequestBuilder builder() { + return BusinessUnitSearchRequestBuilder.of(); + } + + /** + * create builder for BusinessUnitSearchRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitSearchRequestBuilder builder(final BusinessUnitSearchRequest template) { + return BusinessUnitSearchRequestBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * BusinessUnitSearchRequest businessUnitSearchRequest = BusinessUnitSearchRequest.builder()
+ * .build()
+ *
+ * The Business Unit Search query.
+ * @param builder function to build the query value + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder query( + FunctionThe Business Unit Search query.
+ * @param builder function to build the query value + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder withQuery( + FunctionThe Business Unit Search query.
+ * @param query value to be set + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder query( + @Nullable final com.commercetools.api.models.search.SearchQuery query) { + this.query = query; + return this; + } + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param sort value to be set + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder sort( + @Nullable final com.commercetools.api.models.search.SearchSorting... sort) { + this.sort = new ArrayList<>(Arrays.asList(sort)); + return this; + } + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param sort value to be set + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder sort( + @Nullable final java.util.ListControls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param sort value to be set + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder plusSort( + @Nullable final com.commercetools.api.models.search.SearchSorting... sort) { + if (this.sort == null) { + this.sort = new ArrayList<>(); + } + this.sort.addAll(Arrays.asList(sort)); + return this; + } + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param builder function to build the sort value + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder plusSort( + FunctionControls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param builder function to build the sort value + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder withSort( + FunctionControls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param builder function to build the sort value + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder addSort( + FunctionControls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @param builder function to build the sort value + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder setSort( + FunctionThe maximum number of search results to be returned.
+ * @param limit value to be set + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder limit(@Nullable final Integer limit) { + this.limit = limit; + return this; + } + + /** + *The number of search results to be skipped in the response for pagination.
+ * @param offset value to be set + * @return Builder + */ + + public BusinessUnitSearchRequestBuilder offset(@Nullable final Integer offset) { + this.offset = offset; + return this; + } + + /** + *The Business Unit Search query.
+ * @return query + */ + + @Nullable + public com.commercetools.api.models.search.SearchQuery getQuery() { + return this.query; + } + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ * @return sort + */ + + @Nullable + public java.util.ListThe maximum number of search results to be returned.
+ * @return limit + */ + + @Nullable + public Integer getLimit() { + return this.limit; + } + + /** + *The number of search results to be skipped in the response for pagination.
+ * @return offset + */ + + @Nullable + public Integer getOffset() { + return this.offset; + } + + /** + * builds BusinessUnitSearchRequest with checking for non-null required values + * @return BusinessUnitSearchRequest + */ + public BusinessUnitSearchRequest build() { + return new BusinessUnitSearchRequestImpl(query, sort, limit, offset); + } + + /** + * builds BusinessUnitSearchRequest without checking for non-null required values + * @return BusinessUnitSearchRequest + */ + public BusinessUnitSearchRequest buildUnchecked() { + return new BusinessUnitSearchRequestImpl(query, sort, limit, offset); + } + + /** + * factory method for an instance of BusinessUnitSearchRequestBuilder + * @return builder + */ + public static BusinessUnitSearchRequestBuilder of() { + return new BusinessUnitSearchRequestBuilder(); + } + + /** + * create builder for BusinessUnitSearchRequest instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitSearchRequestBuilder of(final BusinessUnitSearchRequest template) { + BusinessUnitSearchRequestBuilder builder = new BusinessUnitSearchRequestBuilder(); + builder.query = template.getQuery(); + builder.sort = template.getSort(); + builder.limit = template.getLimit(); + builder.offset = template.getOffset(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequestImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequestImpl.java new file mode 100644 index 00000000000..ef9c91c90a3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchRequestImpl.java @@ -0,0 +1,139 @@ + +package com.commercetools.api.models.business_unit_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; + +/** + * BusinessUnitSearchRequest + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitSearchRequestImpl implements BusinessUnitSearchRequest, ModelBase { + + private com.commercetools.api.models.search.SearchQuery query; + + private java.util.ListThe Business Unit Search query.
+ */ + + public com.commercetools.api.models.search.SearchQuery getQuery() { + return this.query; + } + + /** + *Controls how results to your query are sorted. If not provided, the results are sorted by relevance in descending order.
+ */ + + public java.util.ListThe maximum number of search results to be returned.
+ */ + + public Integer getLimit() { + return this.limit; + } + + /** + *The number of search results to be skipped in the response for pagination.
+ */ + + public Integer getOffset() { + return this.offset; + } + + public void setQuery(final com.commercetools.api.models.search.SearchQuery query) { + this.query = query; + } + + public void setSort(final com.commercetools.api.models.search.SearchSorting... sort) { + this.sort = new ArrayList<>(Arrays.asList(sort)); + } + + public void setSort(final java.util.List
+ * BusinessUnitSearchResult businessUnitSearchResult = BusinessUnitSearchResult.builder()
+ * .id("{id}")
+ * .relevance(0.3)
+ * .build()
+ *
+ * id
of the BusinessUnit matching the search query.
How closely this customer matches the search query.
+ * @return relevance + */ + @NotNull + @JsonProperty("relevance") + public Double getRelevance(); + + /** + *id
of the BusinessUnit matching the search query.
How closely this customer matches the search query.
+ * @param relevance value to be set + */ + + public void setRelevance(final Double relevance); + + /** + * factory method + * @return instance of BusinessUnitSearchResult + */ + public static BusinessUnitSearchResult of() { + return new BusinessUnitSearchResultImpl(); + } + + /** + * factory method to create a shallow copy BusinessUnitSearchResult + * @param template instance to be copied + * @return copy instance + */ + public static BusinessUnitSearchResult of(final BusinessUnitSearchResult template) { + BusinessUnitSearchResultImpl instance = new BusinessUnitSearchResultImpl(); + instance.setId(template.getId()); + instance.setRelevance(template.getRelevance()); + return instance; + } + + /** + * factory method to create a deep copy of BusinessUnitSearchResult + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static BusinessUnitSearchResult deepCopy(@Nullable final BusinessUnitSearchResult template) { + if (template == null) { + return null; + } + BusinessUnitSearchResultImpl instance = new BusinessUnitSearchResultImpl(); + instance.setId(template.getId()); + instance.setRelevance(template.getRelevance()); + return instance; + } + + /** + * builder factory method for BusinessUnitSearchResult + * @return builder + */ + public static BusinessUnitSearchResultBuilder builder() { + return BusinessUnitSearchResultBuilder.of(); + } + + /** + * create builder for BusinessUnitSearchResult instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitSearchResultBuilder builder(final BusinessUnitSearchResult template) { + return BusinessUnitSearchResultBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * BusinessUnitSearchResult businessUnitSearchResult = BusinessUnitSearchResult.builder()
+ * .id("{id}")
+ * .relevance(0.3)
+ * .build()
+ *
+ * id
of the BusinessUnit matching the search query.
How closely this customer matches the search query.
+ * @param relevance value to be set + * @return Builder + */ + + public BusinessUnitSearchResultBuilder relevance(final Double relevance) { + this.relevance = relevance; + return this; + } + + /** + *id
of the BusinessUnit matching the search query.
How closely this customer matches the search query.
+ * @return relevance + */ + + public Double getRelevance() { + return this.relevance; + } + + /** + * builds BusinessUnitSearchResult with checking for non-null required values + * @return BusinessUnitSearchResult + */ + public BusinessUnitSearchResult build() { + Objects.requireNonNull(id, BusinessUnitSearchResult.class + ": id is missing"); + Objects.requireNonNull(relevance, BusinessUnitSearchResult.class + ": relevance is missing"); + return new BusinessUnitSearchResultImpl(id, relevance); + } + + /** + * builds BusinessUnitSearchResult without checking for non-null required values + * @return BusinessUnitSearchResult + */ + public BusinessUnitSearchResult buildUnchecked() { + return new BusinessUnitSearchResultImpl(id, relevance); + } + + /** + * factory method for an instance of BusinessUnitSearchResultBuilder + * @return builder + */ + public static BusinessUnitSearchResultBuilder of() { + return new BusinessUnitSearchResultBuilder(); + } + + /** + * create builder for BusinessUnitSearchResult instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static BusinessUnitSearchResultBuilder of(final BusinessUnitSearchResult template) { + BusinessUnitSearchResultBuilder builder = new BusinessUnitSearchResultBuilder(); + builder.id = template.getId(); + builder.relevance = template.getRelevance(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResultImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResultImpl.java new file mode 100644 index 00000000000..79141a1be0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/business_unit_search/BusinessUnitSearchResultImpl.java @@ -0,0 +1,98 @@ + +package com.commercetools.api.models.business_unit_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; + +/** + * BusinessUnitSearchResult + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class BusinessUnitSearchResultImpl implements BusinessUnitSearchResult, ModelBase { + + private String id; + + private Double relevance; + + /** + * create instance with all properties + */ + @JsonCreator + BusinessUnitSearchResultImpl(@JsonProperty("id") final String id, + @JsonProperty("relevance") final Double relevance) { + this.id = id; + this.relevance = relevance; + } + + /** + * create empty instance + */ + public BusinessUnitSearchResultImpl() { + } + + /** + *id
of the BusinessUnit matching the search query.
How closely this customer matches the search query.
+ */ + + public Double getRelevance() { + return this.relevance; + } + + public void setId(final String id) { + this.id = id; + } + + public void setRelevance(final Double relevance) { + this.relevance = relevance; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + BusinessUnitSearchResultImpl that = (BusinessUnitSearchResultImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(relevance, that.relevance) + .append(id, that.id) + .append(relevance, that.relevance) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id).append(relevance).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("relevance", relevance) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/BusinessUnitIndexingStatus.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/BusinessUnitIndexingStatus.java new file mode 100644 index 00000000000..4ff4e739a77 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/BusinessUnitIndexingStatus.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.project; + +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; + +/** + *The current indexing status of Business Unit Search.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitIndexingStatus extends JsonEnum { + + /** +Indexing is scheduled.
*/ + BusinessUnitIndexingStatus SCHEDULED = BusinessUnitIndexingStatusEnum.SCHEDULED; + /** +Indexing is in progress.
*/ + BusinessUnitIndexingStatus INDEXING = BusinessUnitIndexingStatusEnum.INDEXING; + /** +Indexing is complete and the Search Business Units endpoint returns up-to-date results.
*/ + BusinessUnitIndexingStatus READY = BusinessUnitIndexingStatusEnum.READY; + /** +Indexing failed due to an internal error.
*/ + BusinessUnitIndexingStatus FAILED = BusinessUnitIndexingStatusEnum.FAILED; + + /** + * possible values of BusinessUnitIndexingStatus + */ + enum BusinessUnitIndexingStatusEnum implements BusinessUnitIndexingStatus { + /** + * Scheduled + */ + SCHEDULED("Scheduled"), + + /** + * Indexing + */ + INDEXING("Indexing"), + + /** + * Ready + */ + READY("Ready"), + + /** + * Failed + */ + FAILED("Failed"); + private final String jsonName; + + private BusinessUnitIndexingStatusEnum(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 BusinessUnitIndexingStatus + * 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 BusinessUnitIndexingStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitIndexingStatus() { + @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 OptionalSpecifies the status of the Business Unit Search index. You can change the status using the Change Business Unit Search Status update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public interface BusinessUnitSearchStatus extends JsonEnum { + + /** +indicates that the Business Unit Search feature is fully operational.
*/ + BusinessUnitSearchStatus ACTIVATED = BusinessUnitSearchStatusEnum.ACTIVATED; + /** +indicates that the Business Unit Search feature is currently not active.
*/ + BusinessUnitSearchStatus DEACTIVATED = BusinessUnitSearchStatusEnum.DEACTIVATED; + + /** + * possible values of BusinessUnitSearchStatus + */ + enum BusinessUnitSearchStatusEnum implements BusinessUnitSearchStatus { + /** + * Activated + */ + ACTIVATED("Activated"), + + /** + * Deactivated + */ + DEACTIVATED("Deactivated"); + private final String jsonName; + + private BusinessUnitSearchStatusEnum(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 BusinessUnitSearchStatus + * 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 BusinessUnitSearchStatus findEnum(String value) { + return findEnumViaJsonName(value).orElse(new BusinessUnitSearchStatus() { + @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
+ * ProjectChangeBusinessUnitSearchStatusAction projectChangeBusinessUnitSearchStatusAction = ProjectChangeBusinessUnitSearchStatusAction.builder()
+ * .status(BusinessUnitSearchStatus.ACTIVATED)
+ * .build()
+ *
+ * Activates or deactivates the Search Business Units feature. Activation will trigger building a search index for the Business Units in the Project.
+ * @return status + */ + @NotNull + @JsonProperty("status") + public BusinessUnitSearchStatus getStatus(); + + /** + *Activates or deactivates the Search Business Units feature. Activation will trigger building a search index for the Business Units in the Project.
+ * @param status value to be set + */ + + public void setStatus(final BusinessUnitSearchStatus status); + + /** + * factory method + * @return instance of ProjectChangeBusinessUnitSearchStatusAction + */ + public static ProjectChangeBusinessUnitSearchStatusAction of() { + return new ProjectChangeBusinessUnitSearchStatusActionImpl(); + } + + /** + * factory method to create a shallow copy ProjectChangeBusinessUnitSearchStatusAction + * @param template instance to be copied + * @return copy instance + */ + public static ProjectChangeBusinessUnitSearchStatusAction of( + final ProjectChangeBusinessUnitSearchStatusAction template) { + ProjectChangeBusinessUnitSearchStatusActionImpl instance = new ProjectChangeBusinessUnitSearchStatusActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + /** + * factory method to create a deep copy of ProjectChangeBusinessUnitSearchStatusAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProjectChangeBusinessUnitSearchStatusAction deepCopy( + @Nullable final ProjectChangeBusinessUnitSearchStatusAction template) { + if (template == null) { + return null; + } + ProjectChangeBusinessUnitSearchStatusActionImpl instance = new ProjectChangeBusinessUnitSearchStatusActionImpl(); + instance.setStatus(template.getStatus()); + return instance; + } + + /** + * builder factory method for ProjectChangeBusinessUnitSearchStatusAction + * @return builder + */ + public static ProjectChangeBusinessUnitSearchStatusActionBuilder builder() { + return ProjectChangeBusinessUnitSearchStatusActionBuilder.of(); + } + + /** + * create builder for ProjectChangeBusinessUnitSearchStatusAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProjectChangeBusinessUnitSearchStatusActionBuilder builder( + final ProjectChangeBusinessUnitSearchStatusAction template) { + return ProjectChangeBusinessUnitSearchStatusActionBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ProjectChangeBusinessUnitSearchStatusAction projectChangeBusinessUnitSearchStatusAction = ProjectChangeBusinessUnitSearchStatusAction.builder()
+ * .status(BusinessUnitSearchStatus.ACTIVATED)
+ * .build()
+ *
+ * Activates or deactivates the Search Business Units feature. Activation will trigger building a search index for the Business Units in the Project.
+ * @param status value to be set + * @return Builder + */ + + public ProjectChangeBusinessUnitSearchStatusActionBuilder status( + final com.commercetools.api.models.project.BusinessUnitSearchStatus status) { + this.status = status; + return this; + } + + /** + *Activates or deactivates the Search Business Units feature. Activation will trigger building a search index for the Business Units in the Project.
+ * @return status + */ + + public com.commercetools.api.models.project.BusinessUnitSearchStatus getStatus() { + return this.status; + } + + /** + * builds ProjectChangeBusinessUnitSearchStatusAction with checking for non-null required values + * @return ProjectChangeBusinessUnitSearchStatusAction + */ + public ProjectChangeBusinessUnitSearchStatusAction build() { + Objects.requireNonNull(status, ProjectChangeBusinessUnitSearchStatusAction.class + ": status is missing"); + return new ProjectChangeBusinessUnitSearchStatusActionImpl(status); + } + + /** + * builds ProjectChangeBusinessUnitSearchStatusAction without checking for non-null required values + * @return ProjectChangeBusinessUnitSearchStatusAction + */ + public ProjectChangeBusinessUnitSearchStatusAction buildUnchecked() { + return new ProjectChangeBusinessUnitSearchStatusActionImpl(status); + } + + /** + * factory method for an instance of ProjectChangeBusinessUnitSearchStatusActionBuilder + * @return builder + */ + public static ProjectChangeBusinessUnitSearchStatusActionBuilder of() { + return new ProjectChangeBusinessUnitSearchStatusActionBuilder(); + } + + /** + * create builder for ProjectChangeBusinessUnitSearchStatusAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProjectChangeBusinessUnitSearchStatusActionBuilder of( + final ProjectChangeBusinessUnitSearchStatusAction template) { + ProjectChangeBusinessUnitSearchStatusActionBuilder builder = new ProjectChangeBusinessUnitSearchStatusActionBuilder(); + builder.status = template.getStatus(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusActionImpl.java new file mode 100644 index 00000000000..0446f6741c4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectChangeBusinessUnitSearchStatusActionImpl.java @@ -0,0 +1,96 @@ + +package com.commercetools.api.models.project; + +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; + +/** + * ProjectChangeBusinessUnitSearchStatusAction + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProjectChangeBusinessUnitSearchStatusActionImpl + implements ProjectChangeBusinessUnitSearchStatusAction, ModelBase { + + private String action; + + private com.commercetools.api.models.project.BusinessUnitSearchStatus status; + + /** + * create instance with all properties + */ + @JsonCreator + ProjectChangeBusinessUnitSearchStatusActionImpl( + @JsonProperty("status") final com.commercetools.api.models.project.BusinessUnitSearchStatus status) { + this.status = status; + this.action = CHANGE_BUSINESS_UNIT_SEARCH_STATUS; + } + + /** + * create empty instance + */ + public ProjectChangeBusinessUnitSearchStatusActionImpl() { + this.action = CHANGE_BUSINESS_UNIT_SEARCH_STATUS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *Activates or deactivates the Search Business Units feature. Activation will trigger building a search index for the Business Units in the Project.
+ */ + + public com.commercetools.api.models.project.BusinessUnitSearchStatus getStatus() { + return this.status; + } + + public void setStatus(final com.commercetools.api.models.project.BusinessUnitSearchStatus status) { + this.status = status; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProjectChangeBusinessUnitSearchStatusActionImpl that = (ProjectChangeBusinessUnitSearchStatusActionImpl) 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-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java index c4ca967541d..cb18d94c326 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/ProjectUpdateAction.java @@ -21,13 +21,14 @@ * Example to create a subtype instance using the builder pattern *
- * ProjectUpdateAction projectUpdateAction = ProjectUpdateAction.changeMyBusinessUnitStatusOnCreationBuilder()
- * status(BusinessUnitConfigurationStatus.ACTIVE)
+ * ProjectUpdateAction projectUpdateAction = ProjectUpdateAction.changeBusinessUnitSearchStatusBuilder()
+ * status(BusinessUnitSearchStatus.ACTIVATED)
* .build()
*
* Configuration for the Business Unit Search feature.
+ * @return businessUnits + */ + @Valid + @JsonProperty("businessUnits") + public SearchIndexingConfigurationValues getBusinessUnits(); + /** *Configuration for the Product Projection Search and Product Suggestions endpoints.
* @param products value to be set @@ -90,6 +98,13 @@ public interface SearchIndexingConfiguration { public void setCustomers(final SearchIndexingConfigurationValues customers); + /** + *Configuration for the Business Unit Search feature.
+ * @param businessUnits value to be set + */ + + public void setBusinessUnits(final SearchIndexingConfigurationValues businessUnits); + /** * factory method * @return instance of SearchIndexingConfiguration @@ -109,6 +124,7 @@ public static SearchIndexingConfiguration of(final SearchIndexingConfiguration t instance.setProductsSearch(template.getProductsSearch()); instance.setOrders(template.getOrders()); instance.setCustomers(template.getCustomers()); + instance.setBusinessUnits(template.getBusinessUnits()); return instance; } @@ -131,6 +147,8 @@ public static SearchIndexingConfiguration deepCopy(@Nullable final SearchIndexin com.commercetools.api.models.project.SearchIndexingConfigurationValues.deepCopy(template.getOrders())); instance.setCustomers( com.commercetools.api.models.project.SearchIndexingConfigurationValues.deepCopy(template.getCustomers())); + instance.setBusinessUnits(com.commercetools.api.models.project.SearchIndexingConfigurationValues + .deepCopy(template.getBusinessUnits())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationBuilder.java index b1564bf7d4e..2d236ed5faf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationBuilder.java @@ -35,6 +35,9 @@ public class SearchIndexingConfigurationBuilder implements BuilderConfiguration for the Business Unit Search feature.
+ * @param builder function to build the businessUnits value + * @return Builder + */ + + public SearchIndexingConfigurationBuilder businessUnits( + FunctionConfiguration for the Business Unit Search feature.
+ * @param builder function to build the businessUnits value + * @return Builder + */ + + public SearchIndexingConfigurationBuilder withBusinessUnits( + FunctionConfiguration for the Business Unit Search feature.
+ * @param businessUnits value to be set + * @return Builder + */ + + public SearchIndexingConfigurationBuilder businessUnits( + @Nullable final com.commercetools.api.models.project.SearchIndexingConfigurationValues businessUnits) { + this.businessUnits = businessUnits; + return this; + } + /** *Configuration for the Product Projection Search and Product Suggestions endpoints.
* @return products @@ -229,12 +271,22 @@ public com.commercetools.api.models.project.SearchIndexingConfigurationValues ge return this.customers; } + /** + *Configuration for the Business Unit Search feature.
+ * @return businessUnits + */ + + @Nullable + public com.commercetools.api.models.project.SearchIndexingConfigurationValues getBusinessUnits() { + return this.businessUnits; + } + /** * builds SearchIndexingConfiguration with checking for non-null required values * @return SearchIndexingConfiguration */ public SearchIndexingConfiguration build() { - return new SearchIndexingConfigurationImpl(products, productsSearch, orders, customers); + return new SearchIndexingConfigurationImpl(products, productsSearch, orders, customers, businessUnits); } /** @@ -242,7 +294,7 @@ public SearchIndexingConfiguration build() { * @return SearchIndexingConfiguration */ public SearchIndexingConfiguration buildUnchecked() { - return new SearchIndexingConfigurationImpl(products, productsSearch, orders, customers); + return new SearchIndexingConfigurationImpl(products, productsSearch, orders, customers, businessUnits); } /** @@ -264,6 +316,7 @@ public static SearchIndexingConfigurationBuilder of(final SearchIndexingConfigur builder.productsSearch = template.getProductsSearch(); builder.orders = template.getOrders(); builder.customers = template.getCustomers(); + builder.businessUnits = template.getBusinessUnits(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationImpl.java index 6d12b103a1b..c00cd972cae 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/project/SearchIndexingConfigurationImpl.java @@ -30,6 +30,8 @@ public class SearchIndexingConfigurationImpl implements SearchIndexingConfigurat private com.commercetools.api.models.project.SearchIndexingConfigurationValues customers; + private com.commercetools.api.models.project.SearchIndexingConfigurationValues businessUnits; + /** * create instance with all properties */ @@ -38,11 +40,13 @@ public class SearchIndexingConfigurationImpl implements SearchIndexingConfigurat @JsonProperty("products") final com.commercetools.api.models.project.SearchIndexingConfigurationValues products, @JsonProperty("productsSearch") final com.commercetools.api.models.project.SearchIndexingConfigurationValues productsSearch, @JsonProperty("orders") final com.commercetools.api.models.project.SearchIndexingConfigurationValues orders, - @JsonProperty("customers") final com.commercetools.api.models.project.SearchIndexingConfigurationValues customers) { + @JsonProperty("customers") final com.commercetools.api.models.project.SearchIndexingConfigurationValues customers, + @JsonProperty("businessUnits") final com.commercetools.api.models.project.SearchIndexingConfigurationValues businessUnits) { this.products = products; this.productsSearch = productsSearch; this.orders = orders; this.customers = customers; + this.businessUnits = businessUnits; } /** @@ -83,6 +87,14 @@ public com.commercetools.api.models.project.SearchIndexingConfigurationValues ge return this.customers; } + /** + *Configuration for the Business Unit Search feature.
+ */ + + public com.commercetools.api.models.project.SearchIndexingConfigurationValues getBusinessUnits() { + return this.businessUnits; + } + public void setProducts(final com.commercetools.api.models.project.SearchIndexingConfigurationValues products) { this.products = products; } @@ -100,6 +112,11 @@ public void setCustomers(final com.commercetools.api.models.project.SearchIndexi this.customers = customers; } + public void setBusinessUnits( + final com.commercetools.api.models.project.SearchIndexingConfigurationValues businessUnits) { + this.businessUnits = businessUnits; + } + @Override public boolean equals(Object o) { if (this == o) @@ -114,10 +131,12 @@ public boolean equals(Object o) { .append(productsSearch, that.productsSearch) .append(orders, that.orders) .append(customers, that.customers) + .append(businessUnits, that.businessUnits) .append(products, that.products) .append(productsSearch, that.productsSearch) .append(orders, that.orders) .append(customers, that.customers) + .append(businessUnits, that.businessUnits) .isEquals(); } @@ -127,6 +146,7 @@ public int hashCode() { .append(productsSearch) .append(orders) .append(customers) + .append(businessUnits) .toHashCode(); } @@ -136,6 +156,7 @@ public String toString() { .append("productsSearch", productsSearch) .append("orders", orders) .append("customers", customers) + .append("businessUnits", businessUnits) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitIndexingProgressQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitIndexingProgressQueryBuilderDsl.java new file mode 100644 index 00000000000..ae3a64987db --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/business_unit_search/BusinessUnitIndexingProgressQueryBuilderDsl.java @@ -0,0 +1,32 @@ + +package com.commercetools.api.predicates.query.business_unit_search; + +import com.commercetools.api.predicates.query.*; + +public class BusinessUnitIndexingProgressQueryBuilderDsl { + public BusinessUnitIndexingProgressQueryBuilderDsl() { + } + + public static BusinessUnitIndexingProgressQueryBuilderDsl of() { + return new BusinessUnitIndexingProgressQueryBuilderDsl(); + } + + public LongComparisonPredicateBuilder