From c24d4dbc1d46a56ed9ee3475c11157b26734e21b Mon Sep 17 00:00:00 2001 From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:31:53 +0000 Subject: [PATCH] build(codegen): updating SDK --- changes.md | 22 +- .../models/search/SearchExactExpression.java | 6 +- .../search/SearchExactExpressionBuilder.java | 14 +- .../search/SearchExactExpressionImpl.java | 8 +- .../api/models/search/SearchExactValue.java | 185 +++++++++++++ .../search/SearchExactValueBuilder.java | 260 ++++++++++++++++++ .../models/search/SearchExactValueImpl.java | 203 ++++++++++++++ .../search/SearchQueryExpressionValue.java | 4 + .../SearchExactExpressionQueryBuilderDsl.java | 9 +- .../SearchExactValueQueryBuilderDsl.java | 56 ++++ ...chQueryExpressionValueQueryBuilderDsl.java | 7 + .../search/SearchExactExpressionTest.java | 9 +- .../models/search/SearchExactValueTest.java | 62 +++++ references.txt | 1 + 14 files changed, 816 insertions(+), 30 deletions(-) create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValue.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueBuilder.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueImpl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactValueQueryBuilderDsl.java create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactValueTest.java diff --git a/changes.md b/changes.md index 9fa5dc98a07..98d26bd9c0d 100644 --- a/changes.md +++ b/changes.md @@ -1,5 +1,19 @@ **Api changes** +
+Changed Property(s) + +- :warning: changed property `exact` of type `SearchExactExpression` from type `SearchAnyValue` to `SearchExactValue` +
+ + +
+Added Property(s) + +- added property `businessUnits` to type `SearchIndexingConfiguration` +
+ +
Added Resource(s) @@ -28,12 +42,6 @@ - added type `BusinessUnitSearchResult` - added type `BusinessUnitSearchStatus` - added type `ProjectChangeBusinessUnitSearchStatusAction` -
- - -
-Added Property(s) - -- added property `businessUnits` to type `SearchIndexingConfiguration` +- added type `SearchExactValue`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpression.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpression.java index 0db900f3c53..1e3a0fed448 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpression.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpression.java @@ -39,14 +39,14 @@ public interface SearchExactExpression extends SearchQueryExpression { @NotNull @Valid @JsonProperty("exact") - public SearchAnyValue getExact(); + public SearchExactValue getExact(); /** * set exact * @param exact value to be set */ - public void setExact(final SearchAnyValue exact); + public void setExact(final SearchExactValue exact); /** * factory method @@ -78,7 +78,7 @@ public static SearchExactExpression deepCopy(@Nullable final SearchExactExpressi return null; } SearchExactExpressionImpl instance = new SearchExactExpressionImpl(); - instance.setExact(com.commercetools.api.models.search.SearchAnyValue.deepCopy(template.getExact())); + instance.setExact(com.commercetools.api.models.search.SearchExactValue.deepCopy(template.getExact())); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionBuilder.java index a16283580fd..69e61c10cc9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionBuilder.java @@ -22,7 +22,7 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SearchExactExpressionBuilder implements Builder { - private com.commercetools.api.models.search.SearchAnyValue exact; + private com.commercetools.api.models.search.SearchExactValue exact; /** * set the value to the exact using the builder function @@ -31,8 +31,8 @@ public class SearchExactExpressionBuilder implements Builder builder) { - this.exact = builder.apply(com.commercetools.api.models.search.SearchAnyValueBuilder.of()).build(); + Function builder) { + this.exact = builder.apply(com.commercetools.api.models.search.SearchExactValueBuilder.of()).build(); return this; } @@ -43,8 +43,8 @@ public SearchExactExpressionBuilder exact( */ public SearchExactExpressionBuilder withExact( - Function builder) { - this.exact = builder.apply(com.commercetools.api.models.search.SearchAnyValueBuilder.of()); + Function builder) { + this.exact = builder.apply(com.commercetools.api.models.search.SearchExactValueBuilder.of()); return this; } @@ -54,7 +54,7 @@ public SearchExactExpressionBuilder withExact( * @return Builder */ - public SearchExactExpressionBuilder exact(final com.commercetools.api.models.search.SearchAnyValue exact) { + public SearchExactExpressionBuilder exact(final com.commercetools.api.models.search.SearchExactValue exact) { this.exact = exact; return this; } @@ -64,7 +64,7 @@ public SearchExactExpressionBuilder exact(final com.commercetools.api.models.sea * @return exact */ - public com.commercetools.api.models.search.SearchAnyValue getExact() { + public com.commercetools.api.models.search.SearchExactValue getExact() { return this.exact; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionImpl.java index f85b3efdf40..f378561d07a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactExpressionImpl.java @@ -22,13 +22,13 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class SearchExactExpressionImpl implements SearchExactExpression, ModelBase { - private com.commercetools.api.models.search.SearchAnyValue exact; + private com.commercetools.api.models.search.SearchExactValue exact; /** * create instance with all properties */ @JsonCreator - SearchExactExpressionImpl(@JsonProperty("exact") final com.commercetools.api.models.search.SearchAnyValue exact) { + SearchExactExpressionImpl(@JsonProperty("exact") final com.commercetools.api.models.search.SearchExactValue exact) { this.exact = exact; } @@ -42,11 +42,11 @@ public SearchExactExpressionImpl() { * */ - public com.commercetools.api.models.search.SearchAnyValue getExact() { + public com.commercetools.api.models.search.SearchExactValue getExact() { return this.exact; } - public void setExact(final com.commercetools.api.models.search.SearchAnyValue exact) { + public void setExact(final com.commercetools.api.models.search.SearchExactValue exact) { this.exact = exact; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValue.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValue.java new file mode 100644 index 00000000000..53a5b984652 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValue.java @@ -0,0 +1,185 @@ + +package com.commercetools.api.models.search; + +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; + +/** + * SearchExactValue + * + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SearchExactValue searchExactValue = SearchExactValue.builder()
+ *             .field("{field}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SearchExactValueImpl.class) +public interface SearchExactValue extends SearchQueryExpressionValue { + + /** + * + * @return value + */ + + @JsonProperty("value") + public Object getValue(); + + /** + * + * @return values + */ + + @JsonProperty("values") + public List getValues(); + + /** + *

String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: en, en-US, zh-Hans-SG.

+ * @return language + */ + + @JsonProperty("language") + public String getLanguage(); + + /** + * + * @return caseInsensitive + */ + + @JsonProperty("caseInsensitive") + public Boolean getCaseInsensitive(); + + /** + * set value + * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * set values + * @param values values to be set + */ + + @JsonIgnore + public void setValues(final Object... values); + + /** + * set values + * @param values values to be set + */ + + public void setValues(final List values); + + /** + *

String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: en, en-US, zh-Hans-SG.

+ * @param language value to be set + */ + + public void setLanguage(final String language); + + /** + * set caseInsensitive + * @param caseInsensitive value to be set + */ + + public void setCaseInsensitive(final Boolean caseInsensitive); + + /** + * factory method + * @return instance of SearchExactValue + */ + public static SearchExactValue of() { + return new SearchExactValueImpl(); + } + + /** + * factory method to create a shallow copy SearchExactValue + * @param template instance to be copied + * @return copy instance + */ + public static SearchExactValue of(final SearchExactValue template) { + SearchExactValueImpl instance = new SearchExactValueImpl(); + instance.setField(template.getField()); + instance.setBoost(template.getBoost()); + instance.setFieldType(template.getFieldType()); + instance.setValue(template.getValue()); + instance.setValues(template.getValues()); + instance.setLanguage(template.getLanguage()); + instance.setCaseInsensitive(template.getCaseInsensitive()); + return instance; + } + + /** + * factory method to create a deep copy of SearchExactValue + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SearchExactValue deepCopy(@Nullable final SearchExactValue template) { + if (template == null) { + return null; + } + SearchExactValueImpl instance = new SearchExactValueImpl(); + instance.setField(template.getField()); + instance.setBoost(template.getBoost()); + instance.setFieldType(template.getFieldType()); + instance.setValue(template.getValue()); + instance.setValues(Optional.ofNullable(template.getValues()).map(ArrayList::new).orElse(null)); + instance.setLanguage(template.getLanguage()); + instance.setCaseInsensitive(template.getCaseInsensitive()); + return instance; + } + + /** + * builder factory method for SearchExactValue + * @return builder + */ + public static SearchExactValueBuilder builder() { + return SearchExactValueBuilder.of(); + } + + /** + * create builder for SearchExactValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SearchExactValueBuilder builder(final SearchExactValue template) { + return SearchExactValueBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSearchExactValue(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-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueBuilder.java new file mode 100644 index 00000000000..ce2076ec2f3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueBuilder.java @@ -0,0 +1,260 @@ + +package com.commercetools.api.models.search; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SearchExactValueBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SearchExactValue searchExactValue = SearchExactValue.builder()
+ *             .field("{field}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SearchExactValueBuilder implements Builder { + + private String field; + + @Nullable + private Double boost; + + @Nullable + private com.commercetools.api.models.search.SearchFieldType fieldType; + + @Nullable + private java.lang.Object value; + + @Nullable + private java.util.List values; + + @Nullable + private String language; + + @Nullable + private Boolean caseInsensitive; + + /** + * set the value to the field + * @param field value to be set + * @return Builder + */ + + public SearchExactValueBuilder field(final String field) { + this.field = field; + return this; + } + + /** + * set the value to the boost + * @param boost value to be set + * @return Builder + */ + + public SearchExactValueBuilder boost(@Nullable final Double boost) { + this.boost = boost; + return this; + } + + /** + *

Possible values for the fieldType property on query expressions indicating the data type of the field.

+ * @param fieldType value to be set + * @return Builder + */ + + public SearchExactValueBuilder fieldType( + @Nullable final com.commercetools.api.models.search.SearchFieldType fieldType) { + this.fieldType = fieldType; + return this; + } + + /** + * set the value to the value + * @param value value to be set + * @return Builder + */ + + public SearchExactValueBuilder value(@Nullable final java.lang.Object value) { + this.value = value; + return this; + } + + /** + * set values to the values + * @param values value to be set + * @return Builder + */ + + public SearchExactValueBuilder values(@Nullable final java.lang.Object... values) { + this.values = new ArrayList<>(Arrays.asList(values)); + return this; + } + + /** + * set value to the values + * @param values value to be set + * @return Builder + */ + + public SearchExactValueBuilder values(@Nullable final java.util.List values) { + this.values = values; + return this; + } + + /** + * add values to the values + * @param values value to be set + * @return Builder + */ + + public SearchExactValueBuilder plusValues(@Nullable final java.lang.Object... values) { + if (this.values == null) { + this.values = new ArrayList<>(); + } + this.values.addAll(Arrays.asList(values)); + return this; + } + + /** + *

String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: en, en-US, zh-Hans-SG.

+ * @param language value to be set + * @return Builder + */ + + public SearchExactValueBuilder language(@Nullable final String language) { + this.language = language; + return this; + } + + /** + * set the value to the caseInsensitive + * @param caseInsensitive value to be set + * @return Builder + */ + + public SearchExactValueBuilder caseInsensitive(@Nullable final Boolean caseInsensitive) { + this.caseInsensitive = caseInsensitive; + return this; + } + + /** + * value of field} + * @return field + */ + + public String getField() { + return this.field; + } + + /** + * value of boost} + * @return boost + */ + + @Nullable + public Double getBoost() { + return this.boost; + } + + /** + *

Possible values for the fieldType property on query expressions indicating the data type of the field.

+ * @return fieldType + */ + + @Nullable + public com.commercetools.api.models.search.SearchFieldType getFieldType() { + return this.fieldType; + } + + /** + * value of value} + * @return value + */ + + @Nullable + public java.lang.Object getValue() { + return this.value; + } + + /** + * value of values} + * @return values + */ + + @Nullable + public java.util.List getValues() { + return this.values; + } + + /** + *

String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: en, en-US, zh-Hans-SG.

+ * @return language + */ + + @Nullable + public String getLanguage() { + return this.language; + } + + /** + * value of caseInsensitive} + * @return caseInsensitive + */ + + @Nullable + public Boolean getCaseInsensitive() { + return this.caseInsensitive; + } + + /** + * builds SearchExactValue with checking for non-null required values + * @return SearchExactValue + */ + public SearchExactValue build() { + Objects.requireNonNull(field, SearchExactValue.class + ": field is missing"); + return new SearchExactValueImpl(field, boost, fieldType, value, values, language, caseInsensitive); + } + + /** + * builds SearchExactValue without checking for non-null required values + * @return SearchExactValue + */ + public SearchExactValue buildUnchecked() { + return new SearchExactValueImpl(field, boost, fieldType, value, values, language, caseInsensitive); + } + + /** + * factory method for an instance of SearchExactValueBuilder + * @return builder + */ + public static SearchExactValueBuilder of() { + return new SearchExactValueBuilder(); + } + + /** + * create builder for SearchExactValue instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SearchExactValueBuilder of(final SearchExactValue template) { + SearchExactValueBuilder builder = new SearchExactValueBuilder(); + builder.field = template.getField(); + builder.boost = template.getBoost(); + builder.fieldType = template.getFieldType(); + builder.value = template.getValue(); + builder.values = template.getValues(); + builder.language = template.getLanguage(); + builder.caseInsensitive = template.getCaseInsensitive(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueImpl.java new file mode 100644 index 00000000000..d6466c7a14e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchExactValueImpl.java @@ -0,0 +1,203 @@ + +package com.commercetools.api.models.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; + +/** + * SearchExactValue + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SearchExactValueImpl implements SearchExactValue, ModelBase { + + private String field; + + private Double boost; + + private com.commercetools.api.models.search.SearchFieldType fieldType; + + private java.lang.Object value; + + private java.util.List values; + + private String language; + + private Boolean caseInsensitive; + + /** + * create instance with all properties + */ + @JsonCreator + SearchExactValueImpl(@JsonProperty("field") final String field, @JsonProperty("boost") final Double boost, + @JsonProperty("fieldType") final com.commercetools.api.models.search.SearchFieldType fieldType, + @JsonProperty("value") final java.lang.Object value, + @JsonProperty("values") final java.util.List values, + @JsonProperty("language") final String language, + @JsonProperty("caseInsensitive") final Boolean caseInsensitive) { + this.field = field; + this.boost = boost; + this.fieldType = fieldType; + this.value = value; + this.values = values; + this.language = language; + this.caseInsensitive = caseInsensitive; + } + + /** + * create empty instance + */ + public SearchExactValueImpl() { + } + + /** + * + */ + + public String getField() { + return this.field; + } + + /** + * + */ + + public Double getBoost() { + return this.boost; + } + + /** + *

Possible values for the fieldType property on query expressions indicating the data type of the field.

+ */ + + public com.commercetools.api.models.search.SearchFieldType getFieldType() { + return this.fieldType; + } + + /** + * + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * + */ + + public java.util.List getValues() { + return this.values; + } + + /** + *

String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: en, en-US, zh-Hans-SG.

+ */ + + public String getLanguage() { + return this.language; + } + + /** + * + */ + + public Boolean getCaseInsensitive() { + return this.caseInsensitive; + } + + public void setField(final String field) { + this.field = field; + } + + public void setBoost(final Double boost) { + this.boost = boost; + } + + public void setFieldType(final com.commercetools.api.models.search.SearchFieldType fieldType) { + this.fieldType = fieldType; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + public void setValues(final java.lang.Object... values) { + this.values = new ArrayList<>(Arrays.asList(values)); + } + + public void setValues(final java.util.List values) { + this.values = values; + } + + public void setLanguage(final String language) { + this.language = language; + } + + public void setCaseInsensitive(final Boolean caseInsensitive) { + this.caseInsensitive = caseInsensitive; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SearchExactValueImpl that = (SearchExactValueImpl) o; + + return new EqualsBuilder().append(field, that.field) + .append(boost, that.boost) + .append(fieldType, that.fieldType) + .append(value, that.value) + .append(values, that.values) + .append(language, that.language) + .append(caseInsensitive, that.caseInsensitive) + .append(field, that.field) + .append(boost, that.boost) + .append(fieldType, that.fieldType) + .append(value, that.value) + .append(values, that.values) + .append(language, that.language) + .append(caseInsensitive, that.caseInsensitive) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(field) + .append(boost) + .append(fieldType) + .append(value) + .append(values) + .append(language) + .append(caseInsensitive) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("field", field) + .append("boost", boost) + .append("fieldType", fieldType) + .append("value", value) + .append("values", values) + .append("language", language) + .append("caseInsensitive", caseInsensitive) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchQueryExpressionValue.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchQueryExpressionValue.java index 8ad6cdc2e74..fc91c89f980 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchQueryExpressionValue.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/search/SearchQueryExpressionValue.java @@ -119,6 +119,10 @@ public static SearchQueryExpressionValue deepCopy(@Nullable final SearchQueryExp return com.commercetools.api.models.search.SearchDateTimeRangeValue .deepCopy((com.commercetools.api.models.search.SearchDateTimeRangeValue) template); } + if (template instanceof com.commercetools.api.models.search.SearchExactValue) { + return com.commercetools.api.models.search.SearchExactValue + .deepCopy((com.commercetools.api.models.search.SearchExactValue) template); + } if (template instanceof com.commercetools.api.models.search.SearchExistsValue) { return com.commercetools.api.models.search.SearchExistsValue .deepCopy((com.commercetools.api.models.search.SearchExistsValue) template); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactExpressionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactExpressionQueryBuilderDsl.java index f2fb51a7c44..f9846a221cf 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactExpressionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactExpressionQueryBuilderDsl.java @@ -14,11 +14,10 @@ public static SearchExactExpressionQueryBuilderDsl of() { } public CombinationQueryPredicate exact( - Function> fn) { - return new CombinationQueryPredicate<>( - ContainerQueryPredicate.of() - .parent(ConstantQueryPredicate.of().constant("exact")) - .inner(fn.apply(com.commercetools.api.predicates.query.search.SearchAnyValueQueryBuilderDsl.of())), + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("exact")) + .inner(fn.apply(com.commercetools.api.predicates.query.search.SearchExactValueQueryBuilderDsl.of())), SearchExactExpressionQueryBuilderDsl::of); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactValueQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactValueQueryBuilderDsl.java new file mode 100644 index 00000000000..a3b862f0ccf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchExactValueQueryBuilderDsl.java @@ -0,0 +1,56 @@ + +package com.commercetools.api.predicates.query.search; + +import com.commercetools.api.predicates.query.*; + +public class SearchExactValueQueryBuilderDsl { + public SearchExactValueQueryBuilderDsl() { + } + + public static SearchExactValueQueryBuilderDsl of() { + return new SearchExactValueQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder field() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("field")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + + public DoubleComparisonPredicateBuilder boost() { + return new DoubleComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("boost")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder fieldType() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("fieldType")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder values() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("values")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder language() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("language")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder caseInsensitive() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("caseInsensitive")), + p -> new CombinationQueryPredicate<>(p, SearchExactValueQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchQueryExpressionValueQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchQueryExpressionValueQueryBuilderDsl.java index 09ea61df092..bbc555dac4e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchQueryExpressionValueQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/search/SearchQueryExpressionValueQueryBuilderDsl.java @@ -52,6 +52,13 @@ public CombinationQueryPredicate asSe SearchQueryExpressionValueQueryBuilderDsl::of); } + public CombinationQueryPredicate asSearchExactValue( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.search.SearchExactValueQueryBuilderDsl.of()), + SearchQueryExpressionValueQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSearchExistsValue( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactExpressionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactExpressionTest.java index 13bf73e63ef..714e5d8f679 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactExpressionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactExpressionTest.java @@ -24,14 +24,15 @@ public void buildUnchecked(SearchExactExpressionBuilder builder) { @DataProvider public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { - SearchExactExpression.builder().exact(new com.commercetools.api.models.search.SearchAnyValueImpl()) } }; + return new Object[][] { new Object[] { SearchExactExpression.builder() + .exact(new com.commercetools.api.models.search.SearchExactValueImpl()) } }; } @Test public void exact() { SearchExactExpression value = SearchExactExpression.of(); - value.setExact(new com.commercetools.api.models.search.SearchAnyValueImpl()); - Assertions.assertThat(value.getExact()).isEqualTo(new com.commercetools.api.models.search.SearchAnyValueImpl()); + value.setExact(new com.commercetools.api.models.search.SearchExactValueImpl()); + Assertions.assertThat(value.getExact()) + .isEqualTo(new com.commercetools.api.models.search.SearchExactValueImpl()); } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactValueTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactValueTest.java new file mode 100644 index 00000000000..a4c166ccf02 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/search/SearchExactValueTest.java @@ -0,0 +1,62 @@ + +package com.commercetools.api.models.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 SearchExactValueTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(SearchExactValueBuilder builder) { + SearchExactValue searchExactValue = builder.buildUnchecked(); + Assertions.assertThat(searchExactValue).isInstanceOf(SearchExactValue.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { SearchExactValue.builder().value("value") }, + new Object[] { SearchExactValue.builder().values(Collections.singletonList("values")) }, + new Object[] { SearchExactValue.builder().language("language") }, + new Object[] { SearchExactValue.builder().caseInsensitive(true) } }; + } + + @Test + public void value() { + SearchExactValue value = SearchExactValue.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } + + @Test + public void values() { + SearchExactValue value = SearchExactValue.of(); + value.setValues(Collections.singletonList("values")); + Assertions.assertThat(value.getValues()).isEqualTo(Collections.singletonList("values")); + } + + @Test + public void language() { + SearchExactValue value = SearchExactValue.of(); + value.setLanguage("language"); + Assertions.assertThat(value.getLanguage()).isEqualTo("language"); + } + + @Test + public void caseInsensitive() { + SearchExactValue value = SearchExactValue.of(); + value.setCaseInsensitive(true); + Assertions.assertThat(value.getCaseInsensitive()).isEqualTo(true); + } +} diff --git a/references.txt b/references.txt index befcc103291..a7544267735 100644 --- a/references.txt +++ b/references.txt @@ -349,3 +349,4 @@ f4f3c42381257c319000e05bd5b61074d18b0a5f 55ee33c4d18af345c4e89be226286c56c187a878 d0ab34123535479eb53d2400ca18fdfab0f9bf4c e5666d7956fd6de53e41f965b052896d2a2ddd9b +98343f9a365a2f9d4db86190003d00b8682c71d9