diff --git a/changes.md b/changes.md index c2deeba143c..3f8468995d7 100644 --- a/changes.md +++ b/changes.md @@ -1,42 +1,8 @@ -**Api changes** - -
-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` -- added property `customers` to type `SearchIndexingConfiguration` -
- +**Import changes**
Added Type(s) -- added type `SearchNotReadyError` -- added type `GraphQLSearchNotReadyError` -- added type `ProductTailoringAttribute` -- added type `ProductTailoringSetAttributeAction` -- added type `ProductTailoringSetAttributeInAllVariantsAction` -- added type `ImageProcessingOngoingWarning` -- added type `WarningObject` -
- - -
-Removed Type(s) - -- :warning: removed type `ProductSearchStatus` -
- - -
-Added Enum(s) - -- added enum `customer-group` to type `ExtensionResourceTypeId` -- added enum `product-tailoring` to type `MessageSubscriptionResourceTypeId` -- added enum `product-tailoring` to type `ResourceTypeId` +- added type `InvalidFieldsUpdateError`
diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java index 4b5946d92b1..14ccf6916b5 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImport.java @@ -67,6 +67,7 @@ public interface DiscountCodeImport extends ImportResource { /** *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return code */ @NotNull @@ -169,6 +170,7 @@ public interface DiscountCodeImport extends ImportResource { /** *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param code value to be set */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java index 0d07d54a483..d16883f0150 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportBuilder.java @@ -147,6 +147,7 @@ public DiscountCodeImportBuilder description( /** *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param code value to be set * @return Builder */ @@ -418,6 +419,7 @@ public com.commercetools.importapi.models.common.LocalizedString getDescription( /** *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return code */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java index 79c387cddff..5353c530c7f 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/discount_codes/DiscountCodeImportImpl.java @@ -111,6 +111,7 @@ public com.commercetools.importapi.models.common.LocalizedString getDescription( /** *

User-defined unique identifier of the DiscountCode that is used by the customer to apply the discount.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

*/ public String getCode() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java index 5bfdbc59d28..bc9444d996d 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObject.java @@ -39,6 +39,7 @@ @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InsufficientScopeErrorImpl.class, name = InsufficientScopeError.INSUFFICIENT_SCOPE), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidCredentialsErrorImpl.class, name = InvalidCredentialsError.INVALID_CREDENTIALS), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidFieldErrorImpl.class, name = InvalidFieldError.INVALID_FIELD), + @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorImpl.class, name = InvalidFieldsUpdateError.INVALID_FIELD_UPDATE), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidInputImpl.class, name = InvalidInput.INVALID_INPUT), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidJsonInputImpl.class, name = InvalidJsonInput.INVALID_JSON_INPUT), @JsonSubTypes.Type(value = com.commercetools.importapi.models.errors.InvalidOperationImpl.class, name = InvalidOperation.INVALID_OPERATION), @@ -133,6 +134,10 @@ public static ErrorObject deepCopy(@Nullable final ErrorObject template) { return com.commercetools.importapi.models.errors.InvalidFieldError .deepCopy((com.commercetools.importapi.models.errors.InvalidFieldError) template); } + if (template instanceof com.commercetools.importapi.models.errors.InvalidFieldsUpdateError) { + return com.commercetools.importapi.models.errors.InvalidFieldsUpdateError + .deepCopy((com.commercetools.importapi.models.errors.InvalidFieldsUpdateError) template); + } if (template instanceof com.commercetools.importapi.models.errors.InvalidInput) { return com.commercetools.importapi.models.errors.InvalidInput .deepCopy((com.commercetools.importapi.models.errors.InvalidInput) template); @@ -274,6 +279,14 @@ public static com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder return com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder.of(); } + /** + * builder for invalidFieldUpdate subtype + * @return builder + */ + public static com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder invalidFieldUpdateBuilder() { + return com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder.of(); + } + /** * builder for invalidInput subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java index 1ece23fb0c2..1953b8c7bbf 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ErrorObjectBuilder.java @@ -55,6 +55,10 @@ public com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder invali return com.commercetools.importapi.models.errors.InvalidFieldErrorBuilder.of(); } + public com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder invalidFieldUpdateBuilder() { + return com.commercetools.importapi.models.errors.InvalidFieldsUpdateErrorBuilder.of(); + } + public com.commercetools.importapi.models.errors.InvalidInputBuilder invalidInputBuilder() { return com.commercetools.importapi.models.errors.InvalidInputBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateError.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateError.java new file mode 100644 index 00000000000..9b8e4e88492 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateError.java @@ -0,0 +1,153 @@ + +package com.commercetools.importapi.models.errors; + +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 when a field cannot be updated.

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

+ *     InvalidFieldsUpdateError invalidFieldsUpdateError = InvalidFieldsUpdateError.builder()
+ *             .message("{message}")
+ *             .plusFields(fieldsBuilder -> fieldsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = InvalidFieldsUpdateErrorImpl.class) +public interface InvalidFieldsUpdateError extends ErrorObject { + + /** + * discriminator value for InvalidFieldsUpdateError + */ + String INVALID_FIELD_UPDATE = "InvalidFieldUpdate"; + + /** + *

"The following fields are currently not supported for changes/updates"

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

Fields that cannot be updated.

+ * @return fields + */ + @NotNull + @JsonProperty("fields") + public List getFields(); + + /** + *

"The following fields are currently not supported for changes/updates"

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

Fields that cannot be updated.

+ * @param fields values to be set + */ + + @JsonIgnore + public void setFields(final String... fields); + + /** + *

Fields that cannot be updated.

+ * @param fields values to be set + */ + + public void setFields(final List fields); + + /** + * factory method + * @return instance of InvalidFieldsUpdateError + */ + public static InvalidFieldsUpdateError of() { + return new InvalidFieldsUpdateErrorImpl(); + } + + /** + * factory method to create a shallow copy InvalidFieldsUpdateError + * @param template instance to be copied + * @return copy instance + */ + public static InvalidFieldsUpdateError of(final InvalidFieldsUpdateError template) { + InvalidFieldsUpdateErrorImpl instance = new InvalidFieldsUpdateErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setFields(template.getFields()); + return instance; + } + + /** + * factory method to create a deep copy of InvalidFieldsUpdateError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static InvalidFieldsUpdateError deepCopy(@Nullable final InvalidFieldsUpdateError template) { + if (template == null) { + return null; + } + InvalidFieldsUpdateErrorImpl instance = new InvalidFieldsUpdateErrorImpl(); + instance.setMessage(template.getMessage()); + instance.setFields(Optional.ofNullable(template.getFields()).map(ArrayList::new).orElse(null)); + return instance; + } + + /** + * builder factory method for InvalidFieldsUpdateError + * @return builder + */ + public static InvalidFieldsUpdateErrorBuilder builder() { + return InvalidFieldsUpdateErrorBuilder.of(); + } + + /** + * create builder for InvalidFieldsUpdateError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidFieldsUpdateErrorBuilder builder(final InvalidFieldsUpdateError template) { + return InvalidFieldsUpdateErrorBuilder.of(template); + } + + /** + * accessor map function + * @param mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withInvalidFieldsUpdateError(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-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorBuilder.java new file mode 100644 index 00000000000..f938261c5fb --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorBuilder.java @@ -0,0 +1,132 @@ + +package com.commercetools.importapi.models.errors; + +import java.util.*; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * InvalidFieldsUpdateErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     InvalidFieldsUpdateError invalidFieldsUpdateError = InvalidFieldsUpdateError.builder()
+ *             .message("{message}")
+ *             .plusFields(fieldsBuilder -> fieldsBuilder)
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class InvalidFieldsUpdateErrorBuilder implements Builder { + + private String message; + + private java.util.List fields; + + /** + *

"The following fields are currently not supported for changes/updates"

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

Fields that cannot be updated.

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

Fields that cannot be updated.

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

Fields that cannot be updated.

+ * @param fields value to be set + * @return Builder + */ + + public InvalidFieldsUpdateErrorBuilder plusFields(final String... fields) { + if (this.fields == null) { + this.fields = new ArrayList<>(); + } + this.fields.addAll(Arrays.asList(fields)); + return this; + } + + /** + *

"The following fields are currently not supported for changes/updates"

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

Fields that cannot be updated.

+ * @return fields + */ + + public java.util.List getFields() { + return this.fields; + } + + /** + * builds InvalidFieldsUpdateError with checking for non-null required values + * @return InvalidFieldsUpdateError + */ + public InvalidFieldsUpdateError build() { + Objects.requireNonNull(message, InvalidFieldsUpdateError.class + ": message is missing"); + Objects.requireNonNull(fields, InvalidFieldsUpdateError.class + ": fields is missing"); + return new InvalidFieldsUpdateErrorImpl(message, fields); + } + + /** + * builds InvalidFieldsUpdateError without checking for non-null required values + * @return InvalidFieldsUpdateError + */ + public InvalidFieldsUpdateError buildUnchecked() { + return new InvalidFieldsUpdateErrorImpl(message, fields); + } + + /** + * factory method for an instance of InvalidFieldsUpdateErrorBuilder + * @return builder + */ + public static InvalidFieldsUpdateErrorBuilder of() { + return new InvalidFieldsUpdateErrorBuilder(); + } + + /** + * create builder for InvalidFieldsUpdateError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static InvalidFieldsUpdateErrorBuilder of(final InvalidFieldsUpdateError template) { + InvalidFieldsUpdateErrorBuilder builder = new InvalidFieldsUpdateErrorBuilder(); + builder.message = template.getMessage(); + builder.fields = template.getFields(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorImpl.java new file mode 100644 index 00000000000..d1455b0b1eb --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorImpl.java @@ -0,0 +1,117 @@ + +package com.commercetools.importapi.models.errors; + +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 when a field cannot be updated.

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

"The following fields are currently not supported for changes/updates"

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

Fields that cannot be updated.

+ */ + + public java.util.List getFields() { + return this.fields; + } + + public void setMessage(final String message) { + this.message = message; + } + + public void setFields(final String... fields) { + this.fields = new ArrayList<>(Arrays.asList(fields)); + } + + public void setFields(final java.util.List fields) { + this.fields = fields; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + InvalidFieldsUpdateErrorImpl that = (InvalidFieldsUpdateErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(fields, that.fields) + .append(code, that.code) + .append(message, that.message) + .append(fields, that.fields) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code).append(message).append(fields).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("fields", fields) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImport.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImport.java index 315b1e29a88..f31f20bbee8 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImport.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImport.java @@ -70,6 +70,7 @@ public interface StandalonePriceImport extends ImportResource { /** *

Sets the country for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return country */ @@ -78,6 +79,7 @@ public interface StandalonePriceImport extends ImportResource { /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return customerGroup */ @Valid @@ -85,7 +87,8 @@ public interface StandalonePriceImport extends ImportResource { public CustomerGroupKeyReference getCustomerGroup(); /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return channel */ @Valid @@ -155,6 +158,7 @@ public interface StandalonePriceImport extends ImportResource { /** *

Sets the country for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param country value to be set */ @@ -162,13 +166,15 @@ public interface StandalonePriceImport extends ImportResource { /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param customerGroup value to be set */ public void setCustomerGroup(final CustomerGroupKeyReference customerGroup); /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param channel value to be set */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportBuilder.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportBuilder.java index b64daad8138..a12ab3d1223 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportBuilder.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportBuilder.java @@ -103,6 +103,7 @@ public StandalonePriceImportBuilder value( /** *

Sets the country for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param country value to be set * @return Builder */ @@ -114,6 +115,7 @@ public StandalonePriceImportBuilder country(@Nullable final String country) { /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param builder function to build the customerGroup value * @return Builder */ @@ -128,6 +130,7 @@ public StandalonePriceImportBuilder customerGroup( /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param builder function to build the customerGroup value * @return Builder */ @@ -141,6 +144,7 @@ public StandalonePriceImportBuilder withCustomerGroup( /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param customerGroup value to be set * @return Builder */ @@ -152,7 +156,8 @@ public StandalonePriceImportBuilder customerGroup( } /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param builder function to build the channel value * @return Builder */ @@ -164,7 +169,8 @@ public StandalonePriceImportBuilder channel( } /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param builder function to build the channel value * @return Builder */ @@ -176,7 +182,8 @@ public StandalonePriceImportBuilder withChannel( } /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @param channel value to be set * @return Builder */ @@ -399,6 +406,7 @@ public com.commercetools.importapi.models.common.TypedMoney getValue() { /** *

Sets the country for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return country */ @@ -409,6 +417,7 @@ public String getCountry() { /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return customerGroup */ @@ -418,7 +427,8 @@ public com.commercetools.importapi.models.common.CustomerGroupKeyReference getCu } /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

* @return channel */ diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportImpl.java index e1e2e42e3f4..0e6604b62bd 100644 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportImpl.java +++ b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/standalone_prices/StandalonePriceImportImpl.java @@ -103,6 +103,7 @@ public com.commercetools.importapi.models.common.TypedMoney getValue() { /** *

Sets the country for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

*/ public String getCountry() { @@ -111,6 +112,7 @@ public String getCountry() { /** *

Sets the CustomerGroup for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

*/ public com.commercetools.importapi.models.common.CustomerGroupKeyReference getCustomerGroup() { @@ -118,7 +120,8 @@ public com.commercetools.importapi.models.common.CustomerGroupKeyReference getCu } /** - *

Sets the product distribution Channel for which this Price is valid

+ *

Sets the product distribution Channel for which this Price is valid.

+ *

The value cannot be updated. Attempting to update the value will result in an InvalidFieldsUpdate error.

*/ public com.commercetools.importapi.models.common.ChannelKeyReference getChannel() { diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorTest.java new file mode 100644 index 00000000000..984e1617b03 --- /dev/null +++ b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/InvalidFieldsUpdateErrorTest.java @@ -0,0 +1,46 @@ + +package com.commercetools.importapi.models.errors; + +import java.util.Collections; + +import com.tngtech.junit.dataprovider.DataProvider; +import com.tngtech.junit.dataprovider.DataProviderExtension; +import com.tngtech.junit.dataprovider.UseDataProvider; +import com.tngtech.junit.dataprovider.UseDataProviderExtension; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.extension.ExtendWith; + +@ExtendWith(UseDataProviderExtension.class) +@ExtendWith(DataProviderExtension.class) +public class InvalidFieldsUpdateErrorTest { + + @TestTemplate + @UseDataProvider("objectBuilder") + public void buildUnchecked(InvalidFieldsUpdateErrorBuilder builder) { + InvalidFieldsUpdateError invalidFieldsUpdateError = builder.buildUnchecked(); + Assertions.assertThat(invalidFieldsUpdateError).isInstanceOf(InvalidFieldsUpdateError.class); + } + + @DataProvider + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { InvalidFieldsUpdateError.builder().message("message") }, + new Object[] { InvalidFieldsUpdateError.builder().fields(Collections.singletonList("fields")) } }; + } + + @Test + public void message() { + InvalidFieldsUpdateError value = InvalidFieldsUpdateError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void fields() { + InvalidFieldsUpdateError value = InvalidFieldsUpdateError.of(); + value.setFields(Collections.singletonList("fields")); + Assertions.assertThat(value.getFields()).isEqualTo(Collections.singletonList("fields")); + } +} diff --git a/reference.txt b/reference.txt new file mode 100644 index 00000000000..b4f0b230960 --- /dev/null +++ b/reference.txt @@ -0,0 +1 @@ +b3909d6ce2ff49eb8bda2b0ba7f965aa3d6e643e diff --git a/references.txt b/references.txt index 429919b11ab..1fa0e19f133 100644 --- a/references.txt +++ b/references.txt @@ -311,3 +311,4 @@ efc70952597a3160e6bb47891894b109bd82b7c3 c77ec902f368c2c31505fcb65a835ce148350077 903922e6a2dc0ff9283757645395f5119f61be0e 4d99474bc43b90f392085d18a75bb826c4cb25e0 +e985f4b7aa55610705ee49bd3eb645c2fd03eb6c