diff --git a/changes.md b/changes.md index 566386f9144..9ea10e867fe 100644 --- a/changes.md +++ b/changes.md @@ -4,6 +4,9 @@ Added Property(s) - added property `warnings` to type `ProductTailoring` +- added property `attributes` to type `ProductVariantTailoring` +- added property `attributes` to type `ProductVariantTailoringDraft` +- added property `attributes` to type `ProductTailoringAddVariantAction` - added property `warnings` to type `Product` @@ -11,7 +14,20 @@
Added Type(s) +- added type `SearchNotReadyError` +- added type `GraphQLSearchNotReadyError` +- added type `ProductTailoringAttribute` +- added type `ProductTailoringSetAttributeAction` +- added type `ProductTailoringSetAttributeInAllVariantsAction` - added type `ImageProcessingOngoingWarning` - added type `WarningObject`
+ +
+Added Enum(s) + +- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId` +- added enum `product-tailoring` to type `ResourceTypeId` +
+ diff --git a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls index 408cd6cb897..b4edf5ce571 100644 --- a/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls +++ b/commercetools/commercetools-graphql-api/src/main/resources/graphql/schema.graphqls @@ -352,6 +352,8 @@ input AddProductVariantTailoring { id: Int sku: String images: [ImageInput!] = [] + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + attributes: [ProductAttributeInput!] = [] assets: [AssetDraftInput!] = [] staged: Boolean = true } @@ -8638,6 +8640,11 @@ input ProductTailoringUpdateAction { setAssetTags: SetProductTailoringAssetTags setImages: SetProductTailoringImages setDescription: SetProductTailoringDescription + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setAttribute: SetProductTailoringAttribute + + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + setAttributeInAllVariants: SetProductTailoringAttributeInAllVariants setImageLabel: SetProductTailoringImageLabel setMetaAttributes: SetProductTailoringMetaAttributes setMetaDescription: SetProductTailoringMetaDescription @@ -8908,6 +8915,8 @@ type ProductVariantTailoring { id: Int! images: [Image!]! assets: [Asset!]! + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + attributesRaw: [RawProductAttribute!]! } type ProductVariantTailoringAdded implements MessagePayload { @@ -8923,6 +8932,8 @@ input ProductVariantTailoringInput { id: Int sku: String images: [ImageInput!] = [] + "BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" + attributes: [ProductAttributeInput!] = [] assets: [AssetDraftInput!] = [] } @@ -11859,6 +11870,22 @@ input SetProductTailoringAssetTags { assetId: String } +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetProductTailoringAttribute { + variantId: Int + sku: String + name: String! + value: String + staged: Boolean = true +} + +"BETA: This feature can be subject to change and should be used carefully in production. https://docs.commercetools.com/api/contract#public-beta" +input SetProductTailoringAttributeInAllVariants { + name: String! + value: String + staged: Boolean = true +} + input SetProductTailoringDescription { description: [LocalizedStringItemInputType!] staged: Boolean = true diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java index b23c5b61f37..b56c76d6511 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java @@ -101,6 +101,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchExecutionFailureErrorImpl.class, name = SearchExecutionFailureError.SEARCH_EXECUTION_FAILURE), @JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchFacetPathNotFoundErrorImpl.class, name = SearchFacetPathNotFoundError.SEARCH_FACET_PATH_NOT_FOUND), @JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchIndexingInProgressErrorImpl.class, name = SearchIndexingInProgressError.SEARCH_INDEXING_IN_PROGRESS), + @JsonSubTypes.Type(value = com.commercetools.api.models.error.SearchNotReadyErrorImpl.class, name = SearchNotReadyError.SEARCH_NOT_READY), @JsonSubTypes.Type(value = com.commercetools.api.models.error.SemanticErrorErrorImpl.class, name = SemanticErrorError.SEMANTIC_ERROR), @JsonSubTypes.Type(value = com.commercetools.api.models.error.ShippingMethodDoesNotMatchCartErrorImpl.class, name = ShippingMethodDoesNotMatchCartError.SHIPPING_METHOD_DOES_NOT_MATCH_CART), @JsonSubTypes.Type(value = com.commercetools.api.models.error.StoreCartDiscountsLimitReachedErrorImpl.class, name = StoreCartDiscountsLimitReachedError.STORE_CART_DISCOUNTS_LIMIT_REACHED), @@ -448,6 +449,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) { return com.commercetools.api.models.error.SearchIndexingInProgressError .deepCopy((com.commercetools.api.models.error.SearchIndexingInProgressError) template); } + if (template instanceof com.commercetools.api.models.error.SearchNotReadyError) { + return com.commercetools.api.models.error.SearchNotReadyError + .deepCopy((com.commercetools.api.models.error.SearchNotReadyError) template); + } if (template instanceof com.commercetools.api.models.error.SemanticErrorError) { return com.commercetools.api.models.error.SemanticErrorError .deepCopy((com.commercetools.api.models.error.SemanticErrorError) template); @@ -1046,6 +1051,14 @@ public static com.commercetools.api.models.error.SearchIndexingInProgressErrorBu return com.commercetools.api.models.error.SearchIndexingInProgressErrorBuilder.of(); } + /** + * builder for searchNotReady subtype + * @return builder + */ + public static com.commercetools.api.models.error.SearchNotReadyErrorBuilder searchNotReadyBuilder() { + return com.commercetools.api.models.error.SearchNotReadyErrorBuilder.of(); + } + /** * builder for semanticError subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java index e3465b70dfb..18b758b7028 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java @@ -299,6 +299,10 @@ public com.commercetools.api.models.error.SearchIndexingInProgressErrorBuilder s return com.commercetools.api.models.error.SearchIndexingInProgressErrorBuilder.of(); } + public com.commercetools.api.models.error.SearchNotReadyErrorBuilder searchNotReadyBuilder() { + return com.commercetools.api.models.error.SearchNotReadyErrorBuilder.of(); + } + public com.commercetools.api.models.error.SemanticErrorErrorBuilder semanticErrorBuilder() { return com.commercetools.api.models.error.SemanticErrorErrorBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java index c5056096300..7b4515ab5f2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObject.java @@ -99,6 +99,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchExecutionFailureErrorImpl.class, name = GraphQLSearchExecutionFailureError.SEARCH_EXECUTION_FAILURE), @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchFacetPathNotFoundErrorImpl.class, name = GraphQLSearchFacetPathNotFoundError.SEARCH_FACET_PATH_NOT_FOUND), @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorImpl.class, name = GraphQLSearchIndexingInProgressError.SEARCH_INDEXING_IN_PROGRESS), + @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSearchNotReadyErrorImpl.class, name = GraphQLSearchNotReadyError.SEARCH_NOT_READY), @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLSemanticErrorErrorImpl.class, name = GraphQLSemanticErrorError.SEMANTIC_ERROR), @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLShippingMethodDoesNotMatchCartErrorImpl.class, name = GraphQLShippingMethodDoesNotMatchCartError.SHIPPING_METHOD_DOES_NOT_MATCH_CART), @JsonSubTypes.Type(value = com.commercetools.api.models.error.GraphQLStoreCartDiscountsLimitReachedErrorImpl.class, name = GraphQLStoreCartDiscountsLimitReachedError.STORE_CART_DISCOUNTS_LIMIT_REACHED), @@ -431,6 +432,10 @@ public static GraphQLErrorObject deepCopy(@Nullable final GraphQLErrorObject tem return com.commercetools.api.models.error.GraphQLSearchIndexingInProgressError .deepCopy((com.commercetools.api.models.error.GraphQLSearchIndexingInProgressError) template); } + if (template instanceof com.commercetools.api.models.error.GraphQLSearchNotReadyError) { + return com.commercetools.api.models.error.GraphQLSearchNotReadyError + .deepCopy((com.commercetools.api.models.error.GraphQLSearchNotReadyError) template); + } if (template instanceof com.commercetools.api.models.error.GraphQLSemanticErrorError) { return com.commercetools.api.models.error.GraphQLSemanticErrorError .deepCopy((com.commercetools.api.models.error.GraphQLSemanticErrorError) template); @@ -1028,6 +1033,14 @@ public static com.commercetools.api.models.error.GraphQLSearchIndexingInProgress return com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorBuilder.of(); } + /** + * builder for searchNotReady subtype + * @return builder + */ + public static com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder searchNotReadyBuilder() { + return com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder.of(); + } + /** * builder for semanticError subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java index 21b88a61e9a..0cc895a9dba 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java @@ -299,6 +299,10 @@ public com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorBu return com.commercetools.api.models.error.GraphQLSearchIndexingInProgressErrorBuilder.of(); } + public com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder searchNotReadyBuilder() { + return com.commercetools.api.models.error.GraphQLSearchNotReadyErrorBuilder.of(); + } + public com.commercetools.api.models.error.GraphQLSemanticErrorErrorBuilder semanticErrorBuilder() { return com.commercetools.api.models.error.GraphQLSemanticErrorErrorBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyError.java new file mode 100644 index 00000000000..e900c600dc9 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyError.java @@ -0,0 +1,119 @@ + +package com.commercetools.api.models.error; + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress.

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

+ *     GraphQLSearchNotReadyError graphQLSearchNotReadyError = GraphQLSearchNotReadyError.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GraphQLSearchNotReadyErrorImpl.class) +public interface GraphQLSearchNotReadyError extends GraphQLErrorObject { + + /** + * discriminator value for GraphQLSearchNotReadyError + */ + String SEARCH_NOT_READY = "SearchNotReady"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + * factory method + * @return instance of GraphQLSearchNotReadyError + */ + public static GraphQLSearchNotReadyError of() { + return new GraphQLSearchNotReadyErrorImpl(); + } + + /** + * factory method to create a shallow copy GraphQLSearchNotReadyError + * @param template instance to be copied + * @return copy instance + */ + public static GraphQLSearchNotReadyError of(final GraphQLSearchNotReadyError template) { + GraphQLSearchNotReadyErrorImpl instance = new GraphQLSearchNotReadyErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * factory method to create a deep copy of GraphQLSearchNotReadyError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GraphQLSearchNotReadyError deepCopy(@Nullable final GraphQLSearchNotReadyError template) { + if (template == null) { + return null; + } + GraphQLSearchNotReadyErrorImpl instance = new GraphQLSearchNotReadyErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * builder factory method for GraphQLSearchNotReadyError + * @return builder + */ + public static GraphQLSearchNotReadyErrorBuilder builder() { + return GraphQLSearchNotReadyErrorBuilder.of(); + } + + /** + * create builder for GraphQLSearchNotReadyError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLSearchNotReadyErrorBuilder builder(final GraphQLSearchNotReadyError template) { + return GraphQLSearchNotReadyErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGraphQLSearchNotReadyError(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/error/GraphQLSearchNotReadyErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorBuilder.java new file mode 100644 index 00000000000..f6ef27c1d7c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorBuilder.java @@ -0,0 +1,95 @@ + +package com.commercetools.api.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GraphQLSearchNotReadyErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GraphQLSearchNotReadyError graphQLSearchNotReadyError = GraphQLSearchNotReadyError.builder()
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLSearchNotReadyErrorBuilder implements Builder { + + private Map values = new HashMap<>(); + + /** + *

Error-specific additional fields.

+ * @param values properties to be set + * @return Builder + */ + + public GraphQLSearchNotReadyErrorBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param key property name + * @param value property value + * @return Builder + */ + + public GraphQLSearchNotReadyErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + * builds GraphQLSearchNotReadyError with checking for non-null required values + * @return GraphQLSearchNotReadyError + */ + public GraphQLSearchNotReadyError build() { + return new GraphQLSearchNotReadyErrorImpl(values); + } + + /** + * builds GraphQLSearchNotReadyError without checking for non-null required values + * @return GraphQLSearchNotReadyError + */ + public GraphQLSearchNotReadyError buildUnchecked() { + return new GraphQLSearchNotReadyErrorImpl(values); + } + + /** + * factory method for an instance of GraphQLSearchNotReadyErrorBuilder + * @return builder + */ + public static GraphQLSearchNotReadyErrorBuilder of() { + return new GraphQLSearchNotReadyErrorBuilder(); + } + + /** + * create builder for GraphQLSearchNotReadyError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLSearchNotReadyErrorBuilder of(final GraphQLSearchNotReadyError template) { + GraphQLSearchNotReadyErrorBuilder builder = new GraphQLSearchNotReadyErrorBuilder(); + builder.values = template.values(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorImpl.java new file mode 100644 index 00000000000..0d4aa538730 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorImpl.java @@ -0,0 +1,97 @@ + +package com.commercetools.api.models.error; + +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; + +/** + *

Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLSearchNotReadyErrorImpl implements GraphQLSearchNotReadyError, ModelBase { + + private String code; + + private Map values; + + /** + * create instance with all properties + */ + @JsonCreator + GraphQLSearchNotReadyErrorImpl(@JsonProperty("values") final Map values) { + this.values = values; + this.code = SEARCH_NOT_READY; + } + + /** + * create empty instance + */ + public GraphQLSearchNotReadyErrorImpl() { + this.code = SEARCH_NOT_READY; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GraphQLSearchNotReadyErrorImpl that = (GraphQLSearchNotReadyErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(values, that.values) + .append(code, that.code) + .append(values, that.values) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("values", values) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyError.java new file mode 100644 index 00000000000..54dec8f0dd8 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyError.java @@ -0,0 +1,137 @@ + +package com.commercetools.api.models.error; + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress.

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

+ *     SearchNotReadyError searchNotReadyError = SearchNotReadyError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = SearchNotReadyErrorImpl.class) +public interface SearchNotReadyError extends ErrorObject { + + /** + * discriminator value for SearchNotReadyError + */ + String SEARCH_NOT_READY = "SearchNotReady"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.

+ * @return message + */ + @NotNull + @JsonProperty("message") + public String getMessage(); + + /** + *

$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.

+ * @param message value to be set + */ + + public void setMessage(final String message); + + /** + * factory method + * @return instance of SearchNotReadyError + */ + public static SearchNotReadyError of() { + return new SearchNotReadyErrorImpl(); + } + + /** + * factory method to create a shallow copy SearchNotReadyError + * @param template instance to be copied + * @return copy instance + */ + public static SearchNotReadyError of(final SearchNotReadyError template) { + SearchNotReadyErrorImpl instance = new SearchNotReadyErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * factory method to create a deep copy of SearchNotReadyError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static SearchNotReadyError deepCopy(@Nullable final SearchNotReadyError template) { + if (template == null) { + return null; + } + SearchNotReadyErrorImpl instance = new SearchNotReadyErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + return instance; + } + + /** + * builder factory method for SearchNotReadyError + * @return builder + */ + public static SearchNotReadyErrorBuilder builder() { + return SearchNotReadyErrorBuilder.of(); + } + + /** + * create builder for SearchNotReadyError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SearchNotReadyErrorBuilder builder(final SearchNotReadyError template) { + return SearchNotReadyErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withSearchNotReadyError(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/error/SearchNotReadyErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorBuilder.java new file mode 100644 index 00000000000..9a52da650cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorBuilder.java @@ -0,0 +1,120 @@ + +package com.commercetools.api.models.error; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * SearchNotReadyErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     SearchNotReadyError searchNotReadyError = SearchNotReadyError.builder()
+ *             .message("{message}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SearchNotReadyErrorBuilder implements Builder { + + private String message; + + private Map values = new HashMap<>(); + + /** + *

$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.

+ * @param message value to be set + * @return Builder + */ + + public SearchNotReadyErrorBuilder message(final String message) { + this.message = message; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param values properties to be set + * @return Builder + */ + + public SearchNotReadyErrorBuilder values(final Map values) { + this.values = values; + return this; + } + + /** + *

Error-specific additional fields.

+ * @param key property name + * @param value property value + * @return Builder + */ + + public SearchNotReadyErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *

$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.

+ * @return message + */ + + public String getMessage() { + return this.message; + } + + /** + *

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + * builds SearchNotReadyError with checking for non-null required values + * @return SearchNotReadyError + */ + public SearchNotReadyError build() { + Objects.requireNonNull(message, SearchNotReadyError.class + ": message is missing"); + return new SearchNotReadyErrorImpl(message, values); + } + + /** + * builds SearchNotReadyError without checking for non-null required values + * @return SearchNotReadyError + */ + public SearchNotReadyError buildUnchecked() { + return new SearchNotReadyErrorImpl(message, values); + } + + /** + * factory method for an instance of SearchNotReadyErrorBuilder + * @return builder + */ + public static SearchNotReadyErrorBuilder of() { + return new SearchNotReadyErrorBuilder(); + } + + /** + * create builder for SearchNotReadyError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static SearchNotReadyErrorBuilder of(final SearchNotReadyError template) { + SearchNotReadyErrorBuilder builder = new SearchNotReadyErrorBuilder(); + builder.message = template.getMessage(); + builder.values = template.values(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorImpl.java new file mode 100644 index 00000000000..522ac961881 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorImpl.java @@ -0,0 +1,116 @@ + +package com.commercetools.api.models.error; + +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; + +/** + *

Returned if the requested search service is not ready. The search might be deactivated or indexing is in progress.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class SearchNotReadyErrorImpl implements SearchNotReadyError, ModelBase { + + private String code; + + private String message; + + private Map values; + + /** + * create instance with all properties + */ + @JsonCreator + SearchNotReadyErrorImpl(@JsonProperty("message") final String message, + @JsonProperty("values") final Map values) { + this.message = message; + this.values = values; + this.code = SEARCH_NOT_READY; + } + + /** + * create empty instance + */ + public SearchNotReadyErrorImpl() { + this.code = SEARCH_NOT_READY; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

$Search is not ready. Check the indexing-status endpoint and that the feature has been activated in the project settings.

+ */ + + public String getMessage() { + return this.message; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + SearchNotReadyErrorImpl that = (SearchNotReadyErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).append(values).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("values", values) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java index 72c000852c8..b895336a81b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantAction.java @@ -70,6 +70,14 @@ public interface ProductTailoringAddVariantAction extends ProductTailoringUpdate @JsonProperty("assets") public List getAssets(); + /** + *

Attributes for the Product Variant Tailoring.

+ * @return attributes + */ + @Valid + @JsonProperty("attributes") + public List getAttributes(); + /** *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

* @return staged @@ -122,6 +130,21 @@ public interface ProductTailoringAddVariantAction extends ProductTailoringUpdate public void setAssets(final List assets); + /** + *

Attributes for the Product Variant Tailoring.

+ * @param attributes values to be set + */ + + @JsonIgnore + public void setAttributes(final ProductTailoringAttribute... attributes); + + /** + *

Attributes for the Product Variant Tailoring.

+ * @param attributes values to be set + */ + + public void setAttributes(final List attributes); + /** *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

* @param staged value to be set @@ -148,6 +171,7 @@ public static ProductTailoringAddVariantAction of(final ProductTailoringAddVaria instance.setSku(template.getSku()); instance.setImages(template.getImages()); instance.setAssets(template.getAssets()); + instance.setAttributes(template.getAttributes()); instance.setStaged(template.getStaged()); return instance; } @@ -175,6 +199,11 @@ public static ProductTailoringAddVariantAction deepCopy(@Nullable final ProductT .map(com.commercetools.api.models.common.AssetDraft::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAttributes(Optional.ofNullable(template.getAttributes()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductTailoringAttribute::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); instance.setStaged(template.getStaged()); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java index c7e1318b2e4..df0a0ec7044 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionBuilder.java @@ -35,6 +35,9 @@ public class ProductTailoringAddVariantActionBuilder implements Builder assets; + @Nullable + private java.util.List attributes; + @Nullable private Boolean staged; @@ -238,6 +241,101 @@ public ProductTailoringAddVariantActionBuilder setAssets( return assets(builder.apply(com.commercetools.api.models.common.AssetDraftBuilder.of())); } + /** + *

Attributes for the Product Variant Tailoring.

+ * @param attributes value to be set + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder attributes( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoringAttribute... attributes) { + this.attributes = new ArrayList<>(Arrays.asList(attributes)); + return this; + } + + /** + *

Attributes for the Product Variant Tailoring.

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

Attributes for the Product Variant Tailoring.

+ * @param attributes value to be set + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder plusAttributes( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoringAttribute... attributes) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.addAll(Arrays.asList(attributes)); + return this; + } + + /** + *

Attributes for the Product Variant Tailoring.

+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder plusAttributes( + Function builder) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes + .add(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of()) + .build()); + return this; + } + + /** + *

Attributes for the Product Variant Tailoring.

+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder withAttributes( + Function builder) { + this.attributes = new ArrayList<>(); + this.attributes + .add(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of()) + .build()); + return this; + } + + /** + *

Attributes for the Product Variant Tailoring.

+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder addAttributes( + Function builder) { + return plusAttributes( + builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of())); + } + + /** + *

Attributes for the Product Variant Tailoring.

+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductTailoringAddVariantActionBuilder setAttributes( + Function builder) { + return attributes( + builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of())); + } + /** *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

* @param staged value to be set @@ -289,6 +387,16 @@ public java.util.List getAssets( return this.assets; } + /** + *

Attributes for the Product Variant Tailoring.

+ * @return attributes + */ + + @Nullable + public java.util.List getAttributes() { + return this.attributes; + } + /** *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

* @return staged @@ -304,7 +412,7 @@ public Boolean getStaged() { * @return ProductTailoringAddVariantAction */ public ProductTailoringAddVariantAction build() { - return new ProductTailoringAddVariantActionImpl(id, sku, images, assets, staged); + return new ProductTailoringAddVariantActionImpl(id, sku, images, assets, attributes, staged); } /** @@ -312,7 +420,7 @@ public ProductTailoringAddVariantAction build() { * @return ProductTailoringAddVariantAction */ public ProductTailoringAddVariantAction buildUnchecked() { - return new ProductTailoringAddVariantActionImpl(id, sku, images, assets, staged); + return new ProductTailoringAddVariantActionImpl(id, sku, images, assets, attributes, staged); } /** @@ -334,6 +442,7 @@ public static ProductTailoringAddVariantActionBuilder of(final ProductTailoringA builder.sku = template.getSku(); builder.images = template.getImages(); builder.assets = template.getAssets(); + builder.attributes = template.getAttributes(); builder.staged = template.getStaged(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java index bd0d1bce9c7..8687ec8bc1f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionImpl.java @@ -32,6 +32,8 @@ public class ProductTailoringAddVariantActionImpl implements ProductTailoringAdd private java.util.List assets; + private java.util.List attributes; + private Boolean staged; /** @@ -41,11 +43,13 @@ public class ProductTailoringAddVariantActionImpl implements ProductTailoringAdd ProductTailoringAddVariantActionImpl(@JsonProperty("id") final Long id, @JsonProperty("sku") final String sku, @JsonProperty("images") final java.util.List images, @JsonProperty("assets") final java.util.List assets, + @JsonProperty("attributes") final java.util.List attributes, @JsonProperty("staged") final Boolean staged) { this.id = id; this.sku = sku; this.images = images; this.assets = assets; + this.attributes = attributes; this.staged = staged; this.action = ADD_VARIANT; } @@ -97,6 +101,14 @@ public java.util.List getAssets( return this.assets; } + /** + *

Attributes for the Product Variant Tailoring.

+ */ + + public java.util.List getAttributes() { + return this.attributes; + } + /** *

If true the new Product Variant Tailoring is only staged. If false the new Product Variant Tailoring is both current and staged.

*/ @@ -129,6 +141,16 @@ public void setAssets(final java.util.List(Arrays.asList(attributes)); + } + + public void setAttributes( + final java.util.List attributes) { + this.attributes = attributes; + } + public void setStaged(final Boolean staged) { this.staged = staged; } @@ -148,12 +170,14 @@ public boolean equals(Object o) { .append(sku, that.sku) .append(images, that.images) .append(assets, that.assets) + .append(attributes, that.attributes) .append(staged, that.staged) .append(action, that.action) .append(id, that.id) .append(sku, that.sku) .append(images, that.images) .append(assets, that.assets) + .append(attributes, that.attributes) .append(staged, that.staged) .isEquals(); } @@ -165,6 +189,7 @@ public int hashCode() { .append(sku) .append(images) .append(assets) + .append(attributes) .append(staged) .toHashCode(); } @@ -176,6 +201,7 @@ public String toString() { .append("sku", sku) .append("images", images) .append("assets", assets) + .append("attributes", attributes) .append("staged", staged) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttribute.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttribute.java new file mode 100644 index 00000000000..57df8377665 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttribute.java @@ -0,0 +1,155 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

The same rules for name and value apply as for Attribute in Product Variants.

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

+ *     ProductTailoringAttribute productTailoringAttribute = ProductTailoringAttribute.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringAttributeImpl.class) +public interface ProductTailoringAttribute { + + /** + *

Name of the Attribute.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @return value + */ + @NotNull + @JsonProperty("value") + public Object getValue(); + + /** + *

Name of the Attribute.

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

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + * factory method + * @return instance of ProductTailoringAttribute + */ + public static ProductTailoringAttribute of() { + return new ProductTailoringAttributeImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringAttribute + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringAttribute of(final ProductTailoringAttribute template) { + ProductTailoringAttributeImpl instance = new ProductTailoringAttributeImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringAttribute + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringAttribute deepCopy(@Nullable final ProductTailoringAttribute template) { + if (template == null) { + return null; + } + ProductTailoringAttributeImpl instance = new ProductTailoringAttributeImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + return instance; + } + + /** + * builder factory method for ProductTailoringAttribute + * @return builder + */ + public static ProductTailoringAttributeBuilder builder() { + return ProductTailoringAttributeBuilder.of(); + } + + /** + * create builder for ProductTailoringAttribute instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAttributeBuilder builder(final ProductTailoringAttribute template) { + return ProductTailoringAttributeBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringAttribute(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/product_tailoring/ProductTailoringAttributeBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeBuilder.java new file mode 100644 index 00000000000..12fefb809fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeBuilder.java @@ -0,0 +1,122 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringAttributeBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringAttribute productTailoringAttribute = ProductTailoringAttribute.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAttributeBuilder implements Builder { + + private String name; + + private java.lang.Object value; + + /** + *

Name of the Attribute.

+ * @param name value to be set + * @return Builder + */ + + public ProductTailoringAttributeBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @param value value to be set + * @return Builder + */ + + public ProductTailoringAttributeBuilder value(final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

Name of the Attribute.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @return value + */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + * builds ProductTailoringAttribute with checking for non-null required values + * @return ProductTailoringAttribute + */ + public ProductTailoringAttribute build() { + Objects.requireNonNull(name, ProductTailoringAttribute.class + ": name is missing"); + Objects.requireNonNull(value, ProductTailoringAttribute.class + ": value is missing"); + return new ProductTailoringAttributeImpl(name, value); + } + + /** + * builds ProductTailoringAttribute without checking for non-null required values + * @return ProductTailoringAttribute + */ + public ProductTailoringAttribute buildUnchecked() { + return new ProductTailoringAttributeImpl(name, value); + } + + /** + * factory method for an instance of ProductTailoringAttributeBuilder + * @return builder + */ + public static ProductTailoringAttributeBuilder of() { + return new ProductTailoringAttributeBuilder(); + } + + /** + * create builder for ProductTailoringAttribute instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringAttributeBuilder of(final ProductTailoringAttribute template) { + ProductTailoringAttributeBuilder builder = new ProductTailoringAttributeBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeImpl.java new file mode 100644 index 00000000000..5dcf9c071a0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeImpl.java @@ -0,0 +1,106 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *

The same rules for name and value apply as for Attribute in Product Variants.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringAttributeImpl implements ProductTailoringAttribute, ModelBase { + + private String name; + + private java.lang.Object value; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringAttributeImpl(@JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value) { + this.name = name; + this.value = value; + } + + /** + * create empty instance + */ + public ProductTailoringAttributeImpl() { + } + + /** + *

Name of the Attribute.

+ */ + + public String getName() { + return this.name; + } + + /** + *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringAttributeImpl that = (ProductTailoringAttributeImpl) o; + + return new EqualsBuilder().append(name, that.name) + .append(value, that.value) + .append(name, that.name) + .append(value, that.value) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(name).append(value).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + .append("value", value) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java new file mode 100644 index 00000000000..e4c91fae05a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeAction.java @@ -0,0 +1,214 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Either variantId or sku is required.

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

+ *     ProductTailoringSetAttributeAction productTailoringSetAttributeAction = ProductTailoringSetAttributeAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAttributeActionImpl.class) +public interface ProductTailoringSetAttributeAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAttributeAction + */ + String SET_ATTRIBUTE = "setAttribute"; + + /** + *

The id of the ProductVariant to update. Required if sku is absent.

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

The sku of the ProductVariant to update. Required if variantId is absent.

+ * @return sku + */ + + @JsonProperty("sku") + public String getSku(); + + /** + *

The name of the Attribute to set.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

Value to set for the Attribute. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @return value + */ + + @JsonProperty("value") + public Object getValue(); + + /** + *

If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

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

The id of the ProductVariant to update. Required if sku is absent.

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

The sku of the ProductVariant to update. Required if variantId is absent.

+ * @param sku value to be set + */ + + public void setSku(final String sku); + + /** + *

The name of the Attribute to set.

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

Value to set for the Attribute. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + *

If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetAttributeAction + */ + public static ProductTailoringSetAttributeAction of() { + return new ProductTailoringSetAttributeActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAttributeAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAttributeAction of(final ProductTailoringSetAttributeAction template) { + ProductTailoringSetAttributeActionImpl instance = new ProductTailoringSetAttributeActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAttributeAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAttributeAction deepCopy( + @Nullable final ProductTailoringSetAttributeAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAttributeActionImpl instance = new ProductTailoringSetAttributeActionImpl(); + instance.setVariantId(template.getVariantId()); + instance.setSku(template.getSku()); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAttributeAction + * @return builder + */ + public static ProductTailoringSetAttributeActionBuilder builder() { + return ProductTailoringSetAttributeActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAttributeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAttributeActionBuilder builder(final ProductTailoringSetAttributeAction template) { + return ProductTailoringSetAttributeActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAttributeAction(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/product_tailoring/ProductTailoringSetAttributeActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionBuilder.java new file mode 100644 index 00000000000..3de84adc9e4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionBuilder.java @@ -0,0 +1,202 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAttributeActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAttributeAction productTailoringSetAttributeAction = ProductTailoringSetAttributeAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAttributeActionBuilder implements Builder { + + @Nullable + private Long variantId; + + @Nullable + private String sku; + + private String name; + + @Nullable + private java.lang.Object value; + + @Nullable + private Boolean staged; + + /** + *

The id of the ProductVariant to update. Required if sku is absent.

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

The sku of the ProductVariant to update. Required if variantId is absent.

+ * @param sku value to be set + * @return Builder + */ + + public ProductTailoringSetAttributeActionBuilder sku(@Nullable final String sku) { + this.sku = sku; + return this; + } + + /** + *

The name of the Attribute to set.

+ * @param name value to be set + * @return Builder + */ + + public ProductTailoringSetAttributeActionBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

Value to set for the Attribute. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @param value value to be set + * @return Builder + */ + + public ProductTailoringSetAttributeActionBuilder value(@Nullable final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

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

The id of the ProductVariant to update. Required if sku is absent.

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

The sku of the ProductVariant to update. Required if variantId is absent.

+ * @return sku + */ + + @Nullable + public String getSku() { + return this.sku; + } + + /** + *

The name of the Attribute to set.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

Value to set for the Attribute. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @return value + */ + + @Nullable + public java.lang.Object getValue() { + return this.value; + } + + /** + *

If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetAttributeAction with checking for non-null required values + * @return ProductTailoringSetAttributeAction + */ + public ProductTailoringSetAttributeAction build() { + Objects.requireNonNull(name, ProductTailoringSetAttributeAction.class + ": name is missing"); + return new ProductTailoringSetAttributeActionImpl(variantId, sku, name, value, staged); + } + + /** + * builds ProductTailoringSetAttributeAction without checking for non-null required values + * @return ProductTailoringSetAttributeAction + */ + public ProductTailoringSetAttributeAction buildUnchecked() { + return new ProductTailoringSetAttributeActionImpl(variantId, sku, name, value, staged); + } + + /** + * factory method for an instance of ProductTailoringSetAttributeActionBuilder + * @return builder + */ + public static ProductTailoringSetAttributeActionBuilder of() { + return new ProductTailoringSetAttributeActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAttributeAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAttributeActionBuilder of(final ProductTailoringSetAttributeAction template) { + ProductTailoringSetAttributeActionBuilder builder = new ProductTailoringSetAttributeActionBuilder(); + builder.variantId = template.getVariantId(); + builder.sku = template.getSku(); + builder.name = template.getName(); + builder.value = template.getValue(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java new file mode 100644 index 00000000000..5e292eb54fd --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionImpl.java @@ -0,0 +1,183 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Either variantId or sku is required.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAttributeActionImpl implements ProductTailoringSetAttributeAction, ModelBase { + + private String action; + + private Long variantId; + + private String sku; + + private String name; + + private java.lang.Object value; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAttributeActionImpl(@JsonProperty("variantId") final Long variantId, + @JsonProperty("sku") final String sku, @JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value, @JsonProperty("staged") final Boolean staged) { + this.variantId = variantId; + this.sku = sku; + this.name = name; + this.value = value; + this.staged = staged; + this.action = SET_ATTRIBUTE; + } + + /** + * create empty instance + */ + public ProductTailoringSetAttributeActionImpl() { + this.action = SET_ATTRIBUTE; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The id of the ProductVariant to update. Required if sku is absent.

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

The sku of the ProductVariant to update. Required if variantId is absent.

+ */ + + public String getSku() { + return this.sku; + } + + /** + *

The name of the Attribute to set.

+ */ + + public String getName() { + return this.name; + } + + /** + *

Value to set for the Attribute. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + *

If true, only the staged Attribute is set. If false, both current and staged Attribute is set.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setVariantId(final Long variantId) { + this.variantId = variantId; + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAttributeActionImpl that = (ProductTailoringSetAttributeActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(name, that.name) + .append(value, that.value) + .append(staged, that.staged) + .append(action, that.action) + .append(variantId, that.variantId) + .append(sku, that.sku) + .append(name, that.name) + .append(value, that.value) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action) + .append(variantId) + .append(sku) + .append(name) + .append(value) + .append(staged) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("variantId", variantId) + .append("sku", sku) + .append("name", name) + .append("value", value) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsAction.java new file mode 100644 index 00000000000..6881358eff1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsAction.java @@ -0,0 +1,183 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +import jakarta.validation.constraints.NotNull; + +/** + *

Adds, removes, or changes a tailored Attribute in all Product Variants of a Product at the same time. This action is useful for setting tailored values for Attributes with the Constraint SameForAll.

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

+ *     ProductTailoringSetAttributeInAllVariantsAction productTailoringSetAttributeInAllVariantsAction = ProductTailoringSetAttributeInAllVariantsAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ProductTailoringSetAttributeInAllVariantsActionImpl.class) +public interface ProductTailoringSetAttributeInAllVariantsAction extends ProductTailoringUpdateAction { + + /** + * discriminator value for ProductTailoringSetAttributeInAllVariantsAction + */ + String SET_ATTRIBUTE_IN_ALL_VARIANTS = "setAttributeInAllVariants"; + + /** + *

The name of the Attribute to set.

+ * @return name + */ + @NotNull + @JsonProperty("name") + public String getName(); + + /** + *

Value to set for the Attributes. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @return value + */ + + @JsonProperty("value") + public Object getValue(); + + /** + *

If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

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

The name of the Attribute to set.

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

Value to set for the Attributes. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @param value value to be set + */ + + public void setValue(final Object value); + + /** + *

If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

+ * @param staged value to be set + */ + + public void setStaged(final Boolean staged); + + /** + * factory method + * @return instance of ProductTailoringSetAttributeInAllVariantsAction + */ + public static ProductTailoringSetAttributeInAllVariantsAction of() { + return new ProductTailoringSetAttributeInAllVariantsActionImpl(); + } + + /** + * factory method to create a shallow copy ProductTailoringSetAttributeInAllVariantsAction + * @param template instance to be copied + * @return copy instance + */ + public static ProductTailoringSetAttributeInAllVariantsAction of( + final ProductTailoringSetAttributeInAllVariantsAction template) { + ProductTailoringSetAttributeInAllVariantsActionImpl instance = new ProductTailoringSetAttributeInAllVariantsActionImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * factory method to create a deep copy of ProductTailoringSetAttributeInAllVariantsAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ProductTailoringSetAttributeInAllVariantsAction deepCopy( + @Nullable final ProductTailoringSetAttributeInAllVariantsAction template) { + if (template == null) { + return null; + } + ProductTailoringSetAttributeInAllVariantsActionImpl instance = new ProductTailoringSetAttributeInAllVariantsActionImpl(); + instance.setName(template.getName()); + instance.setValue(template.getValue()); + instance.setStaged(template.getStaged()); + return instance; + } + + /** + * builder factory method for ProductTailoringSetAttributeInAllVariantsAction + * @return builder + */ + public static ProductTailoringSetAttributeInAllVariantsActionBuilder builder() { + return ProductTailoringSetAttributeInAllVariantsActionBuilder.of(); + } + + /** + * create builder for ProductTailoringSetAttributeInAllVariantsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAttributeInAllVariantsActionBuilder builder( + final ProductTailoringSetAttributeInAllVariantsAction template) { + return ProductTailoringSetAttributeInAllVariantsActionBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withProductTailoringSetAttributeInAllVariantsAction( + 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/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionBuilder.java new file mode 100644 index 00000000000..70b7e06c92e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionBuilder.java @@ -0,0 +1,154 @@ + +package com.commercetools.api.models.product_tailoring; + +import java.util.*; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ProductTailoringSetAttributeInAllVariantsActionBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ProductTailoringSetAttributeInAllVariantsAction productTailoringSetAttributeInAllVariantsAction = ProductTailoringSetAttributeInAllVariantsAction.builder()
+ *             .name("{name}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAttributeInAllVariantsActionBuilder + implements Builder { + + private String name; + + @Nullable + private java.lang.Object value; + + @Nullable + private Boolean staged; + + /** + *

The name of the Attribute to set.

+ * @param name value to be set + * @return Builder + */ + + public ProductTailoringSetAttributeInAllVariantsActionBuilder name(final String name) { + this.name = name; + return this; + } + + /** + *

Value to set for the Attributes. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @param value value to be set + * @return Builder + */ + + public ProductTailoringSetAttributeInAllVariantsActionBuilder value(@Nullable final java.lang.Object value) { + this.value = value; + return this; + } + + /** + *

If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

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

The name of the Attribute to set.

+ * @return name + */ + + public String getName() { + return this.name; + } + + /** + *

Value to set for the Attributes. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ * @return value + */ + + @Nullable + public java.lang.Object getValue() { + return this.value; + } + + /** + *

If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

+ * @return staged + */ + + @Nullable + public Boolean getStaged() { + return this.staged; + } + + /** + * builds ProductTailoringSetAttributeInAllVariantsAction with checking for non-null required values + * @return ProductTailoringSetAttributeInAllVariantsAction + */ + public ProductTailoringSetAttributeInAllVariantsAction build() { + Objects.requireNonNull(name, ProductTailoringSetAttributeInAllVariantsAction.class + ": name is missing"); + return new ProductTailoringSetAttributeInAllVariantsActionImpl(name, value, staged); + } + + /** + * builds ProductTailoringSetAttributeInAllVariantsAction without checking for non-null required values + * @return ProductTailoringSetAttributeInAllVariantsAction + */ + public ProductTailoringSetAttributeInAllVariantsAction buildUnchecked() { + return new ProductTailoringSetAttributeInAllVariantsActionImpl(name, value, staged); + } + + /** + * factory method for an instance of ProductTailoringSetAttributeInAllVariantsActionBuilder + * @return builder + */ + public static ProductTailoringSetAttributeInAllVariantsActionBuilder of() { + return new ProductTailoringSetAttributeInAllVariantsActionBuilder(); + } + + /** + * create builder for ProductTailoringSetAttributeInAllVariantsAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ProductTailoringSetAttributeInAllVariantsActionBuilder of( + final ProductTailoringSetAttributeInAllVariantsAction template) { + ProductTailoringSetAttributeInAllVariantsActionBuilder builder = new ProductTailoringSetAttributeInAllVariantsActionBuilder(); + builder.name = template.getName(); + builder.value = template.getValue(); + builder.staged = template.getStaged(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionImpl.java new file mode 100644 index 00000000000..f712bff880f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionImpl.java @@ -0,0 +1,141 @@ + +package com.commercetools.api.models.product_tailoring; + +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; + +/** + *

Adds, removes, or changes a tailored Attribute in all Product Variants of a Product at the same time. This action is useful for setting tailored values for Attributes with the Constraint SameForAll.

+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ProductTailoringSetAttributeInAllVariantsActionImpl + implements ProductTailoringSetAttributeInAllVariantsAction, ModelBase { + + private String action; + + private String name; + + private java.lang.Object value; + + private Boolean staged; + + /** + * create instance with all properties + */ + @JsonCreator + ProductTailoringSetAttributeInAllVariantsActionImpl(@JsonProperty("name") final String name, + @JsonProperty("value") final java.lang.Object value, @JsonProperty("staged") final Boolean staged) { + this.name = name; + this.value = value; + this.staged = staged; + this.action = SET_ATTRIBUTE_IN_ALL_VARIANTS; + } + + /** + * create empty instance + */ + public ProductTailoringSetAttributeInAllVariantsActionImpl() { + this.action = SET_ATTRIBUTE_IN_ALL_VARIANTS; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *

The name of the Attribute to set.

+ */ + + public String getName() { + return this.name; + } + + /** + *

Value to set for the Attributes. If empty, any existing value will be removed.

+ *

The AttributeType determines the format of the Attribute value to be provided:

+ *
    + *
  • For Enum Type and Localized Enum Type, use the key of the Plain Enum Value or Localized Enum Value objects, or the complete objects as value.
  • + *
  • For Localizable Text Type, use the LocalizedString object as value.
  • + *
  • For Money Type Attributes, use the Money object as value.
  • + *
  • For Set Type Attributes, use the entire set object as value.
  • + *
  • For Reference Type Attributes, use the Reference object as value.
  • + *
+ *

Tailoring of Nested Type Attributes is not supported.

+ */ + + public java.lang.Object getValue() { + return this.value; + } + + /** + *

If true, only the staged Attributes are set. If false, both the current and staged Attributes are set.

+ */ + + public Boolean getStaged() { + return this.staged; + } + + public void setName(final String name) { + this.name = name; + } + + public void setValue(final java.lang.Object value) { + this.value = value; + } + + public void setStaged(final Boolean staged) { + this.staged = staged; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ProductTailoringSetAttributeInAllVariantsActionImpl that = (ProductTailoringSetAttributeInAllVariantsActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(name, that.name) + .append(value, that.value) + .append(staged, that.staged) + .append(action, that.action) + .append(name, that.name) + .append(value, that.value) + .append(staged, that.staged) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(name).append(value).append(staged).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("name", name) + .append("value", value) + .append("staged", staged) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java index 54594222adf..df00c75f710 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateAction.java @@ -44,6 +44,8 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetKeyActionImpl.class, name = ProductTailoringSetAssetKeyAction.SET_ASSET_KEY), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetSourcesActionImpl.class, name = ProductTailoringSetAssetSourcesAction.SET_ASSET_SOURCES), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionImpl.class, name = ProductTailoringSetAssetTagsAction.SET_ASSET_TAGS), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeActionImpl.class, name = ProductTailoringSetAttributeAction.SET_ATTRIBUTE), + @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsActionImpl.class, name = ProductTailoringSetAttributeInAllVariantsAction.SET_ATTRIBUTE_IN_ALL_VARIANTS), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionImpl.class, name = ProductTailoringSetDescriptionAction.SET_DESCRIPTION), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetExternalImagesActionImpl.class, name = ProductTailoringSetExternalImagesAction.SET_IMAGES), @JsonSubTypes.Type(value = com.commercetools.api.models.product_tailoring.ProductTailoringSetImageLabelActionImpl.class, name = ProductTailoringSetImageLabelAction.SET_IMAGE_LABEL), @@ -141,6 +143,15 @@ public static ProductTailoringUpdateAction deepCopy(@Nullable final ProductTailo return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsAction.deepCopy( (com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsAction) template); } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeAction.deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeAction) template); + } + if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsAction) { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsAction + .deepCopy( + (com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsAction) template); + } if (template instanceof com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionAction) { return com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionAction.deepCopy( (com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionAction) template); @@ -313,6 +324,23 @@ public static com.commercetools.api.models.product_tailoring.ProductTailoringSet return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionBuilder.of(); } + /** + * builder for setAttribute subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeActionBuilder setAttributeBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeActionBuilder.of(); + } + + /** + * builder for setAttributeInAllVariants subtype + * @return builder + */ + public static com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsActionBuilder setAttributeInAllVariantsBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsActionBuilder + .of(); + } + /** * builder for setDescription subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java index 6836f3393ba..31633c0f378 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringUpdateActionBuilder.java @@ -75,6 +75,15 @@ public com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTa return com.commercetools.api.models.product_tailoring.ProductTailoringSetAssetTagsActionBuilder.of(); } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeActionBuilder setAttributeBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeActionBuilder.of(); + } + + public com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsActionBuilder setAttributeInAllVariantsBuilder() { + return com.commercetools.api.models.product_tailoring.ProductTailoringSetAttributeInAllVariantsActionBuilder + .of(); + } + public com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder setDescriptionBuilder() { return com.commercetools.api.models.product_tailoring.ProductTailoringSetDescriptionActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java index a4b5e772cd2..da1a21601af 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoring.java @@ -59,6 +59,18 @@ public interface ProductVariantTailoring { @JsonProperty("assets") public List getAssets(); + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @return attributes + */ + @Valid + @JsonProperty("attributes") + public List getAttributes(); + /** *

The id of the tailored ProductVariant.

* @param id value to be set @@ -96,6 +108,29 @@ public interface ProductVariantTailoring { public void setAssets(final List assets); + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes values to be set + */ + + @JsonIgnore + public void setAttributes(final ProductTailoringAttribute... attributes); + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes values to be set + */ + + public void setAttributes(final List attributes); + /** * factory method * @return instance of ProductVariantTailoring @@ -114,6 +149,7 @@ public static ProductVariantTailoring of(final ProductVariantTailoring template) instance.setId(template.getId()); instance.setImages(template.getImages()); instance.setAssets(template.getAssets()); + instance.setAttributes(template.getAttributes()); return instance; } @@ -139,6 +175,11 @@ public static ProductVariantTailoring deepCopy(@Nullable final ProductVariantTai .map(com.commercetools.api.models.common.Asset::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAttributes(Optional.ofNullable(template.getAttributes()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductTailoringAttribute::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java index f741272c466..c06532bb316 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringBuilder.java @@ -32,6 +32,9 @@ public class ProductVariantTailoringBuilder implements Builder assets; + @Nullable + private java.util.List attributes; + /** *

The id of the tailored ProductVariant.

* @param id value to be set @@ -219,6 +222,129 @@ public ProductVariantTailoringBuilder setAssets( return assets(builder.apply(com.commercetools.api.models.common.AssetBuilder.of())); } + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes value to be set + * @return Builder + */ + + public ProductVariantTailoringBuilder attributes( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoringAttribute... attributes) { + this.attributes = new ArrayList<>(Arrays.asList(attributes)); + return this; + } + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes value to be set + * @return Builder + */ + + public ProductVariantTailoringBuilder attributes( + @Nullable final java.util.List attributes) { + this.attributes = attributes; + return this; + } + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes value to be set + * @return Builder + */ + + public ProductVariantTailoringBuilder plusAttributes( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoringAttribute... attributes) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.addAll(Arrays.asList(attributes)); + return this; + } + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringBuilder plusAttributes( + Function builder) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes + .add(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of()) + .build()); + return this; + } + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringBuilder withAttributes( + Function builder) { + this.attributes = new ArrayList<>(); + this.attributes + .add(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of()) + .build()); + return this; + } + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringBuilder addAttributes( + Function builder) { + return plusAttributes( + builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of())); + } + + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringBuilder setAttributes( + Function builder) { + return attributes( + builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of())); + } + /** *

The id of the tailored ProductVariant.

* @return id @@ -248,13 +374,27 @@ public java.util.List getAssets() { return this.assets; } + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @return attributes + */ + + @Nullable + public java.util.List getAttributes() { + return this.attributes; + } + /** * builds ProductVariantTailoring with checking for non-null required values * @return ProductVariantTailoring */ public ProductVariantTailoring build() { Objects.requireNonNull(id, ProductVariantTailoring.class + ": id is missing"); - return new ProductVariantTailoringImpl(id, images, assets); + return new ProductVariantTailoringImpl(id, images, assets, attributes); } /** @@ -262,7 +402,7 @@ public ProductVariantTailoring build() { * @return ProductVariantTailoring */ public ProductVariantTailoring buildUnchecked() { - return new ProductVariantTailoringImpl(id, images, assets); + return new ProductVariantTailoringImpl(id, images, assets, attributes); } /** @@ -283,6 +423,7 @@ public static ProductVariantTailoringBuilder of(final ProductVariantTailoring te builder.id = template.getId(); builder.images = template.getImages(); builder.assets = template.getAssets(); + builder.attributes = template.getAttributes(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java index a51778d874e..432fb85fddb 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraft.java @@ -65,6 +65,18 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr @JsonProperty("assets") public List getAssets(); + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @return attributes + */ + @Valid + @JsonProperty("attributes") + public List getAttributes(); + /** *

The id of the ProductVariant to be tailored.

* @param id value to be set @@ -109,6 +121,29 @@ public interface ProductVariantTailoringDraft extends io.vrap.rmf.base.client.Dr public void setAssets(final List assets); + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes values to be set + */ + + @JsonIgnore + public void setAttributes(final ProductTailoringAttribute... attributes); + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes values to be set + */ + + public void setAttributes(final List attributes); + /** * factory method * @return instance of ProductVariantTailoringDraft @@ -128,6 +163,7 @@ public static ProductVariantTailoringDraft of(final ProductVariantTailoringDraft instance.setSku(template.getSku()); instance.setImages(template.getImages()); instance.setAssets(template.getAssets()); + instance.setAttributes(template.getAttributes()); return instance; } @@ -154,6 +190,11 @@ public static ProductVariantTailoringDraft deepCopy(@Nullable final ProductVaria .map(com.commercetools.api.models.common.Asset::deepCopy) .collect(Collectors.toList())) .orElse(null)); + instance.setAttributes(Optional.ofNullable(template.getAttributes()) + .map(t -> t.stream() + .map(com.commercetools.api.models.product_tailoring.ProductTailoringAttribute::deepCopy) + .collect(Collectors.toList())) + .orElse(null)); return instance; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java index 70cc7fc3545..8d32470154a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftBuilder.java @@ -35,6 +35,9 @@ public class ProductVariantTailoringDraftBuilder implements Builder assets; + @Nullable + private java.util.List attributes; + /** *

The id of the ProductVariant to be tailored.

* @param id value to be set @@ -235,6 +238,129 @@ public ProductVariantTailoringDraftBuilder setAssets( return assets(builder.apply(com.commercetools.api.models.common.AssetBuilder.of())); } + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes value to be set + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder attributes( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoringAttribute... attributes) { + this.attributes = new ArrayList<>(Arrays.asList(attributes)); + return this; + } + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes value to be set + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder attributes( + @Nullable final java.util.List attributes) { + this.attributes = attributes; + return this; + } + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param attributes value to be set + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder plusAttributes( + @Nullable final com.commercetools.api.models.product_tailoring.ProductTailoringAttribute... attributes) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.addAll(Arrays.asList(attributes)); + return this; + } + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder plusAttributes( + Function builder) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes + .add(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of()) + .build()); + return this; + } + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder withAttributes( + Function builder) { + this.attributes = new ArrayList<>(); + this.attributes + .add(builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of()) + .build()); + return this; + } + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder addAttributes( + Function builder) { + return plusAttributes( + builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of())); + } + + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @param builder function to build the attributes value + * @return Builder + */ + + public ProductVariantTailoringDraftBuilder setAttributes( + Function builder) { + return attributes( + builder.apply(com.commercetools.api.models.product_tailoring.ProductTailoringAttributeBuilder.of())); + } + /** *

The id of the ProductVariant to be tailored.

* @return id @@ -275,12 +401,26 @@ public java.util.List getAssets() { return this.assets; } + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ * @return attributes + */ + + @Nullable + public java.util.List getAttributes() { + return this.attributes; + } + /** * builds ProductVariantTailoringDraft with checking for non-null required values * @return ProductVariantTailoringDraft */ public ProductVariantTailoringDraft build() { - return new ProductVariantTailoringDraftImpl(id, sku, images, assets); + return new ProductVariantTailoringDraftImpl(id, sku, images, assets, attributes); } /** @@ -288,7 +428,7 @@ public ProductVariantTailoringDraft build() { * @return ProductVariantTailoringDraft */ public ProductVariantTailoringDraft buildUnchecked() { - return new ProductVariantTailoringDraftImpl(id, sku, images, assets); + return new ProductVariantTailoringDraftImpl(id, sku, images, assets, attributes); } /** @@ -310,6 +450,7 @@ public static ProductVariantTailoringDraftBuilder of(final ProductVariantTailori builder.sku = template.getSku(); builder.images = template.getImages(); builder.assets = template.getAssets(); + builder.attributes = template.getAttributes(); return builder; } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java index 5544accddad..2598b914bdd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftImpl.java @@ -30,17 +30,21 @@ public class ProductVariantTailoringDraftImpl implements ProductVariantTailoring private java.util.List assets; + private java.util.List attributes; + /** * create instance with all properties */ @JsonCreator ProductVariantTailoringDraftImpl(@JsonProperty("id") final Long id, @JsonProperty("sku") final String sku, @JsonProperty("images") final java.util.List images, - @JsonProperty("assets") final java.util.List assets) { + @JsonProperty("assets") final java.util.List assets, + @JsonProperty("attributes") final java.util.List attributes) { this.id = id; this.sku = sku; this.images = images; this.assets = assets; + this.attributes = attributes; } /** @@ -81,6 +85,18 @@ public java.util.List getAssets() { return this.assets; } + /** + *

Attributes of the tailored Product Variant according to the respective AttributeDefinition. If provided, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ */ + + public java.util.List getAttributes() { + return this.attributes; + } + public void setId(final Long id) { this.id = id; } @@ -105,6 +121,16 @@ public void setAssets(final java.util.List(Arrays.asList(attributes)); + } + + public void setAttributes( + final java.util.List attributes) { + this.attributes = attributes; + } + @Override public boolean equals(Object o) { if (this == o) @@ -119,16 +145,23 @@ public boolean equals(Object o) { .append(sku, that.sku) .append(images, that.images) .append(assets, that.assets) + .append(attributes, that.attributes) .append(id, that.id) .append(sku, that.sku) .append(images, that.images) .append(assets, that.assets) + .append(attributes, that.attributes) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(id).append(sku).append(images).append(assets).toHashCode(); + return new HashCodeBuilder(17, 37).append(id) + .append(sku) + .append(images) + .append(assets) + .append(attributes) + .toHashCode(); } @Override @@ -137,6 +170,7 @@ public String toString() { .append("sku", sku) .append("images", images) .append("assets", assets) + .append("attributes", attributes) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java index c8422e1e6e8..0696f0ba773 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringImpl.java @@ -28,16 +28,20 @@ public class ProductVariantTailoringImpl implements ProductVariantTailoring, Mod private java.util.List assets; + private java.util.List attributes; + /** * create instance with all properties */ @JsonCreator ProductVariantTailoringImpl(@JsonProperty("id") final Long id, @JsonProperty("images") final java.util.List images, - @JsonProperty("assets") final java.util.List assets) { + @JsonProperty("assets") final java.util.List assets, + @JsonProperty("attributes") final java.util.List attributes) { this.id = id; this.images = images; this.assets = assets; + this.attributes = attributes; } /** @@ -70,6 +74,18 @@ public java.util.List getAssets() { return this.assets; } + /** + *

Attributes of the tailored Product Variant. If present, these Attributes are selectively merged into the attributes of the corresponding ProductVariant:

+ *
    + *
  • If the ProductVariant contains an Attribute with the same name, its value is overwritten,
  • + *
  • otherwise the Attribute and its value are added to the ProductVariant.
  • + *
+ */ + + public java.util.List getAttributes() { + return this.attributes; + } + public void setId(final Long id) { this.id = id; } @@ -90,6 +106,16 @@ public void setAssets(final java.util.List(Arrays.asList(attributes)); + } + + public void setAttributes( + final java.util.List attributes) { + this.attributes = attributes; + } + @Override public boolean equals(Object o) { if (this == o) @@ -103,15 +129,17 @@ public boolean equals(Object o) { return new EqualsBuilder().append(id, that.id) .append(images, that.images) .append(assets, that.assets) + .append(attributes, that.attributes) .append(id, that.id) .append(images, that.images) .append(assets, that.assets) + .append(attributes, that.attributes) .isEquals(); } @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(id).append(images).append(assets).toHashCode(); + return new HashCodeBuilder(17, 37).append(id).append(images).append(assets).append(attributes).toHashCode(); } @Override @@ -119,6 +147,7 @@ public String toString() { return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) .append("images", images) .append("assets", assets) + .append("attributes", attributes) .build(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java index 400b1aec589..869276854c5 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/subscription/MessageSubscriptionResourceTypeId.java @@ -59,6 +59,9 @@ public interface MessageSubscriptionResourceTypeId extends JsonEnum {

Messages related to ProductSelections.

*/ MessageSubscriptionResourceTypeId PRODUCT_SELECTION = MessageSubscriptionResourceTypeIdEnum.PRODUCT_SELECTION; /** +

Messages related to ProductTailoring.

*/ + MessageSubscriptionResourceTypeId PRODUCT_TAILORING = MessageSubscriptionResourceTypeIdEnum.PRODUCT_TAILORING; + /**

Messages related to Quotes.

*/ MessageSubscriptionResourceTypeId QUOTE = MessageSubscriptionResourceTypeIdEnum.QUOTE; /** @@ -151,6 +154,11 @@ enum MessageSubscriptionResourceTypeIdEnum implements MessageSubscriptionResourc */ PRODUCT_SELECTION("product-selection"), + /** + * product-tailoring + */ + PRODUCT_TAILORING("product-tailoring"), + /** * quote */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java index c213d09737f..6d1e97c9869 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/type/ResourceTypeId.java @@ -86,6 +86,9 @@ public interface ResourceTypeId extends JsonEnum {

ProductSelection

*/ ResourceTypeId PRODUCT_SELECTION = ResourceTypeIdEnum.PRODUCT_SELECTION; /** +

ProductTailoring

*/ + ResourceTypeId PRODUCT_TAILORING = ResourceTypeIdEnum.PRODUCT_TAILORING; + /**

Quote, QuoteRequest and StagedQuote. When a StagedQuote is created, the CustomFields will be copied from the QuoteRequest and when a Quote is created, the CustomFields will be copied from the StagedQuote. For this reason, the Types for Quotes are also valid for QuoteRequests and StagedQuotes, and hence all have the same identifier: quote.

*/ ResourceTypeId QUOTE = ResourceTypeIdEnum.QUOTE; /** @@ -232,6 +235,11 @@ enum ResourceTypeIdEnum implements ResourceTypeId { */ PRODUCT_SELECTION("product-selection"), + /** + * product-tailoring + */ + PRODUCT_TAILORING("product-tailoring"), + /** * quote */ diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java index 493ee477f6f..17ae0f0be8e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ErrorObjectQueryBuilderDsl.java @@ -538,6 +538,13 @@ public CombinationQueryPredicate asSearchIndexingInP ErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asSearchNotReady( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.SearchNotReadyErrorQueryBuilderDsl.of()), + ErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSemanticError( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java index 5a05d05184c..a2d6f26787e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java @@ -549,6 +549,13 @@ public CombinationQueryPredicate asSearchInde GraphQLErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asSearchNotReady( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.GraphQLSearchNotReadyErrorQueryBuilderDsl.of()), + GraphQLErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSemanticError( Function> fn) { return new CombinationQueryPredicate<>( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLSearchNotReadyErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLSearchNotReadyErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..00ee62909f4 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLSearchNotReadyErrorQueryBuilderDsl.java @@ -0,0 +1,20 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class GraphQLSearchNotReadyErrorQueryBuilderDsl { + public GraphQLSearchNotReadyErrorQueryBuilderDsl() { + } + + public static GraphQLSearchNotReadyErrorQueryBuilderDsl of() { + return new GraphQLSearchNotReadyErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, GraphQLSearchNotReadyErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/SearchNotReadyErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/SearchNotReadyErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..d905fba5adb --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/SearchNotReadyErrorQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.error; + +import com.commercetools.api.predicates.query.*; + +public class SearchNotReadyErrorQueryBuilderDsl { + public SearchNotReadyErrorQueryBuilderDsl() { + } + + public static SearchNotReadyErrorQueryBuilderDsl of() { + return new SearchNotReadyErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, SearchNotReadyErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder message() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("message")), + p -> new CombinationQueryPredicate<>(p, SearchNotReadyErrorQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java index b0e9a57ef28..59018b480c0 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAddVariantActionQueryBuilderDsl.java @@ -57,6 +57,22 @@ public CollectionPredicateBuilder new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); } + public CombinationQueryPredicate attributes( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("attributes")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringAttributeQueryBuilderDsl + .of())), + ProductTailoringAddVariantActionQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder attributes() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("attributes")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAddVariantActionQueryBuilderDsl::of)); + } + public BooleanComparisonPredicateBuilder staged() { return new BooleanComparisonPredicateBuilder<>( BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAttributeQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAttributeQueryBuilderDsl.java new file mode 100644 index 00000000000..66de73ff519 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringAttributeQueryBuilderDsl.java @@ -0,0 +1,26 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringAttributeQueryBuilderDsl { + public ProductTailoringAttributeQueryBuilderDsl() { + } + + public static ProductTailoringAttributeQueryBuilderDsl of() { + return new ProductTailoringAttributeQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAttributeQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringAttributeQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAttributeActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAttributeActionQueryBuilderDsl.java new file mode 100644 index 00000000000..031301a7e5a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAttributeActionQueryBuilderDsl.java @@ -0,0 +1,49 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAttributeActionQueryBuilderDsl { + public ProductTailoringSetAttributeActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAttributeActionQueryBuilderDsl of() { + return new ProductTailoringSetAttributeActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAttributeActionQueryBuilderDsl::of)); + } + + public LongComparisonPredicateBuilder variantId() { + return new LongComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("variantId")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAttributeActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAttributeActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAttributeActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAttributeActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, ProductTailoringSetAttributeActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl.java new file mode 100644 index 00000000000..e0ddcf5fd03 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl.java @@ -0,0 +1,40 @@ + +package com.commercetools.api.predicates.query.product_tailoring; + +import com.commercetools.api.predicates.query.*; + +public class ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl { + public ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl() { + } + + public static ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl of() { + return new ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder action() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("action")), + p -> new CombinationQueryPredicate<>(p, + ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder name() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("name")), p -> new CombinationQueryPredicate<>(p, + ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder value() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("value")), p -> new CombinationQueryPredicate<>(p, + ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl::of)); + } + + public BooleanComparisonPredicateBuilder staged() { + return new BooleanComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("staged")), + p -> new CombinationQueryPredicate<>(p, + ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl::of)); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java index bef1a89ec53..27dad22bb27 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductTailoringUpdateActionQueryBuilderDsl.java @@ -146,6 +146,22 @@ public CombinationQueryPredicate as ProductTailoringUpdateActionQueryBuilderDsl::of); } + public CombinationQueryPredicate asSetAttribute( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAttributeActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + + public CombinationQueryPredicate asSetAttributeInAllVariants( + Function> fn) { + return new CombinationQueryPredicate<>(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringSetAttributeInAllVariantsActionQueryBuilderDsl + .of()), + ProductTailoringUpdateActionQueryBuilderDsl::of); + } + public CombinationQueryPredicate asSetDescription( Function> fn) { return new CombinationQueryPredicate<>(fn.apply( diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java index f5b6292e4a7..2c2e4c65ce1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringDraftQueryBuilderDsl.java @@ -51,4 +51,20 @@ public CollectionPredicateBuilder a p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringDraftQueryBuilderDsl::of)); } + public CombinationQueryPredicate attributes( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("attributes")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringAttributeQueryBuilderDsl + .of())), + ProductVariantTailoringDraftQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder attributes() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("attributes")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringDraftQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java index 2d2ba12b909..7dd4d33005e 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/product_tailoring/ProductVariantTailoringQueryBuilderDsl.java @@ -46,4 +46,20 @@ public CollectionPredicateBuilder assets p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringQueryBuilderDsl::of)); } + public CombinationQueryPredicate attributes( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("attributes")) + .inner(fn.apply( + com.commercetools.api.predicates.query.product_tailoring.ProductTailoringAttributeQueryBuilderDsl + .of())), + ProductVariantTailoringQueryBuilderDsl::of); + } + + public CollectionPredicateBuilder attributes() { + return new CollectionPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("attributes")), + p -> new CombinationQueryPredicate<>(p, ProductVariantTailoringQueryBuilderDsl::of)); + } + } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorTest.java new file mode 100644 index 00000000000..6c780ec38be --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLSearchNotReadyErrorTest.java @@ -0,0 +1,13 @@ + +package com.commercetools.api.models.error; + +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class GraphQLSearchNotReadyErrorTest { + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorTest.java new file mode 100644 index 00000000000..5395d67c849 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/SearchNotReadyErrorTest.java @@ -0,0 +1,36 @@ + +package com.commercetools.api.models.error; + +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 SearchNotReadyErrorTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(SearchNotReadyErrorBuilder builder) { + SearchNotReadyError searchNotReadyError = builder.buildUnchecked(); + Assertions.assertThat(searchNotReadyError).isInstanceOf(SearchNotReadyError.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { SearchNotReadyError.builder().message("message") } }; + } + + @Test + public void message() { + SearchNotReadyError value = SearchNotReadyError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java index dfb075f9a8f..7e4b158ef96 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAddVariantActionTest.java @@ -32,6 +32,9 @@ public static Object[][] objectBuilder() { .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, new Object[] { ProductTailoringAddVariantAction.builder() .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetDraftImpl())) }, + new Object[] { ProductTailoringAddVariantAction.builder() + .attributes(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())) }, new Object[] { ProductTailoringAddVariantAction.builder().staged(true) } }; } @@ -65,6 +68,16 @@ public void assets() { .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetDraftImpl())); } + @Test + public void attributes() { + ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); + value.setAttributes(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())); + Assertions.assertThat(value.getAttributes()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())); + } + @Test public void staged() { ProductTailoringAddVariantAction value = ProductTailoringAddVariantAction.of(); diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeTest.java new file mode 100644 index 00000000000..e16213ec163 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringAttributeTest.java @@ -0,0 +1,44 @@ + +package com.commercetools.api.models.product_tailoring; + +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 ProductTailoringAttributeTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringAttributeBuilder builder) { + ProductTailoringAttribute productTailoringAttribute = builder.buildUnchecked(); + Assertions.assertThat(productTailoringAttribute).isInstanceOf(ProductTailoringAttribute.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringAttribute.builder().name("name") }, + new Object[] { ProductTailoringAttribute.builder().value("value") } }; + } + + @Test + public void name() { + ProductTailoringAttribute value = ProductTailoringAttribute.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductTailoringAttribute value = ProductTailoringAttribute.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionTest.java new file mode 100644 index 00000000000..696991cd496 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeActionTest.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.models.product_tailoring; + +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 ProductTailoringSetAttributeActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAttributeActionBuilder builder) { + ProductTailoringSetAttributeAction productTailoringSetAttributeAction = builder.buildUnchecked(); + Assertions.assertThat(productTailoringSetAttributeAction) + .isInstanceOf(ProductTailoringSetAttributeAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAttributeAction.builder().variantId(5L) }, + new Object[] { ProductTailoringSetAttributeAction.builder().sku("sku") }, + new Object[] { ProductTailoringSetAttributeAction.builder().name("name") }, + new Object[] { ProductTailoringSetAttributeAction.builder().value("value") }, + new Object[] { ProductTailoringSetAttributeAction.builder().staged(true) } }; + } + + @Test + public void variantId() { + ProductTailoringSetAttributeAction value = ProductTailoringSetAttributeAction.of(); + value.setVariantId(5L); + Assertions.assertThat(value.getVariantId()).isEqualTo(5L); + } + + @Test + public void sku() { + ProductTailoringSetAttributeAction value = ProductTailoringSetAttributeAction.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void name() { + ProductTailoringSetAttributeAction value = ProductTailoringSetAttributeAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductTailoringSetAttributeAction value = ProductTailoringSetAttributeAction.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } + + @Test + public void staged() { + ProductTailoringSetAttributeAction value = ProductTailoringSetAttributeAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionTest.java new file mode 100644 index 00000000000..5d9c0e284aa --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductTailoringSetAttributeInAllVariantsActionTest.java @@ -0,0 +1,54 @@ + +package com.commercetools.api.models.product_tailoring; + +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 ProductTailoringSetAttributeInAllVariantsActionTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(ProductTailoringSetAttributeInAllVariantsActionBuilder builder) { + ProductTailoringSetAttributeInAllVariantsAction productTailoringSetAttributeInAllVariantsAction = builder + .buildUnchecked(); + Assertions.assertThat(productTailoringSetAttributeInAllVariantsAction) + .isInstanceOf(ProductTailoringSetAttributeInAllVariantsAction.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { ProductTailoringSetAttributeInAllVariantsAction.builder().name("name") }, + new Object[] { ProductTailoringSetAttributeInAllVariantsAction.builder().value("value") }, + new Object[] { ProductTailoringSetAttributeInAllVariantsAction.builder().staged(true) } }; + } + + @Test + public void name() { + ProductTailoringSetAttributeInAllVariantsAction value = ProductTailoringSetAttributeInAllVariantsAction.of(); + value.setName("name"); + Assertions.assertThat(value.getName()).isEqualTo("name"); + } + + @Test + public void value() { + ProductTailoringSetAttributeInAllVariantsAction value = ProductTailoringSetAttributeInAllVariantsAction.of(); + value.setValue("value"); + Assertions.assertThat(value.getValue()).isEqualTo("value"); + } + + @Test + public void staged() { + ProductTailoringSetAttributeInAllVariantsAction value = ProductTailoringSetAttributeInAllVariantsAction.of(); + value.setStaged(true); + Assertions.assertThat(value.getStaged()).isEqualTo(true); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java index 0ac95fa85e6..fe81a4de78e 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringDraftTest.java @@ -31,7 +31,10 @@ public static Object[][] objectBuilder() { new Object[] { ProductVariantTailoringDraft.builder() .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, new Object[] { ProductVariantTailoringDraft.builder() - .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())) } }; + .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())) }, + new Object[] { ProductVariantTailoringDraft.builder() + .attributes(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())) } }; } @Test @@ -63,4 +66,14 @@ public void assets() { Assertions.assertThat(value.getAssets()) .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())); } + + @Test + public void attributes() { + ProductVariantTailoringDraft value = ProductVariantTailoringDraft.of(); + value.setAttributes(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())); + Assertions.assertThat(value.getAttributes()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java index a6c88c860e2..ce88c818e25 100644 --- a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/product_tailoring/ProductVariantTailoringTest.java @@ -30,7 +30,10 @@ public static Object[][] objectBuilder() { new Object[] { ProductVariantTailoring.builder() .images(Collections.singletonList(new com.commercetools.api.models.common.ImageImpl())) }, new Object[] { ProductVariantTailoring.builder() - .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())) } }; + .assets(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())) }, + new Object[] { ProductVariantTailoring.builder() + .attributes(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())) } }; } @Test @@ -55,4 +58,14 @@ public void assets() { Assertions.assertThat(value.getAssets()) .isEqualTo(Collections.singletonList(new com.commercetools.api.models.common.AssetImpl())); } + + @Test + public void attributes() { + ProductVariantTailoring value = ProductVariantTailoring.of(); + value.setAttributes(Collections + .singletonList(new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())); + Assertions.assertThat(value.getAttributes()) + .isEqualTo(Collections.singletonList( + new com.commercetools.api.models.product_tailoring.ProductTailoringAttributeImpl())); + } } diff --git a/references.txt b/references.txt index 3ffbe744d64..562219b1392 100644 --- a/references.txt +++ b/references.txt @@ -306,3 +306,4 @@ ce56ab7c65a688f75d5cd4095378d6647c6bd9ae 0065cdd802adcbf53195095773ccc5a2becca69e ce2753aafee0b1d96970abb600b606748ce40568 d947f454821e0834a2c8a8605d4a0f3347c11d4e +efc70952597a3160e6bb47891894b109bd82b7c3