diff --git a/changes.md b/changes.md
index d58f6d2481f..53dc55e046b 100644
--- a/changes.md
+++ b/changes.md
@@ -1,9 +1,8 @@
-**Api changes**
+**Import changes**
Changed Property(s)
+Removed Type(s)
-- :warning: changed property `totalPrice` of type `StagedOrder` from type `TypedMoney` to `CentPrecisionMoney`
-- :warning: changed property `totalPrice` of type `Order` from type `TypedMoney` to `CentPrecisionMoney`
+- :warning: removed type `ReferencedResourceNotFound`
Returned when a resource referenced by a Reference or a ResourceIdentifier could not be found.
- * - *
- * ReferencedResourceNotFound referencedResourceNotFound = ReferencedResourceNotFound.builder()
- * .message("{message}")
- * .typeId(ReferenceType.CART)
- * .build()
- *
- * "The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
Type of referenced resource.
- * @return typeId - */ - @NotNull - @JsonProperty("typeId") - public ReferenceType getTypeId(); - - /** - *Unique identifier of the referenced resource, if known.
- * @return id - */ - - @JsonProperty("id") - public String getId(); - - /** - *User-defined unique identifier of the referenced resource, if known.
- * @return key - */ - - @JsonProperty("key") - public String getKey(); - - /** - *"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
Type of referenced resource.
- * @param typeId value to be set - */ - - public void setTypeId(final ReferenceType typeId); - - /** - *Unique identifier of the referenced resource, if known.
- * @param id value to be set - */ - - public void setId(final String id); - - /** - *User-defined unique identifier of the referenced resource, if known.
- * @param key value to be set - */ - - public void setKey(final String key); - - /** - * factory method - * @return instance of ReferencedResourceNotFound - */ - public static ReferencedResourceNotFound of() { - return new ReferencedResourceNotFoundImpl(); - } - - /** - * factory method to create a shallow copy ReferencedResourceNotFound - * @param template instance to be copied - * @return copy instance - */ - public static ReferencedResourceNotFound of(final ReferencedResourceNotFound template) { - ReferencedResourceNotFoundImpl instance = new ReferencedResourceNotFoundImpl(); - instance.setMessage(template.getMessage()); - instance.setTypeId(template.getTypeId()); - instance.setId(template.getId()); - instance.setKey(template.getKey()); - return instance; - } - - /** - * factory method to create a deep copy of ReferencedResourceNotFound - * @param template instance to be copied - * @return copy instance - */ - @Nullable - public static ReferencedResourceNotFound deepCopy(@Nullable final ReferencedResourceNotFound template) { - if (template == null) { - return null; - } - ReferencedResourceNotFoundImpl instance = new ReferencedResourceNotFoundImpl(); - instance.setMessage(template.getMessage()); - instance.setTypeId(template.getTypeId()); - instance.setId(template.getId()); - instance.setKey(template.getKey()); - return instance; - } - - /** - * builder factory method for ReferencedResourceNotFound - * @return builder - */ - public static ReferencedResourceNotFoundBuilder builder() { - return ReferencedResourceNotFoundBuilder.of(); - } - - /** - * create builder for ReferencedResourceNotFound instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ReferencedResourceNotFoundBuilder builder(final ReferencedResourceNotFound template) { - return ReferencedResourceNotFoundBuilder.of(template); - } - - /** - * accessor map function - * @param
- * ReferencedResourceNotFound referencedResourceNotFound = ReferencedResourceNotFound.builder()
- * .message("{message}")
- * .typeId(ReferenceType.CART)
- * .build()
- *
- * "The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
Type of referenced resource.
- * @param typeId value to be set - * @return Builder - */ - - public ReferencedResourceNotFoundBuilder typeId( - final com.commercetools.importapi.models.common.ReferenceType typeId) { - this.typeId = typeId; - return this; - } - - /** - *Unique identifier of the referenced resource, if known.
- * @param id value to be set - * @return Builder - */ - - public ReferencedResourceNotFoundBuilder id(@Nullable final String id) { - this.id = id; - return this; - } - - /** - *User-defined unique identifier of the referenced resource, if known.
- * @param key value to be set - * @return Builder - */ - - public ReferencedResourceNotFoundBuilder key(@Nullable final String key) { - this.key = key; - return this; - } - - /** - *"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
Type of referenced resource.
- * @return typeId - */ - - public com.commercetools.importapi.models.common.ReferenceType getTypeId() { - return this.typeId; - } - - /** - *Unique identifier of the referenced resource, if known.
- * @return id - */ - - @Nullable - public String getId() { - return this.id; - } - - /** - *User-defined unique identifier of the referenced resource, if known.
- * @return key - */ - - @Nullable - public String getKey() { - return this.key; - } - - /** - * builds ReferencedResourceNotFound with checking for non-null required values - * @return ReferencedResourceNotFound - */ - public ReferencedResourceNotFound build() { - Objects.requireNonNull(message, ReferencedResourceNotFound.class + ": message is missing"); - Objects.requireNonNull(typeId, ReferencedResourceNotFound.class + ": typeId is missing"); - return new ReferencedResourceNotFoundImpl(message, typeId, id, key); - } - - /** - * builds ReferencedResourceNotFound without checking for non-null required values - * @return ReferencedResourceNotFound - */ - public ReferencedResourceNotFound buildUnchecked() { - return new ReferencedResourceNotFoundImpl(message, typeId, id, key); - } - - /** - * factory method for an instance of ReferencedResourceNotFoundBuilder - * @return builder - */ - public static ReferencedResourceNotFoundBuilder of() { - return new ReferencedResourceNotFoundBuilder(); - } - - /** - * create builder for ReferencedResourceNotFound instance - * @param template instance with prefilled values for the builder - * @return builder - */ - public static ReferencedResourceNotFoundBuilder of(final ReferencedResourceNotFound template) { - ReferencedResourceNotFoundBuilder builder = new ReferencedResourceNotFoundBuilder(); - builder.message = template.getMessage(); - builder.typeId = template.getTypeId(); - builder.id = template.getId(); - builder.key = template.getKey(); - return builder; - } - -} diff --git a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ReferencedResourceNotFoundImpl.java b/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ReferencedResourceNotFoundImpl.java deleted file mode 100644 index 42603070f7a..00000000000 --- a/commercetools/commercetools-sdk-java-importapi/src/main/java-generated/com/commercetools/importapi/models/errors/ReferencedResourceNotFoundImpl.java +++ /dev/null @@ -1,155 +0,0 @@ - -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 resource referenced by a Reference or a ResourceIdentifier could not be found.
- */ -@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") -public class ReferencedResourceNotFoundImpl implements ReferencedResourceNotFound, ModelBase { - - private String code; - - private String message; - - private com.commercetools.importapi.models.common.ReferenceType typeId; - - private String id; - - private String key; - - /** - * create instance with all properties - */ - @JsonCreator - ReferencedResourceNotFoundImpl(@JsonProperty("message") final String message, - @JsonProperty("typeId") final com.commercetools.importapi.models.common.ReferenceType typeId, - @JsonProperty("id") final String id, @JsonProperty("key") final String key) { - this.message = message; - this.typeId = typeId; - this.id = id; - this.key = key; - this.code = REFERENCED_RESOURCE_NOT_FOUND; - } - - /** - * create empty instance - */ - public ReferencedResourceNotFoundImpl() { - this.code = REFERENCED_RESOURCE_NOT_FOUND; - } - - /** - * - */ - - public String getCode() { - return this.code; - } - - /** - *"The referenced object of type $typeId $predicate was not found. It either doesn't exist, or it can't be accessed from this endpoint (e.g., if the endpoint filters by store or customer account)."
Type of referenced resource.
- */ - - public com.commercetools.importapi.models.common.ReferenceType getTypeId() { - return this.typeId; - } - - /** - *Unique identifier of the referenced resource, if known.
- */ - - public String getId() { - return this.id; - } - - /** - *User-defined unique identifier of the referenced resource, if known.
- */ - - public String getKey() { - return this.key; - } - - public void setMessage(final String message) { - this.message = message; - } - - public void setTypeId(final com.commercetools.importapi.models.common.ReferenceType typeId) { - this.typeId = typeId; - } - - public void setId(final String id) { - this.id = id; - } - - public void setKey(final String key) { - this.key = key; - } - - @Override - public boolean equals(Object o) { - if (this == o) - return true; - - if (o == null || getClass() != o.getClass()) - return false; - - ReferencedResourceNotFoundImpl that = (ReferencedResourceNotFoundImpl) o; - - return new EqualsBuilder().append(code, that.code) - .append(message, that.message) - .append(typeId, that.typeId) - .append(id, that.id) - .append(key, that.key) - .append(code, that.code) - .append(message, that.message) - .append(typeId, that.typeId) - .append(id, that.id) - .append(key, that.key) - .isEquals(); - } - - @Override - public int hashCode() { - return new HashCodeBuilder(17, 37).append(code) - .append(message) - .append(typeId) - .append(id) - .append(key) - .toHashCode(); - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) - .append("message", message) - .append("typeId", typeId) - .append("id", id) - .append("key", key) - .build(); - } - -} diff --git a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/ReferencedResourceNotFoundTest.java b/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/ReferencedResourceNotFoundTest.java deleted file mode 100644 index cf5d11b3bb7..00000000000 --- a/commercetools/commercetools-sdk-java-importapi/src/test/java-generated/com/commercetools/importapi/models/errors/ReferencedResourceNotFoundTest.java +++ /dev/null @@ -1,62 +0,0 @@ - -package com.commercetools.importapi.models.errors; - -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 ReferencedResourceNotFoundTest { - - @TestTemplate - @UseDataProvider("objectBuilder") - public void buildUnchecked(ReferencedResourceNotFoundBuilder builder) { - ReferencedResourceNotFound referencedResourceNotFound = builder.buildUnchecked(); - Assertions.assertThat(referencedResourceNotFound).isInstanceOf(ReferencedResourceNotFound.class); - } - - @DataProvider - public static Object[][] objectBuilder() { - return new Object[][] { new Object[] { ReferencedResourceNotFound.builder().message("message") }, - new Object[] { ReferencedResourceNotFound.builder() - .typeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")) }, - new Object[] { ReferencedResourceNotFound.builder().id("id") }, - new Object[] { ReferencedResourceNotFound.builder().key("key") } }; - } - - @Test - public void message() { - ReferencedResourceNotFound value = ReferencedResourceNotFound.of(); - value.setMessage("message"); - Assertions.assertThat(value.getMessage()).isEqualTo("message"); - } - - @Test - public void typeId() { - ReferencedResourceNotFound value = ReferencedResourceNotFound.of(); - value.setTypeId(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")); - Assertions.assertThat(value.getTypeId()) - .isEqualTo(com.commercetools.importapi.models.common.ReferenceType.findEnum("cart")); - } - - @Test - public void id() { - ReferencedResourceNotFound value = ReferencedResourceNotFound.of(); - value.setId("id"); - Assertions.assertThat(value.getId()).isEqualTo("id"); - } - - @Test - public void key() { - ReferencedResourceNotFound value = ReferencedResourceNotFound.of(); - value.setKey("key"); - Assertions.assertThat(value.getKey()).isEqualTo("key"); - } -} diff --git a/references.txt b/references.txt index 3f33aed8223..32b81b715f5 100644 --- a/references.txt +++ b/references.txt @@ -336,3 +336,4 @@ b747e1fa4f246b748a89bccbfd8a43f5b6f51175 b747e1fa4f246b748a89bccbfd8a43f5b6f51175 505b3af56b4452b22dfb595f93e010b3e2fccc53 7375cdc26481ba55e756479a87270432635bfcf7 +df53588d26d7953dfdf44166866ca03045f0a70b