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`
-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`
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.
+ * + *
+ * InvalidFieldsUpdateError invalidFieldsUpdateError = InvalidFieldsUpdateError.builder()
+ * .message("{message}")
+ * .plusFields(fieldsBuilder -> fieldsBuilder)
+ * .build()
+ *
+ * "The following fields are currently not supported for changes/updates"
Fields that cannot be updated.
+ * @return fields + */ + @NotNull + @JsonProperty("fields") + public List"The following fields are currently not supported for changes/updates"
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
+ * InvalidFieldsUpdateError invalidFieldsUpdateError = InvalidFieldsUpdateError.builder()
+ * .message("{message}")
+ * .plusFields(fieldsBuilder -> fieldsBuilder)
+ * .build()
+ *
+ * "The following fields are currently not supported for changes/updates"
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.ListFields 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"
Fields that cannot be updated.
+ * @return fields + */ + + public java.util.ListReturned 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"The following fields are currently not supported for changes/updates"
Fields that cannot be updated.
+ */ + + public java.util.ListSets 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