From 57f1764a8c97c2dedd9aca7e9d05a620fd5e3daf Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Wed, 11 Feb 2026 15:20:07 +0000
Subject: [PATCH] build(codegen): updating SDK
---
changes.md | 43 +-
.../ByProjectKeyStandalonePricesByIDPost.java | 2 +-
...jectKeyStandalonePricesByIDPostString.java | 2 +-
...rojectKeyStandalonePricesKeyByKeyPost.java | 2 +-
...KeyStandalonePricesKeyByKeyPostString.java | 2 +-
.../ByProjectKeyStandalonePricesPost.java | 1 +
...yProjectKeyStandalonePricesPostString.java | 1 +
.../api/models/error/ErrorObject.java | 16 +
.../api/models/error/ErrorObjectBuilder.java | 8 +
.../models/error/ExactLockConflictError.java | 292 +++++++++++++
.../error/ExactLockConflictErrorBuilder.java | 407 ++++++++++++++++++
.../error/ExactLockConflictErrorImpl.java | 291 +++++++++++++
.../api/models/error/GraphQLErrorObject.java | 16 +
.../error/GraphQLErrorObjectBuilder.java | 8 +
.../error/GraphQLExactLockConflictError.java | 274 ++++++++++++
.../GraphQLExactLockConflictErrorBuilder.java | 382 ++++++++++++++++
.../GraphQLExactLockConflictErrorImpl.java | 271 ++++++++++++
.../GraphQLValidityLockConflictError.java | 239 ++++++++++
...aphQLValidityLockConflictErrorBuilder.java | 332 ++++++++++++++
.../GraphQLValidityLockConflictErrorImpl.java | 232 ++++++++++
.../error/ValidityLockConflictError.java | 257 +++++++++++
.../ValidityLockConflictErrorBuilder.java | 357 +++++++++++++++
.../error/ValidityLockConflictErrorImpl.java | 251 +++++++++++
.../StandalonePriceSetValidFromAction.java | 1 +
...StandalonePriceSetValidFromActionImpl.java | 1 +
...dalonePriceSetValidFromAndUntilAction.java | 1 +
...nePriceSetValidFromAndUntilActionImpl.java | 1 +
.../StandalonePriceSetValidUntilAction.java | 1 +
...tandalonePriceSetValidUntilActionImpl.java | 1 +
.../error/ErrorObjectQueryBuilderDsl.java | 14 +
...ExactLockConflictErrorQueryBuilderDsl.java | 87 ++++
.../GraphQLErrorObjectQueryBuilderDsl.java | 14 +
...ExactLockConflictErrorQueryBuilderDsl.java | 81 ++++
...idityLockConflictErrorQueryBuilderDsl.java | 69 +++
...idityLockConflictErrorQueryBuilderDsl.java | 75 ++++
.../error/ExactLockConflictErrorTest.java | 105 +++++
.../GraphQLExactLockConflictErrorTest.java | 97 +++++
.../GraphQLValidityLockConflictErrorTest.java | 78 ++++
.../error/ValidityLockConflictErrorTest.java | 86 ++++
references.txt | 1 +
40 files changed, 4356 insertions(+), 43 deletions(-)
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictError.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictError.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictError.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictError.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ExactLockConflictErrorQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLExactLockConflictErrorQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLValidityLockConflictErrorQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ValidityLockConflictErrorQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorTest.java
diff --git a/changes.md b/changes.md
index 9277e27a43d..89232706e00 100644
--- a/changes.md
+++ b/changes.md
@@ -3,44 +3,9 @@
Added Type(s)
-- added type `CartDiscountSetRecurringOrderScopeAction`
-- added type `CartLock`
-- added type `FreezeStrategy`
-- added type `CartLockCartAction`
-- added type `CartSetPurchaseOrderNumberAction`
-- added type `CartUnlockCartAction`
-- added type `CartPurchaseOrderNumberSetMessage`
-- added type `CartPurchaseOrderNumberSetMessagePayload`
-- added type `AnyOrder`
-- added type `AnyOrderDraft`
-- added type `ApplicableRecurrencePolicies`
-- added type `ApplicableRecurrencePoliciesDraft`
-- added type `NonRecurringOrdersOnly`
-- added type `NonRecurringOrdersOnlyDraft`
-- added type `RecurringOrderScope`
-- added type `RecurringOrderScopeDraft`
-- added type `RecurringOrdersOnly`
-- added type `RecurringOrdersOnlyDraft`
-Required Property(s)
-
-- :warning: changed property `deleteDaysAfterLastModification` of type `CartsConfiguration` to be required
-- :warning: changed property `deleteDaysAfterLastModification` of type `ShoppingListsConfiguration` to be required
-Added Property(s)
-
-- added property `recurringOrderScope` to type `CartDiscount`
-- added property `recurringOrderScope` to type `CartDiscountDraft`
-- added property `freezeStrategy` to type `Cart`
-- added property `lock` to type `Cart`
-- added property `purchaseOrderNumber` to type `Cart`
-- added property `purchaseOrderNumber` to type `CartDraft`
-- added property `strategy` to type `CartFreezeCartAction`
+- added type `ExactLockConflictError`
+- added type `ValidityLockConflictError`
+- added type `GraphQLExactLockConflictError`
+- added type `GraphQLValidityLockConflictError`
If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.
* *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.
* *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.
* *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.
* *Returned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + * + *
+ * ExactLockConflictError exactLockConflictError = ExactLockConflictError.builder()
+ * .message("{message}")
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * "Modification already in progress for the combination of SKU and price scope fields."
SKU for which the modification conflict occurred.
+ * @return sku + */ + @NotNull + @JsonProperty("sku") + public String getSku(); + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + @NotNull + @JsonProperty("currency") + public String getCurrency(); + + /** + *Country code of the geographic location.
+ * @return country + */ + + @JsonProperty("country") + public String getCountry(); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + @Valid + @JsonProperty("customerGroup") + public CustomerGroupResourceIdentifier getCustomerGroup(); + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + @Valid + @JsonProperty("channel") + public ChannelResourceIdentifier getChannel(); + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @return validFrom + */ + + @JsonProperty("validFrom") + public ZonedDateTime getValidFrom(); + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @return validUntil + */ + + @JsonProperty("validUntil") + public ZonedDateTime getValidUntil(); + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *"Modification already in progress for the combination of SKU and price scope fields."
SKU for which the modification conflict occurred.
+ * @param sku value to be set + */ + + public void setSku(final String sku); + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + */ + + public void setCurrency(final String currency); + + /** + *Country code of the geographic location.
+ * @param country value to be set + */ + + public void setCountry(final String country); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupResourceIdentifier customerGroup); + + /** + *Channel for which the Standalone Price is valid.
+ * @param channel value to be set + */ + + public void setChannel(final ChannelResourceIdentifier channel); + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @param validFrom value to be set + */ + + public void setValidFrom(final ZonedDateTime validFrom); + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @param validUntil value to be set + */ + + public void setValidUntil(final ZonedDateTime validUntil); + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + + /** + * factory method + * @return instance of ExactLockConflictError + */ + public static ExactLockConflictError of() { + return new ExactLockConflictErrorImpl(); + } + + /** + * factory method to create a shallow copy ExactLockConflictError + * @param template instance to be copied + * @return copy instance + */ + public static ExactLockConflictError of(final ExactLockConflictError template) { + ExactLockConflictErrorImpl instance = new ExactLockConflictErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(template.getCustomerGroup()); + instance.setChannel(template.getChannel()); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public ExactLockConflictError copyDeep(); + + /** + * factory method to create a deep copy of ExactLockConflictError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ExactLockConflictError deepCopy(@Nullable final ExactLockConflictError template) { + if (template == null) { + return null; + } + ExactLockConflictErrorImpl instance = new ExactLockConflictErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier + .deepCopy(template.getCustomerGroup())); + instance.setChannel( + com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getChannel())); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for ExactLockConflictError + * @return builder + */ + public static ExactLockConflictErrorBuilder builder() { + return ExactLockConflictErrorBuilder.of(); + } + + /** + * create builder for ExactLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExactLockConflictErrorBuilder builder(final ExactLockConflictError template) { + return ExactLockConflictErrorBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ExactLockConflictError exactLockConflictError = ExactLockConflictError.builder()
+ * .message("{message}")
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * "Modification already in progress for the combination of SKU and price scope fields."
Error-specific additional fields.
+ * @param values properties to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder values(final MapError-specific additional fields.
+ * @param key property name + * @param value property value + * @return Builder + */ + + public ExactLockConflictErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *SKU for which the modification conflict occurred.
+ * @param sku value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder sku(final String sku) { + this.sku = sku; + return this; + } + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder currency(final String currency) { + this.currency = currency; + return this; + } + + /** + *Country code of the geographic location.
+ * @param country value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder country(@Nullable final String country) { + this.country = country; + return this; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public ExactLockConflictErrorBuilder customerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public ExactLockConflictErrorBuilder withCustomerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder customerGroup( + @Nullable final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + return this; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public ExactLockConflictErrorBuilder channel( + FunctionChannel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public ExactLockConflictErrorBuilder withChannel( + FunctionChannel for which the Standalone Price is valid.
+ * @param channel value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder channel( + @Nullable final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + return this; + } + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @param validFrom value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder validFrom(@Nullable final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + return this; + } + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @param validUntil value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder validUntil(@Nullable final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + return this; + } + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public ExactLockConflictErrorBuilder recurrencePolicy( + FunctionRecurrencePolicy that applies to the Standalone Price.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public ExactLockConflictErrorBuilder withRecurrencePolicy( + FunctionRecurrencePolicy that applies to the Standalone Price.
+ * @param recurrencePolicy value to be set + * @return Builder + */ + + public ExactLockConflictErrorBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *"Modification already in progress for the combination of SKU and price scope fields."
Error-specific additional fields.
+ * @return pattern properties + */ + + public MapSKU for which the modification conflict occurred.
+ * @return sku + */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ * @return country + */ + + @Nullable + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + + @Nullable + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + + @Nullable + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @return validFrom + */ + + @Nullable + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @return validUntil + */ + + @Nullable + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds ExactLockConflictError with checking for non-null required values + * @return ExactLockConflictError + */ + public ExactLockConflictError build() { + Objects.requireNonNull(message, ExactLockConflictError.class + ": message is missing"); + Objects.requireNonNull(sku, ExactLockConflictError.class + ": sku is missing"); + Objects.requireNonNull(currency, ExactLockConflictError.class + ": currency is missing"); + return new ExactLockConflictErrorImpl(message, values, sku, currency, country, customerGroup, channel, + validFrom, validUntil, recurrencePolicy); + } + + /** + * builds ExactLockConflictError without checking for non-null required values + * @return ExactLockConflictError + */ + public ExactLockConflictError buildUnchecked() { + return new ExactLockConflictErrorImpl(message, values, sku, currency, country, customerGroup, channel, + validFrom, validUntil, recurrencePolicy); + } + + /** + * factory method for an instance of ExactLockConflictErrorBuilder + * @return builder + */ + public static ExactLockConflictErrorBuilder of() { + return new ExactLockConflictErrorBuilder(); + } + + /** + * create builder for ExactLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ExactLockConflictErrorBuilder of(final ExactLockConflictError template) { + ExactLockConflictErrorBuilder builder = new ExactLockConflictErrorBuilder(); + builder.message = template.getMessage(); + builder.values = template.values(); + builder.sku = template.getSku(); + builder.currency = template.getCurrency(); + builder.country = template.getCountry(); + builder.customerGroup = template.getCustomerGroup(); + builder.channel = template.getChannel(); + builder.validFrom = template.getValidFrom(); + builder.validUntil = template.getValidUntil(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorImpl.java new file mode 100644 index 00000000000..0a9e5ce49fe --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorImpl.java @@ -0,0 +1,291 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +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 modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExactLockConflictErrorImpl implements ExactLockConflictError, ModelBase { + + private String code; + + private String message; + + private Map"Modification already in progress for the combination of SKU and price scope fields."
Error-specific additional fields.
+ */ + + public MapSKU for which the modification conflict occurred.
+ */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ */ + + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ */ + + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ */ + + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + 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); + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setCurrency(final String currency) { + this.currency = currency; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setCustomerGroup( + final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + } + + public void setChannel(final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + } + + public void setValidFrom(final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + } + + public void setValidUntil(final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ExactLockConflictErrorImpl that = (ExactLockConflictErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(recurrencePolicy, that.recurrencePolicy) + .append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(values) + .append(sku) + .append(currency) + .append(country) + .append(customerGroup) + .append(channel) + .append(validFrom) + .append(validUntil) + .append(recurrencePolicy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("values", values) + .append("sku", sku) + .append("currency", currency) + .append("country", country) + .append("customerGroup", customerGroup) + .append("channel", channel) + .append("validFrom", validFrom) + .append("validUntil", validUntil) + .append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public ExactLockConflictError copyDeep() { + return ExactLockConflictError.deepCopy(this); + } +} 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 27d28627feb..aeae95a87fb 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 @@ -269,6 +269,14 @@ public static com.commercetools.api.models.error.GraphQLEnumValuesMustMatchError return com.commercetools.api.models.error.GraphQLEnumValuesMustMatchErrorBuilder.of(); } + /** + * builder for exactLockConflict subtype + * @return builder + */ + public static com.commercetools.api.models.error.GraphQLExactLockConflictErrorBuilder exactLockConflictBuilder() { + return com.commercetools.api.models.error.GraphQLExactLockConflictErrorBuilder.of(); + } + /** * builder for expiredCustomerEmailToken subtype * @return builder @@ -725,6 +733,14 @@ public static com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder return com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder.of(); } + /** + * builder for validityLockConflict subtype + * @return builder + */ + public static com.commercetools.api.models.error.GraphQLValidityLockConflictErrorBuilder validityLockConflictBuilder() { + return com.commercetools.api.models.error.GraphQLValidityLockConflictErrorBuilder.of(); + } + /** * accessor map function * @paramReturned when a modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + * + *
+ * GraphQLExactLockConflictError graphQLExactLockConflictError = GraphQLExactLockConflictError.builder()
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * SKU for which the modification conflict occurred.
+ * @return sku + */ + @NotNull + @JsonProperty("sku") + public String getSku(); + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + @NotNull + @JsonProperty("currency") + public String getCurrency(); + + /** + *Country code of the geographic location.
+ * @return country + */ + + @JsonProperty("country") + public String getCountry(); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + @Valid + @JsonProperty("customerGroup") + public CustomerGroupResourceIdentifier getCustomerGroup(); + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + @Valid + @JsonProperty("channel") + public ChannelResourceIdentifier getChannel(); + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @return validFrom + */ + + @JsonProperty("validFrom") + public ZonedDateTime getValidFrom(); + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @return validUntil + */ + + @JsonProperty("validUntil") + public ZonedDateTime getValidUntil(); + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyReference getRecurrencePolicy(); + + /** + *SKU for which the modification conflict occurred.
+ * @param sku value to be set + */ + + public void setSku(final String sku); + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + */ + + public void setCurrency(final String currency); + + /** + *Country code of the geographic location.
+ * @param country value to be set + */ + + public void setCountry(final String country); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupResourceIdentifier customerGroup); + + /** + *Channel for which the Standalone Price is valid.
+ * @param channel value to be set + */ + + public void setChannel(final ChannelResourceIdentifier channel); + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @param validFrom value to be set + */ + + public void setValidFrom(final ZonedDateTime validFrom); + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @param validUntil value to be set + */ + + public void setValidUntil(final ZonedDateTime validUntil); + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyReference recurrencePolicy); + + /** + * factory method + * @return instance of GraphQLExactLockConflictError + */ + public static GraphQLExactLockConflictError of() { + return new GraphQLExactLockConflictErrorImpl(); + } + + /** + * factory method to create a shallow copy GraphQLExactLockConflictError + * @param template instance to be copied + * @return copy instance + */ + public static GraphQLExactLockConflictError of(final GraphQLExactLockConflictError template) { + GraphQLExactLockConflictErrorImpl instance = new GraphQLExactLockConflictErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(template.getCustomerGroup()); + instance.setChannel(template.getChannel()); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public GraphQLExactLockConflictError copyDeep(); + + /** + * factory method to create a deep copy of GraphQLExactLockConflictError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GraphQLExactLockConflictError deepCopy(@Nullable final GraphQLExactLockConflictError template) { + if (template == null) { + return null; + } + GraphQLExactLockConflictErrorImpl instance = new GraphQLExactLockConflictErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier + .deepCopy(template.getCustomerGroup())); + instance.setChannel( + com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getChannel())); + instance.setValidFrom(template.getValidFrom()); + instance.setValidUntil(template.getValidUntil()); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for GraphQLExactLockConflictError + * @return builder + */ + public static GraphQLExactLockConflictErrorBuilder builder() { + return GraphQLExactLockConflictErrorBuilder.of(); + } + + /** + * create builder for GraphQLExactLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLExactLockConflictErrorBuilder builder(final GraphQLExactLockConflictError template) { + return GraphQLExactLockConflictErrorBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * GraphQLExactLockConflictError graphQLExactLockConflictError = GraphQLExactLockConflictError.builder()
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * Error-specific additional fields.
+ * @param values properties to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder values(final MapError-specific additional fields.
+ * @param key property name + * @param value property value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *SKU for which the modification conflict occurred.
+ * @param sku value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder sku(final String sku) { + this.sku = sku; + return this; + } + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder currency(final String currency) { + this.currency = currency; + return this; + } + + /** + *Country code of the geographic location.
+ * @param country value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder country(@Nullable final String country) { + this.country = country; + return this; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder customerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder withCustomerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder customerGroup( + @Nullable final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + return this; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder channel( + FunctionChannel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder withChannel( + FunctionChannel for which the Standalone Price is valid.
+ * @param channel value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder channel( + @Nullable final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + return this; + } + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @param validFrom value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder validFrom(@Nullable final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + return this; + } + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @param validUntil value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder validUntil(@Nullable final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + return this; + } + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder recurrencePolicy( + FunctionRecurrencePolicy that applies to the Standalone Price.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder withRecurrencePolicy( + FunctionRecurrencePolicy that applies to the Standalone Price.
+ * @param recurrencePolicy value to be set + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *Error-specific additional fields.
+ * @return pattern properties + */ + + public MapSKU for which the modification conflict occurred.
+ * @return sku + */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ * @return country + */ + + @Nullable + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + + @Nullable + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + + @Nullable + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ * @return validFrom + */ + + @Nullable + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ * @return validUntil + */ + + @Nullable + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds GraphQLExactLockConflictError with checking for non-null required values + * @return GraphQLExactLockConflictError + */ + public GraphQLExactLockConflictError build() { + Objects.requireNonNull(sku, GraphQLExactLockConflictError.class + ": sku is missing"); + Objects.requireNonNull(currency, GraphQLExactLockConflictError.class + ": currency is missing"); + return new GraphQLExactLockConflictErrorImpl(values, sku, currency, country, customerGroup, channel, validFrom, + validUntil, recurrencePolicy); + } + + /** + * builds GraphQLExactLockConflictError without checking for non-null required values + * @return GraphQLExactLockConflictError + */ + public GraphQLExactLockConflictError buildUnchecked() { + return new GraphQLExactLockConflictErrorImpl(values, sku, currency, country, customerGroup, channel, validFrom, + validUntil, recurrencePolicy); + } + + /** + * factory method for an instance of GraphQLExactLockConflictErrorBuilder + * @return builder + */ + public static GraphQLExactLockConflictErrorBuilder of() { + return new GraphQLExactLockConflictErrorBuilder(); + } + + /** + * create builder for GraphQLExactLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLExactLockConflictErrorBuilder of(final GraphQLExactLockConflictError template) { + GraphQLExactLockConflictErrorBuilder builder = new GraphQLExactLockConflictErrorBuilder(); + builder.values = template.values(); + builder.sku = template.getSku(); + builder.currency = template.getCurrency(); + builder.country = template.getCountry(); + builder.customerGroup = template.getCustomerGroup(); + builder.channel = template.getChannel(); + builder.validFrom = template.getValidFrom(); + builder.validUntil = template.getValidUntil(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorImpl.java new file mode 100644 index 00000000000..a28fa6df362 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorImpl.java @@ -0,0 +1,271 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +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 modification is already in progress for the exact combination of SKU and price scope fields for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLExactLockConflictErrorImpl implements GraphQLExactLockConflictError, ModelBase { + + private String code; + + private MapError-specific additional fields.
+ */ + + public MapSKU for which the modification conflict occurred.
+ */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ */ + + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *Date and time (UTC) from which the Standalone Price is valid.
+ */ + + public java.time.ZonedDateTime getValidFrom() { + return this.validFrom; + } + + /** + *Date and time (UTC) until which the Standalone Price is valid.
+ */ + + public java.time.ZonedDateTime getValidUntil() { + return this.validUntil; + } + + /** + *RecurrencePolicy that applies to the Standalone Price.
+ */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference getRecurrencePolicy() { + return this.recurrencePolicy; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setCurrency(final String currency) { + this.currency = currency; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setCustomerGroup( + final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + } + + public void setChannel(final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + } + + public void setValidFrom(final java.time.ZonedDateTime validFrom) { + this.validFrom = validFrom; + } + + public void setValidUntil(final java.time.ZonedDateTime validUntil) { + this.validUntil = validUntil; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GraphQLExactLockConflictErrorImpl that = (GraphQLExactLockConflictErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(recurrencePolicy, that.recurrencePolicy) + .append(code, that.code) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(validFrom, that.validFrom) + .append(validUntil, that.validUntil) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(values) + .append(sku) + .append(currency) + .append(country) + .append(customerGroup) + .append(channel) + .append(validFrom) + .append(validUntil) + .append(recurrencePolicy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("values", values) + .append("sku", sku) + .append("currency", currency) + .append("country", country) + .append("customerGroup", customerGroup) + .append("channel", channel) + .append("validFrom", validFrom) + .append("validUntil", validUntil) + .append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public GraphQLExactLockConflictError copyDeep() { + return GraphQLExactLockConflictError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictError.java new file mode 100644 index 00000000000..150ab10e65a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictError.java @@ -0,0 +1,239 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.channel.ChannelResourceIdentifier; +import com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *Returned when a modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + * + *
+ * GraphQLValidityLockConflictError graphQLValidityLockConflictError = GraphQLValidityLockConflictError.builder()
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * SKU for which the modification conflict occurred.
+ * @return sku + */ + @NotNull + @JsonProperty("sku") + public String getSku(); + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + @NotNull + @JsonProperty("currency") + public String getCurrency(); + + /** + *Country code of the geographic location.
+ * @return country + */ + + @JsonProperty("country") + public String getCountry(); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + @Valid + @JsonProperty("customerGroup") + public CustomerGroupResourceIdentifier getCustomerGroup(); + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + @Valid + @JsonProperty("channel") + public ChannelResourceIdentifier getChannel(); + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + + /** + *SKU for which the modification conflict occurred.
+ * @param sku value to be set + */ + + public void setSku(final String sku); + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + */ + + public void setCurrency(final String currency); + + /** + *Country code of the geographic location.
+ * @param country value to be set + */ + + public void setCountry(final String country); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupResourceIdentifier customerGroup); + + /** + *Channel for which the Standalone Price is valid.
+ * @param channel value to be set + */ + + public void setChannel(final ChannelResourceIdentifier channel); + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + + /** + * factory method + * @return instance of GraphQLValidityLockConflictError + */ + public static GraphQLValidityLockConflictError of() { + return new GraphQLValidityLockConflictErrorImpl(); + } + + /** + * factory method to create a shallow copy GraphQLValidityLockConflictError + * @param template instance to be copied + * @return copy instance + */ + public static GraphQLValidityLockConflictError of(final GraphQLValidityLockConflictError template) { + GraphQLValidityLockConflictErrorImpl instance = new GraphQLValidityLockConflictErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(template.getCustomerGroup()); + instance.setChannel(template.getChannel()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public GraphQLValidityLockConflictError copyDeep(); + + /** + * factory method to create a deep copy of GraphQLValidityLockConflictError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static GraphQLValidityLockConflictError deepCopy(@Nullable final GraphQLValidityLockConflictError template) { + if (template == null) { + return null; + } + GraphQLValidityLockConflictErrorImpl instance = new GraphQLValidityLockConflictErrorImpl(); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier + .deepCopy(template.getCustomerGroup())); + instance.setChannel( + com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getChannel())); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for GraphQLValidityLockConflictError + * @return builder + */ + public static GraphQLValidityLockConflictErrorBuilder builder() { + return GraphQLValidityLockConflictErrorBuilder.of(); + } + + /** + * create builder for GraphQLValidityLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLValidityLockConflictErrorBuilder builder(final GraphQLValidityLockConflictError template) { + return GraphQLValidityLockConflictErrorBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * GraphQLValidityLockConflictError graphQLValidityLockConflictError = GraphQLValidityLockConflictError.builder()
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * Error-specific additional fields.
+ * @param values properties to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder values(final MapError-specific additional fields.
+ * @param key property name + * @param value property value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *SKU for which the modification conflict occurred.
+ * @param sku value to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder sku(final String sku) { + this.sku = sku; + return this; + } + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder currency(final String currency) { + this.currency = currency; + return this; + } + + /** + *Country code of the geographic location.
+ * @param country value to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder country(@Nullable final String country) { + this.country = country; + return this; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder customerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder withCustomerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder customerGroup( + @Nullable final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + return this; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder channel( + FunctionChannel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder withChannel( + FunctionChannel for which the Standalone Price is valid.
+ * @param channel value to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder channel( + @Nullable final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + return this; + } + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder recurrencePolicy( + FunctionRecurrencePolicy for which the Standalone Price is valid.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder withRecurrencePolicy( + FunctionRecurrencePolicy for which the Standalone Price is valid.
+ * @param recurrencePolicy value to be set + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *Error-specific additional fields.
+ * @return pattern properties + */ + + public MapSKU for which the modification conflict occurred.
+ * @return sku + */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ * @return country + */ + + @Nullable + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + + @Nullable + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + + @Nullable + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds GraphQLValidityLockConflictError with checking for non-null required values + * @return GraphQLValidityLockConflictError + */ + public GraphQLValidityLockConflictError build() { + Objects.requireNonNull(sku, GraphQLValidityLockConflictError.class + ": sku is missing"); + Objects.requireNonNull(currency, GraphQLValidityLockConflictError.class + ": currency is missing"); + return new GraphQLValidityLockConflictErrorImpl(values, sku, currency, country, customerGroup, channel, + recurrencePolicy); + } + + /** + * builds GraphQLValidityLockConflictError without checking for non-null required values + * @return GraphQLValidityLockConflictError + */ + public GraphQLValidityLockConflictError buildUnchecked() { + return new GraphQLValidityLockConflictErrorImpl(values, sku, currency, country, customerGroup, channel, + recurrencePolicy); + } + + /** + * factory method for an instance of GraphQLValidityLockConflictErrorBuilder + * @return builder + */ + public static GraphQLValidityLockConflictErrorBuilder of() { + return new GraphQLValidityLockConflictErrorBuilder(); + } + + /** + * create builder for GraphQLValidityLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static GraphQLValidityLockConflictErrorBuilder of(final GraphQLValidityLockConflictError template) { + GraphQLValidityLockConflictErrorBuilder builder = new GraphQLValidityLockConflictErrorBuilder(); + builder.values = template.values(); + builder.sku = template.getSku(); + builder.currency = template.getCurrency(); + builder.country = template.getCountry(); + builder.customerGroup = template.getCustomerGroup(); + builder.channel = template.getChannel(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorImpl.java new file mode 100644 index 00000000000..c526fad3f0a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorImpl.java @@ -0,0 +1,232 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +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 modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLValidityLockConflictErrorImpl implements GraphQLValidityLockConflictError, ModelBase { + + private String code; + + private MapError-specific additional fields.
+ */ + + public MapSKU for which the modification conflict occurred.
+ */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ */ + + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + public void setValue(String key, java.lang.Object value) { + if (values == null) { + values = new HashMap<>(); + } + values.put(key, value); + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setCurrency(final String currency) { + this.currency = currency; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setCustomerGroup( + final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + } + + public void setChannel(final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + GraphQLValidityLockConflictErrorImpl that = (GraphQLValidityLockConflictErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(recurrencePolicy, that.recurrencePolicy) + .append(code, that.code) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(values) + .append(sku) + .append(currency) + .append(country) + .append(customerGroup) + .append(channel) + .append(recurrencePolicy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("values", values) + .append("sku", sku) + .append("currency", currency) + .append("country", country) + .append("customerGroup", customerGroup) + .append("channel", channel) + .append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public GraphQLValidityLockConflictError copyDeep() { + return GraphQLValidityLockConflictError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictError.java new file mode 100644 index 00000000000..a0eaa3ec60d --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictError.java @@ -0,0 +1,257 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.commercetools.api.models.channel.ChannelResourceIdentifier; +import com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier; +import com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; + +/** + *Returned when a modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + * + *
+ * ValidityLockConflictError validityLockConflictError = ValidityLockConflictError.builder()
+ * .message("{message}")
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * "Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."
SKU for which the modification conflict occurred.
+ * @return sku + */ + @NotNull + @JsonProperty("sku") + public String getSku(); + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + @NotNull + @JsonProperty("currency") + public String getCurrency(); + + /** + *Country code of the geographic location.
+ * @return country + */ + + @JsonProperty("country") + public String getCountry(); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + @Valid + @JsonProperty("customerGroup") + public CustomerGroupResourceIdentifier getCustomerGroup(); + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + @Valid + @JsonProperty("channel") + public ChannelResourceIdentifier getChannel(); + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @return recurrencePolicy + */ + @Valid + @JsonProperty("recurrencePolicy") + public RecurrencePolicyResourceIdentifier getRecurrencePolicy(); + + /** + *"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."
SKU for which the modification conflict occurred.
+ * @param sku value to be set + */ + + public void setSku(final String sku); + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + */ + + public void setCurrency(final String currency); + + /** + *Country code of the geographic location.
+ * @param country value to be set + */ + + public void setCountry(final String country); + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + */ + + public void setCustomerGroup(final CustomerGroupResourceIdentifier customerGroup); + + /** + *Channel for which the Standalone Price is valid.
+ * @param channel value to be set + */ + + public void setChannel(final ChannelResourceIdentifier channel); + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @param recurrencePolicy value to be set + */ + + public void setRecurrencePolicy(final RecurrencePolicyResourceIdentifier recurrencePolicy); + + /** + * factory method + * @return instance of ValidityLockConflictError + */ + public static ValidityLockConflictError of() { + return new ValidityLockConflictErrorImpl(); + } + + /** + * factory method to create a shallow copy ValidityLockConflictError + * @param template instance to be copied + * @return copy instance + */ + public static ValidityLockConflictError of(final ValidityLockConflictError template) { + ValidityLockConflictErrorImpl instance = new ValidityLockConflictErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(template.getCustomerGroup()); + instance.setChannel(template.getChannel()); + instance.setRecurrencePolicy(template.getRecurrencePolicy()); + return instance; + } + + public ValidityLockConflictError copyDeep(); + + /** + * factory method to create a deep copy of ValidityLockConflictError + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static ValidityLockConflictError deepCopy(@Nullable final ValidityLockConflictError template) { + if (template == null) { + return null; + } + ValidityLockConflictErrorImpl instance = new ValidityLockConflictErrorImpl(); + instance.setMessage(template.getMessage()); + Optional.ofNullable(template.values()).ifPresent(t -> t.forEach(instance::setValue)); + instance.setSku(template.getSku()); + instance.setCurrency(template.getCurrency()); + instance.setCountry(template.getCountry()); + instance.setCustomerGroup(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier + .deepCopy(template.getCustomerGroup())); + instance.setChannel( + com.commercetools.api.models.channel.ChannelResourceIdentifier.deepCopy(template.getChannel())); + instance.setRecurrencePolicy(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier + .deepCopy(template.getRecurrencePolicy())); + return instance; + } + + /** + * builder factory method for ValidityLockConflictError + * @return builder + */ + public static ValidityLockConflictErrorBuilder builder() { + return ValidityLockConflictErrorBuilder.of(); + } + + /** + * create builder for ValidityLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ValidityLockConflictErrorBuilder builder(final ValidityLockConflictError template) { + return ValidityLockConflictErrorBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * ValidityLockConflictError validityLockConflictError = ValidityLockConflictError.builder()
+ * .message("{message}")
+ * .sku("{sku}")
+ * .currency("{currency}")
+ * .build()
+ *
+ * "Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."
Error-specific additional fields.
+ * @param values properties to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder values(final MapError-specific additional fields.
+ * @param key property name + * @param value property value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder addValue(final String key, final java.lang.Object value) { + if (this.values == null) { + values = new HashMap<>(); + } + values.put(key, value); + return this; + } + + /** + *SKU for which the modification conflict occurred.
+ * @param sku value to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder sku(final String sku) { + this.sku = sku; + return this; + } + + /** + *Currency code of the Standalone Price.
+ * @param currency value to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder currency(final String currency) { + this.currency = currency; + return this; + } + + /** + *Country code of the geographic location.
+ * @param country value to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder country(@Nullable final String country) { + this.country = country; + return this; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder customerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder withCustomerGroup( + FunctionCustomerGroup for which the Standalone Price is valid.
+ * @param customerGroup value to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder customerGroup( + @Nullable final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + return this; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder channel( + FunctionChannel for which the Standalone Price is valid.
+ * @param builder function to build the channel value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder withChannel( + FunctionChannel for which the Standalone Price is valid.
+ * @param channel value to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder channel( + @Nullable final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + return this; + } + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder recurrencePolicy( + FunctionRecurrencePolicy for which the Standalone Price is valid.
+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder withRecurrencePolicy( + FunctionRecurrencePolicy for which the Standalone Price is valid.
+ * @param recurrencePolicy value to be set + * @return Builder + */ + + public ValidityLockConflictErrorBuilder recurrencePolicy( + @Nullable final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + return this; + } + + /** + *"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."
Error-specific additional fields.
+ * @return pattern properties + */ + + public MapSKU for which the modification conflict occurred.
+ * @return sku + */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ * @return currency + */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ * @return country + */ + + @Nullable + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ * @return customerGroup + */ + + @Nullable + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ * @return channel + */ + + @Nullable + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ * @return recurrencePolicy + */ + + @Nullable + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + /** + * builds ValidityLockConflictError with checking for non-null required values + * @return ValidityLockConflictError + */ + public ValidityLockConflictError build() { + Objects.requireNonNull(message, ValidityLockConflictError.class + ": message is missing"); + Objects.requireNonNull(sku, ValidityLockConflictError.class + ": sku is missing"); + Objects.requireNonNull(currency, ValidityLockConflictError.class + ": currency is missing"); + return new ValidityLockConflictErrorImpl(message, values, sku, currency, country, customerGroup, channel, + recurrencePolicy); + } + + /** + * builds ValidityLockConflictError without checking for non-null required values + * @return ValidityLockConflictError + */ + public ValidityLockConflictError buildUnchecked() { + return new ValidityLockConflictErrorImpl(message, values, sku, currency, country, customerGroup, channel, + recurrencePolicy); + } + + /** + * factory method for an instance of ValidityLockConflictErrorBuilder + * @return builder + */ + public static ValidityLockConflictErrorBuilder of() { + return new ValidityLockConflictErrorBuilder(); + } + + /** + * create builder for ValidityLockConflictError instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static ValidityLockConflictErrorBuilder of(final ValidityLockConflictError template) { + ValidityLockConflictErrorBuilder builder = new ValidityLockConflictErrorBuilder(); + builder.message = template.getMessage(); + builder.values = template.values(); + builder.sku = template.getSku(); + builder.currency = template.getCurrency(); + builder.country = template.getCountry(); + builder.customerGroup = template.getCustomerGroup(); + builder.channel = template.getChannel(); + builder.recurrencePolicy = template.getRecurrencePolicy(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorImpl.java new file mode 100644 index 00000000000..0427ea0b520 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorImpl.java @@ -0,0 +1,251 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonAnySetter; +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 modification is already in progress for the combination of SKU and price scope fields (but potentially different validity period) for a Standalone Price. Retry the same request after 300 ms.
+ *The error is returned as a failed response to:
+ * + */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ValidityLockConflictErrorImpl implements ValidityLockConflictError, ModelBase { + + private String code; + + private String message; + + private Map"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."
Error-specific additional fields.
+ */ + + public MapSKU for which the modification conflict occurred.
+ */ + + public String getSku() { + return this.sku; + } + + /** + *Currency code of the Standalone Price.
+ */ + + public String getCurrency() { + return this.currency; + } + + /** + *Country code of the geographic location.
+ */ + + public String getCountry() { + return this.country; + } + + /** + *CustomerGroup for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier getCustomerGroup() { + return this.customerGroup; + } + + /** + *Channel for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.channel.ChannelResourceIdentifier getChannel() { + return this.channel; + } + + /** + *RecurrencePolicy for which the Standalone Price is valid.
+ */ + + public com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier getRecurrencePolicy() { + return this.recurrencePolicy; + } + + 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); + } + + public void setSku(final String sku) { + this.sku = sku; + } + + public void setCurrency(final String currency) { + this.currency = currency; + } + + public void setCountry(final String country) { + this.country = country; + } + + public void setCustomerGroup( + final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup) { + this.customerGroup = customerGroup; + } + + public void setChannel(final com.commercetools.api.models.channel.ChannelResourceIdentifier channel) { + this.channel = channel; + } + + public void setRecurrencePolicy( + final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.recurrencePolicy = recurrencePolicy; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + ValidityLockConflictErrorImpl that = (ValidityLockConflictErrorImpl) o; + + return new EqualsBuilder().append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(recurrencePolicy, that.recurrencePolicy) + .append(code, that.code) + .append(message, that.message) + .append(values, that.values) + .append(sku, that.sku) + .append(currency, that.currency) + .append(country, that.country) + .append(customerGroup, that.customerGroup) + .append(channel, that.channel) + .append(recurrencePolicy, that.recurrencePolicy) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(code) + .append(message) + .append(values) + .append(sku) + .append(currency) + .append(country) + .append(customerGroup) + .append(channel) + .append(recurrencePolicy) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("code", code) + .append("message", message) + .append("values", values) + .append("sku", sku) + .append("currency", currency) + .append("country", country) + .append("customerGroup", customerGroup) + .append("channel", channel) + .append("recurrencePolicy", recurrencePolicy) + .build(); + } + + @Override + public ValidityLockConflictError copyDeep() { + return ValidityLockConflictError.deepCopy(this); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAction.java index 7337141af9a..d117c16d031 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAction.java @@ -16,6 +16,7 @@ /** *Updating the validFrom value generates the StandalonePriceValidFromSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
+ *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or a ValidityLockConflict error is returned.
* *Updating the validFrom value generates the StandalonePriceValidFromSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
+ *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or a ValidityLockConflict error is returned.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StandalonePriceSetValidFromActionImpl implements StandalonePriceSetValidFromAction, ModelBase { diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilAction.java index 52ad5c2e020..d32f808bf09 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilAction.java @@ -16,6 +16,7 @@ /** *Updating the validFrom and validUntil values generates the StandalonePriceValidFromAndUntilSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
+ *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or a ValidityLockConflict error is returned.
* *Updating the validFrom and validUntil values generates the StandalonePriceValidFromAndUntilSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
+ *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or a ValidityLockConflict error is returned.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StandalonePriceSetValidFromAndUntilActionImpl diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilAction.java index eedd4c9bba8..d421e9eb8db 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilAction.java @@ -16,6 +16,7 @@ /** *Updating the validUntil value generates the StandalonePriceValidUntilSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
+ *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or a ValidityLockConflict error is returned.
* *Updating the validUntil value generates the StandalonePriceValidUntilSet Message.
As the validity dates are part of the price scope and are not allowed to overlap, this update might return the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
+ *If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or a ValidityLockConflict error is returned.
*/ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class StandalonePriceSetValidUntilActionImpl implements StandalonePriceSetValidUntilAction, ModelBase { 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 47784bb26e3..31bd85fa0e5 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 @@ -197,6 +197,13 @@ public CombinationQueryPredicate