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`
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPost.java index 1f8a6d94c0a..41b4b1ae931 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPost.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - * + *

If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.

* *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPostString.java index bd881ae72d2..a6ecc9b8dbd 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesByIDPostString.java @@ -21,7 +21,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - * + *

If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.

* *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPost.java index ad7d321c2b7..0803223ceb1 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPost.java @@ -20,7 +20,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - * + *

If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.

* *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPostString.java index 3f531d663d4..a10d16305ce 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesKeyByKeyPostString.java @@ -21,7 +21,7 @@ import org.apache.commons.lang3.builder.HashCodeBuilder; /** - * + *

If a modification is already in progress for the exact combination of SKU and price scope fields, an ExactLockConflict or ValidityLockConflict error is returned.

* *
*
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPost.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPost.java index 70e20336210..61e5989ab13 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPost.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPost.java @@ -24,6 +24,7 @@ *
    *
  • If the Standalone Price has the same price scope as an existing Standalone Price, a DuplicateStandalonePriceScope error is returned.
  • *
  • If the Standalone Price has overlapping validity periods within the same price scope, a OverlappingStandalonePriceValidity error is returned. 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 ValidityLockConflict error is returned.
  • *
* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPostString.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPostString.java index 46115ef5d0e..39590f3a926 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPostString.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyStandalonePricesPostString.java @@ -25,6 +25,7 @@ *
    *
  • If the Standalone Price has the same price scope as an existing Standalone Price, a DuplicateStandalonePriceScope error is returned.
  • *
  • If the Standalone Price has overlapping validity periods within the same price scope, a OverlappingStandalonePriceValidity error is returned. 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 ValidityLockConflict error is returned.
  • *
* *
diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java index bc503b897f4..4ac2db4cb3a 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObject.java @@ -287,6 +287,14 @@ public static com.commercetools.api.models.error.EnumValuesMustMatchErrorBuilder return com.commercetools.api.models.error.EnumValuesMustMatchErrorBuilder.of(); } + /** + * builder for exactLockConflict subtype + * @return builder + */ + public static com.commercetools.api.models.error.ExactLockConflictErrorBuilder exactLockConflictBuilder() { + return com.commercetools.api.models.error.ExactLockConflictErrorBuilder.of(); + } + /** * builder for expiredCustomerEmailToken subtype * @return builder @@ -743,6 +751,14 @@ public static com.commercetools.api.models.error.SyntaxErrorErrorBuilder syntaxE return com.commercetools.api.models.error.SyntaxErrorErrorBuilder.of(); } + /** + * builder for validityLockConflict subtype + * @return builder + */ + public static com.commercetools.api.models.error.ValidityLockConflictErrorBuilder validityLockConflictBuilder() { + return com.commercetools.api.models.error.ValidityLockConflictErrorBuilder.of(); + } + /** * accessor map function * @param mapped type diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java index cac68e68a11..88ed6733880 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ErrorObjectBuilder.java @@ -107,6 +107,10 @@ public com.commercetools.api.models.error.EnumValuesMustMatchErrorBuilder enumVa return com.commercetools.api.models.error.EnumValuesMustMatchErrorBuilder.of(); } + public com.commercetools.api.models.error.ExactLockConflictErrorBuilder exactLockConflictBuilder() { + return com.commercetools.api.models.error.ExactLockConflictErrorBuilder.of(); + } + public com.commercetools.api.models.error.ExpiredCustomerEmailTokenErrorBuilder expiredCustomerEmailTokenBuilder() { return com.commercetools.api.models.error.ExpiredCustomerEmailTokenErrorBuilder.of(); } @@ -335,6 +339,10 @@ public com.commercetools.api.models.error.SyntaxErrorErrorBuilder syntaxErrorBui return com.commercetools.api.models.error.SyntaxErrorErrorBuilder.of(); } + public com.commercetools.api.models.error.ValidityLockConflictErrorBuilder validityLockConflictBuilder() { + return com.commercetools.api.models.error.ValidityLockConflictErrorBuilder.of(); + } + /** * factory method for an instance of ErrorObjectBuilder * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictError.java new file mode 100644 index 00000000000..07b944eab01 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictError.java @@ -0,0 +1,292 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.time.ZonedDateTime; +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.RecurrencePolicyReference; +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 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:

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

+ *     ExactLockConflictError exactLockConflictError = ExactLockConflictError.builder()
+ *             .message("{message}")
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("ExactLockConflict") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ExactLockConflictErrorImpl.class) +public interface ExactLockConflictError extends ErrorObject { + + /** + * discriminator value for ExactLockConflictError + */ + String EXACT_LOCK_CONFLICT = "ExactLockConflict"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Modification already in progress for the combination of SKU and price scope fields."

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

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."

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

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 mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withExactLockConflictError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorBuilder.java new file mode 100644 index 00000000000..73b0f9558af --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorBuilder.java @@ -0,0 +1,407 @@ + +package com.commercetools.api.models.error; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ExactLockConflictErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ExactLockConflictError exactLockConflictError = ExactLockConflictError.builder()
+ *             .message("{message}")
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ExactLockConflictErrorBuilder implements Builder { + + private String message; + + private Map values = new HashMap<>(); + + private String sku; + + private String currency; + + @Nullable + private String country; + + @Nullable + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + @Nullable + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + @Nullable + private java.time.ZonedDateTime validFrom; + + @Nullable + private java.time.ZonedDateTime validUntil; + + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + /** + *

"Modification already in progress for the combination of SKU and price scope fields."

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

Error-specific additional fields.

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

Error-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( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

CustomerGroup for which the Standalone Price is valid.

+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public ExactLockConflictErrorBuilder withCustomerGroup( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()); + return this; + } + + /** + *

CustomerGroup 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( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

Channel for which the Standalone Price is valid.

+ * @param builder function to build the channel value + * @return Builder + */ + + public ExactLockConflictErrorBuilder withChannel( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Channel 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( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

RecurrencePolicy that applies to the Standalone Price.

+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public ExactLockConflictErrorBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

RecurrencePolicy 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."

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

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + *

SKU 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 values; + + private String sku; + + private String currency; + + private String country; + + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + private java.time.ZonedDateTime validFrom; + + private java.time.ZonedDateTime validUntil; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + ExactLockConflictErrorImpl(@JsonProperty("message") final String message, + @JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("sku") final String sku, @JsonProperty("currency") final String currency, + @JsonProperty("country") final String country, + @JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup, + @JsonProperty("channel") final com.commercetools.api.models.channel.ChannelResourceIdentifier channel, + @JsonProperty("validFrom") final java.time.ZonedDateTime validFrom, + @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.message = message; + this.values = values; + this.sku = sku; + this.currency = currency; + this.country = country; + this.customerGroup = customerGroup; + this.channel = channel; + this.validFrom = validFrom; + this.validUntil = validUntil; + this.recurrencePolicy = recurrencePolicy; + this.code = EXACT_LOCK_CONFLICT; + } + + /** + * create empty instance + */ + public ExactLockConflictErrorImpl() { + this.code = EXACT_LOCK_CONFLICT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Modification already in progress for the combination of SKU and price scope fields."

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

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

SKU 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 * @param mapped type diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java index 6cb3ffa31ee..67c331d978d 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLErrorObjectBuilder.java @@ -107,6 +107,10 @@ public com.commercetools.api.models.error.GraphQLEnumValuesMustMatchErrorBuilder return com.commercetools.api.models.error.GraphQLEnumValuesMustMatchErrorBuilder.of(); } + public com.commercetools.api.models.error.GraphQLExactLockConflictErrorBuilder exactLockConflictBuilder() { + return com.commercetools.api.models.error.GraphQLExactLockConflictErrorBuilder.of(); + } + public com.commercetools.api.models.error.GraphQLExpiredCustomerEmailTokenErrorBuilder expiredCustomerEmailTokenBuilder() { return com.commercetools.api.models.error.GraphQLExpiredCustomerEmailTokenErrorBuilder.of(); } @@ -335,6 +339,10 @@ public com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder syntaxE return com.commercetools.api.models.error.GraphQLSyntaxErrorErrorBuilder.of(); } + public com.commercetools.api.models.error.GraphQLValidityLockConflictErrorBuilder validityLockConflictBuilder() { + return com.commercetools.api.models.error.GraphQLValidityLockConflictErrorBuilder.of(); + } + /** * factory method for an instance of GraphQLErrorObjectBuilder * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictError.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictError.java new file mode 100644 index 00000000000..37982d51f6b --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictError.java @@ -0,0 +1,274 @@ + +package com.commercetools.api.models.error; + +import java.time.*; +import java.time.ZonedDateTime; +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.RecurrencePolicyReference; +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 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:

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

+ *     GraphQLExactLockConflictError graphQLExactLockConflictError = GraphQLExactLockConflictError.builder()
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("ExactLockConflict") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GraphQLExactLockConflictErrorImpl.class) +public interface GraphQLExactLockConflictError extends GraphQLErrorObject { + + /** + * discriminator value for GraphQLExactLockConflictError + */ + String EXACT_LOCK_CONFLICT = "ExactLockConflict"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

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 mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGraphQLExactLockConflictError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorBuilder.java new file mode 100644 index 00000000000..21f59b36ea3 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorBuilder.java @@ -0,0 +1,382 @@ + +package com.commercetools.api.models.error; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GraphQLExactLockConflictErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GraphQLExactLockConflictError graphQLExactLockConflictError = GraphQLExactLockConflictError.builder()
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLExactLockConflictErrorBuilder implements Builder { + + private Map values = new HashMap<>(); + + private String sku; + + private String currency; + + @Nullable + private String country; + + @Nullable + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + @Nullable + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + @Nullable + private java.time.ZonedDateTime validFrom; + + @Nullable + private java.time.ZonedDateTime validUntil; + + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + /** + *

Error-specific additional fields.

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

Error-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( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

CustomerGroup for which the Standalone Price is valid.

+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder withCustomerGroup( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()); + return this; + } + + /** + *

CustomerGroup 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( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

Channel for which the Standalone Price is valid.

+ * @param builder function to build the channel value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder withChannel( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Channel 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( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()) + .build(); + return this; + } + + /** + *

RecurrencePolicy that applies to the Standalone Price.

+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public GraphQLExactLockConflictErrorBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceBuilder.of()); + return this; + } + + /** + *

RecurrencePolicy 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 Map getValues() { + return this.values; + } + + /** + *

SKU 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 Map values; + + private String sku; + + private String currency; + + private String country; + + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + private java.time.ZonedDateTime validFrom; + + private java.time.ZonedDateTime validUntil; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + GraphQLExactLockConflictErrorImpl(@JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("sku") final String sku, @JsonProperty("currency") final String currency, + @JsonProperty("country") final String country, + @JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup, + @JsonProperty("channel") final com.commercetools.api.models.channel.ChannelResourceIdentifier channel, + @JsonProperty("validFrom") final java.time.ZonedDateTime validFrom, + @JsonProperty("validUntil") final java.time.ZonedDateTime validUntil, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyReference recurrencePolicy) { + this.values = values; + this.sku = sku; + this.currency = currency; + this.country = country; + this.customerGroup = customerGroup; + this.channel = channel; + this.validFrom = validFrom; + this.validUntil = validUntil; + this.recurrencePolicy = recurrencePolicy; + this.code = EXACT_LOCK_CONFLICT; + } + + /** + * create empty instance + */ + public GraphQLExactLockConflictErrorImpl() { + this.code = EXACT_LOCK_CONFLICT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

SKU 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:

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

+ *     GraphQLValidityLockConflictError graphQLValidityLockConflictError = GraphQLValidityLockConflictError.builder()
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("ValidityLockConflict") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = GraphQLValidityLockConflictErrorImpl.class) +public interface GraphQLValidityLockConflictError extends GraphQLErrorObject { + + /** + * discriminator value for GraphQLValidityLockConflictError + */ + String VALIDITY_LOCK_CONFLICT = "ValidityLockConflict"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

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 mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withGraphQLValidityLockConflictError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorBuilder.java new file mode 100644 index 00000000000..b9b22df5b20 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorBuilder.java @@ -0,0 +1,332 @@ + +package com.commercetools.api.models.error; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * GraphQLValidityLockConflictErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     GraphQLValidityLockConflictError graphQLValidityLockConflictError = GraphQLValidityLockConflictError.builder()
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class GraphQLValidityLockConflictErrorBuilder implements Builder { + + private Map values = new HashMap<>(); + + private String sku; + + private String currency; + + @Nullable + private String country; + + @Nullable + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + @Nullable + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + *

Error-specific additional fields.

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

Error-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( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

CustomerGroup for which the Standalone Price is valid.

+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder withCustomerGroup( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()); + return this; + } + + /** + *

CustomerGroup 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( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

Channel for which the Standalone Price is valid.

+ * @param builder function to build the channel value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder withChannel( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Channel 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( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

RecurrencePolicy for which the Standalone Price is valid.

+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public GraphQLValidityLockConflictErrorBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

RecurrencePolicy 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 Map getValues() { + return this.values; + } + + /** + *

SKU 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 Map values; + + private String sku; + + private String currency; + + private String country; + + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + GraphQLValidityLockConflictErrorImpl( + @JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("sku") final String sku, @JsonProperty("currency") final String currency, + @JsonProperty("country") final String country, + @JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup, + @JsonProperty("channel") final com.commercetools.api.models.channel.ChannelResourceIdentifier channel, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.values = values; + this.sku = sku; + this.currency = currency; + this.country = country; + this.customerGroup = customerGroup; + this.channel = channel; + this.recurrencePolicy = recurrencePolicy; + this.code = VALIDITY_LOCK_CONFLICT; + } + + /** + * create empty instance + */ + public GraphQLValidityLockConflictErrorImpl() { + this.code = VALIDITY_LOCK_CONFLICT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

SKU 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:

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

+ *     ValidityLockConflictError validityLockConflictError = ValidityLockConflictError.builder()
+ *             .message("{message}")
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@io.vrap.rmf.base.client.utils.json.SubType("ValidityLockConflict") +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +@JsonDeserialize(as = ValidityLockConflictErrorImpl.class) +public interface ValidityLockConflictError extends ErrorObject { + + /** + * discriminator value for ValidityLockConflictError + */ + String VALIDITY_LOCK_CONFLICT = "ValidityLockConflict"; + + /** + * + * @return code + */ + @NotNull + @JsonProperty("code") + public String getCode(); + + /** + *

"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."

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

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."

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

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 mapped type + * @param helper function to map the object + * @return mapped value + */ + default T withValidityLockConflictError(Function helper) { + return helper.apply(this); + } + + /** + * gives a TypeReference for usage with Jackson DataBind + * @return TypeReference + */ + public static com.fasterxml.jackson.core.type.TypeReference typeReference() { + return new com.fasterxml.jackson.core.type.TypeReference() { + @Override + public String toString() { + return "TypeReference"; + } + }; + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorBuilder.java new file mode 100644 index 00000000000..1d48086fa9c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorBuilder.java @@ -0,0 +1,357 @@ + +package com.commercetools.api.models.error; + +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import io.vrap.rmf.base.client.Builder; +import io.vrap.rmf.base.client.utils.Generated; + +/** + * ValidityLockConflictErrorBuilder + *
+ * Example to create an instance using the builder pattern + *
+ *

+ *     ValidityLockConflictError validityLockConflictError = ValidityLockConflictError.builder()
+ *             .message("{message}")
+ *             .sku("{sku}")
+ *             .currency("{currency}")
+ *             .build()
+ * 
+ *
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class ValidityLockConflictErrorBuilder implements Builder { + + private String message; + + private Map values = new HashMap<>(); + + private String sku; + + private String currency; + + @Nullable + private String country; + + @Nullable + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + @Nullable + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + @Nullable + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + *

"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."

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

Error-specific additional fields.

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

Error-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( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

CustomerGroup for which the Standalone Price is valid.

+ * @param builder function to build the customerGroup value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder withCustomerGroup( + Function builder) { + this.customerGroup = builder + .apply(com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierBuilder.of()); + return this; + } + + /** + *

CustomerGroup 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( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

Channel for which the Standalone Price is valid.

+ * @param builder function to build the channel value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder withChannel( + Function builder) { + this.channel = builder.apply(com.commercetools.api.models.channel.ChannelResourceIdentifierBuilder.of()); + return this; + } + + /** + *

Channel 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( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()) + .build(); + return this; + } + + /** + *

RecurrencePolicy for which the Standalone Price is valid.

+ * @param builder function to build the recurrencePolicy value + * @return Builder + */ + + public ValidityLockConflictErrorBuilder withRecurrencePolicy( + Function builder) { + this.recurrencePolicy = builder + .apply(com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierBuilder.of()); + return this; + } + + /** + *

RecurrencePolicy 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."

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

Error-specific additional fields.

+ * @return pattern properties + */ + + public Map getValues() { + return this.values; + } + + /** + *

SKU 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 values; + + private String sku; + + private String currency; + + private String country; + + private com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup; + + private com.commercetools.api.models.channel.ChannelResourceIdentifier channel; + + private com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy; + + /** + * create instance with all properties + */ + @JsonCreator + ValidityLockConflictErrorImpl(@JsonProperty("message") final String message, + @JsonAnySetter @JsonProperty("values") final Map values, + @JsonProperty("sku") final String sku, @JsonProperty("currency") final String currency, + @JsonProperty("country") final String country, + @JsonProperty("customerGroup") final com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifier customerGroup, + @JsonProperty("channel") final com.commercetools.api.models.channel.ChannelResourceIdentifier channel, + @JsonProperty("recurrencePolicy") final com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifier recurrencePolicy) { + this.message = message; + this.values = values; + this.sku = sku; + this.currency = currency; + this.country = country; + this.customerGroup = customerGroup; + this.channel = channel; + this.recurrencePolicy = recurrencePolicy; + this.code = VALIDITY_LOCK_CONFLICT; + } + + /** + * create empty instance + */ + public ValidityLockConflictErrorImpl() { + this.code = VALIDITY_LOCK_CONFLICT; + } + + /** + * + */ + + public String getCode() { + return this.code; + } + + /** + *

"Modification already in progress for the combination of SKU, price scope fields (but potentially different validity period). Please retry after the current operation completes."

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

Error-specific additional fields.

+ */ + + public Map values() { + return values; + } + + /** + *

SKU 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.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromActionImpl.java index f40021b2cd6..9661a554f41 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromActionImpl.java @@ -19,6 +19,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.

*/ @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.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilActionImpl.java index 15313591b4f..d525d9409a9 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidFromAndUntilActionImpl.java @@ -19,6 +19,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.

*/ @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.

* *
* Example to create an instance using the builder pattern diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilActionImpl.java index c03eb59f7fb..8a6f39495da 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilActionImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/standalone_price/StandalonePriceSetValidUntilActionImpl.java @@ -19,6 +19,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.

*/ @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 asEnumValuesMustMat ErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asExactLockConflict( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.ExactLockConflictErrorQueryBuilderDsl.of()), + ErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asExpiredCustomerEmailToken( Function> fn) { return new CombinationQueryPredicate<>( @@ -603,4 +610,11 @@ public CombinationQueryPredicate asSyntaxError( fn.apply(com.commercetools.api.predicates.query.error.SyntaxErrorErrorQueryBuilderDsl.of()), ErrorObjectQueryBuilderDsl::of); } + + public CombinationQueryPredicate asValidityLockConflict( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.ValidityLockConflictErrorQueryBuilderDsl.of()), + ErrorObjectQueryBuilderDsl::of); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ExactLockConflictErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ExactLockConflictErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..b96a77e366e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ExactLockConflictErrorQueryBuilderDsl.java @@ -0,0 +1,87 @@ + +package com.commercetools.api.predicates.query.error; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ExactLockConflictErrorQueryBuilderDsl { + public ExactLockConflictErrorQueryBuilderDsl() { + } + + public static ExactLockConflictErrorQueryBuilderDsl of() { + return new ExactLockConflictErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder message() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("message")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder currency() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("currency")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder country() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("country")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customerGroup( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customerGroup")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer_group.CustomerGroupResourceIdentifierQueryBuilderDsl + .of())), + ExactLockConflictErrorQueryBuilderDsl::of); + } + + public CombinationQueryPredicate channel( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("channel")) + .inner(fn.apply( + com.commercetools.api.predicates.query.channel.ChannelResourceIdentifierQueryBuilderDsl.of())), + ExactLockConflictErrorQueryBuilderDsl::of); + } + + public DateTimeComparisonPredicateBuilder validFrom() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("validFrom")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder validUntil() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("validUntil")), + p -> new CombinationQueryPredicate<>(p, ExactLockConflictErrorQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl + .of())), + ExactLockConflictErrorQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java index 9fb2293619f..30d198c189f 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLErrorObjectQueryBuilderDsl.java @@ -197,6 +197,13 @@ public CombinationQueryPredicate asEnumValues GraphQLErrorObjectQueryBuilderDsl::of); } + public CombinationQueryPredicate asExactLockConflict( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.GraphQLExactLockConflictErrorQueryBuilderDsl.of()), + GraphQLErrorObjectQueryBuilderDsl::of); + } + public CombinationQueryPredicate asExpiredCustomerEmailToken( Function> fn) { return new CombinationQueryPredicate<>( @@ -616,4 +623,11 @@ public CombinationQueryPredicate asSyntaxErro fn.apply(com.commercetools.api.predicates.query.error.GraphQLSyntaxErrorErrorQueryBuilderDsl.of()), GraphQLErrorObjectQueryBuilderDsl::of); } + + public CombinationQueryPredicate asValidityLockConflict( + Function> fn) { + return new CombinationQueryPredicate<>( + fn.apply(com.commercetools.api.predicates.query.error.GraphQLValidityLockConflictErrorQueryBuilderDsl.of()), + GraphQLErrorObjectQueryBuilderDsl::of); + } } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLExactLockConflictErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLExactLockConflictErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..47045c44f8a --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLExactLockConflictErrorQueryBuilderDsl.java @@ -0,0 +1,81 @@ + +package com.commercetools.api.predicates.query.error; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class GraphQLExactLockConflictErrorQueryBuilderDsl { + public GraphQLExactLockConflictErrorQueryBuilderDsl() { + } + + public static GraphQLExactLockConflictErrorQueryBuilderDsl of() { + return new GraphQLExactLockConflictErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, GraphQLExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, GraphQLExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder currency() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("currency")), + p -> new CombinationQueryPredicate<>(p, GraphQLExactLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder country() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("country")), + p -> new CombinationQueryPredicate<>(p, GraphQLExactLockConflictErrorQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customerGroup( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customerGroup")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer_group.CustomerGroupResourceIdentifierQueryBuilderDsl + .of())), + GraphQLExactLockConflictErrorQueryBuilderDsl::of); + } + + public CombinationQueryPredicate channel( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("channel")) + .inner(fn.apply( + com.commercetools.api.predicates.query.channel.ChannelResourceIdentifierQueryBuilderDsl.of())), + GraphQLExactLockConflictErrorQueryBuilderDsl::of); + } + + public DateTimeComparisonPredicateBuilder validFrom() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("validFrom")), + p -> new CombinationQueryPredicate<>(p, GraphQLExactLockConflictErrorQueryBuilderDsl::of)); + } + + public DateTimeComparisonPredicateBuilder validUntil() { + return new DateTimeComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("validUntil")), + p -> new CombinationQueryPredicate<>(p, GraphQLExactLockConflictErrorQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyReferenceQueryBuilderDsl + .of())), + GraphQLExactLockConflictErrorQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLValidityLockConflictErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLValidityLockConflictErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..685bfd5c7ca --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/GraphQLValidityLockConflictErrorQueryBuilderDsl.java @@ -0,0 +1,69 @@ + +package com.commercetools.api.predicates.query.error; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class GraphQLValidityLockConflictErrorQueryBuilderDsl { + public GraphQLValidityLockConflictErrorQueryBuilderDsl() { + } + + public static GraphQLValidityLockConflictErrorQueryBuilderDsl of() { + return new GraphQLValidityLockConflictErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, GraphQLValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, GraphQLValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder currency() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("currency")), + p -> new CombinationQueryPredicate<>(p, GraphQLValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder country() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("country")), + p -> new CombinationQueryPredicate<>(p, GraphQLValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customerGroup( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customerGroup")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer_group.CustomerGroupResourceIdentifierQueryBuilderDsl + .of())), + GraphQLValidityLockConflictErrorQueryBuilderDsl::of); + } + + public CombinationQueryPredicate channel( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("channel")) + .inner(fn.apply( + com.commercetools.api.predicates.query.channel.ChannelResourceIdentifierQueryBuilderDsl.of())), + GraphQLValidityLockConflictErrorQueryBuilderDsl::of); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + GraphQLValidityLockConflictErrorQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ValidityLockConflictErrorQueryBuilderDsl.java b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ValidityLockConflictErrorQueryBuilderDsl.java new file mode 100644 index 00000000000..d59c99eb63e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/error/ValidityLockConflictErrorQueryBuilderDsl.java @@ -0,0 +1,75 @@ + +package com.commercetools.api.predicates.query.error; + +import java.util.function.Function; + +import com.commercetools.api.predicates.query.*; + +public class ValidityLockConflictErrorQueryBuilderDsl { + public ValidityLockConflictErrorQueryBuilderDsl() { + } + + public static ValidityLockConflictErrorQueryBuilderDsl of() { + return new ValidityLockConflictErrorQueryBuilderDsl(); + } + + public StringComparisonPredicateBuilder code() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("code")), + p -> new CombinationQueryPredicate<>(p, ValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder message() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("message")), + p -> new CombinationQueryPredicate<>(p, ValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder sku() { + return new StringComparisonPredicateBuilder<>(BinaryQueryPredicate.of().left(new ConstantQueryPredicate("sku")), + p -> new CombinationQueryPredicate<>(p, ValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder currency() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("currency")), + p -> new CombinationQueryPredicate<>(p, ValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public StringComparisonPredicateBuilder country() { + return new StringComparisonPredicateBuilder<>( + BinaryQueryPredicate.of().left(new ConstantQueryPredicate("country")), + p -> new CombinationQueryPredicate<>(p, ValidityLockConflictErrorQueryBuilderDsl::of)); + } + + public CombinationQueryPredicate customerGroup( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("customerGroup")) + .inner(fn.apply( + com.commercetools.api.predicates.query.customer_group.CustomerGroupResourceIdentifierQueryBuilderDsl + .of())), + ValidityLockConflictErrorQueryBuilderDsl::of); + } + + public CombinationQueryPredicate channel( + Function> fn) { + return new CombinationQueryPredicate<>( + ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("channel")) + .inner(fn.apply( + com.commercetools.api.predicates.query.channel.ChannelResourceIdentifierQueryBuilderDsl.of())), + ValidityLockConflictErrorQueryBuilderDsl::of); + } + + public CombinationQueryPredicate recurrencePolicy( + Function> fn) { + return new CombinationQueryPredicate<>(ContainerQueryPredicate.of() + .parent(ConstantQueryPredicate.of().constant("recurrencePolicy")) + .inner(fn.apply( + com.commercetools.api.predicates.query.recurrence_policy.RecurrencePolicyResourceIdentifierQueryBuilderDsl + .of())), + ValidityLockConflictErrorQueryBuilderDsl::of); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorTest.java new file mode 100644 index 00000000000..9b409843a1c --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ExactLockConflictErrorTest.java @@ -0,0 +1,105 @@ + +package com.commercetools.api.models.error; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ExactLockConflictErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ExactLockConflictErrorBuilder builder) { + ExactLockConflictError exactLockConflictError = builder.buildUnchecked(); + Assertions.assertThat(exactLockConflictError).isInstanceOf(ExactLockConflictError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", ExactLockConflictError.builder().message("message") }, + new Object[] { "sku", ExactLockConflictError.builder().sku("sku") }, + new Object[] { "currency", ExactLockConflictError.builder().currency("currency") }, + new Object[] { "country", ExactLockConflictError.builder().country("country") }, + new Object[] { "customerGroup", ExactLockConflictError.builder() + .customerGroup( + new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()) }, + new Object[] { "channel", + ExactLockConflictError.builder() + .channel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()) }, + new Object[] { "validFrom", + ExactLockConflictError.builder().validFrom(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "validUntil", + ExactLockConflictError.builder().validUntil(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "recurrencePolicy", ExactLockConflictError.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()) } }; + } + + @Test + public void message() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void sku() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void currency() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setCurrency("currency"); + Assertions.assertThat(value.getCurrency()).isEqualTo("currency"); + } + + @Test + public void country() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void customerGroup() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setCustomerGroup(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + } + + @Test + public void channel() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setChannel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + Assertions.assertThat(value.getChannel()) + .isEqualTo(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + } + + @Test + public void validFrom() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setValidFrom(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidFrom()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void validUntil() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setValidUntil(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidUntil()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void recurrencePolicy() { + ExactLockConflictError value = ExactLockConflictError.of(); + value.setRecurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorTest.java new file mode 100644 index 00000000000..071bfefa6cf --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLExactLockConflictErrorTest.java @@ -0,0 +1,97 @@ + +package com.commercetools.api.models.error; + +import java.time.ZonedDateTime; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GraphQLExactLockConflictErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GraphQLExactLockConflictErrorBuilder builder) { + GraphQLExactLockConflictError graphQLExactLockConflictError = builder.buildUnchecked(); + Assertions.assertThat(graphQLExactLockConflictError).isInstanceOf(GraphQLExactLockConflictError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "sku", GraphQLExactLockConflictError.builder().sku("sku") }, + new Object[] { "currency", GraphQLExactLockConflictError.builder().currency("currency") }, + new Object[] { "country", GraphQLExactLockConflictError.builder().country("country") }, + new Object[] { "customerGroup", GraphQLExactLockConflictError.builder() + .customerGroup( + new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()) }, + new Object[] { "channel", + GraphQLExactLockConflictError.builder() + .channel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()) }, + new Object[] { "validFrom", + GraphQLExactLockConflictError.builder().validFrom(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "validUntil", + GraphQLExactLockConflictError.builder().validUntil(ZonedDateTime.parse("2023-06-01T12:00Z")) }, + new Object[] { "recurrencePolicy", GraphQLExactLockConflictError.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()) } }; + } + + @Test + public void sku() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void currency() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setCurrency("currency"); + Assertions.assertThat(value.getCurrency()).isEqualTo("currency"); + } + + @Test + public void country() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void customerGroup() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setCustomerGroup(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + } + + @Test + public void channel() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setChannel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + Assertions.assertThat(value.getChannel()) + .isEqualTo(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + } + + @Test + public void validFrom() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setValidFrom(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidFrom()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void validUntil() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setValidUntil(ZonedDateTime.parse("2023-06-01T12:00Z")); + Assertions.assertThat(value.getValidUntil()).isEqualTo(ZonedDateTime.parse("2023-06-01T12:00Z")); + } + + @Test + public void recurrencePolicy() { + GraphQLExactLockConflictError value = GraphQLExactLockConflictError.of(); + value.setRecurrencePolicy(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyReferenceImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorTest.java new file mode 100644 index 00000000000..6c37b655d9e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/GraphQLValidityLockConflictErrorTest.java @@ -0,0 +1,78 @@ + +package com.commercetools.api.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class GraphQLValidityLockConflictErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, GraphQLValidityLockConflictErrorBuilder builder) { + GraphQLValidityLockConflictError graphQLValidityLockConflictError = builder.buildUnchecked(); + Assertions.assertThat(graphQLValidityLockConflictError).isInstanceOf(GraphQLValidityLockConflictError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "sku", GraphQLValidityLockConflictError.builder().sku("sku") }, + new Object[] { "currency", GraphQLValidityLockConflictError.builder().currency("currency") }, + new Object[] { "country", GraphQLValidityLockConflictError.builder().country("country") }, + new Object[] { "customerGroup", GraphQLValidityLockConflictError.builder() + .customerGroup( + new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()) }, + new Object[] { "channel", + GraphQLValidityLockConflictError.builder() + .channel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()) }, + new Object[] { "recurrencePolicy", GraphQLValidityLockConflictError.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) } }; + } + + @Test + public void sku() { + GraphQLValidityLockConflictError value = GraphQLValidityLockConflictError.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void currency() { + GraphQLValidityLockConflictError value = GraphQLValidityLockConflictError.of(); + value.setCurrency("currency"); + Assertions.assertThat(value.getCurrency()).isEqualTo("currency"); + } + + @Test + public void country() { + GraphQLValidityLockConflictError value = GraphQLValidityLockConflictError.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void customerGroup() { + GraphQLValidityLockConflictError value = GraphQLValidityLockConflictError.of(); + value.setCustomerGroup(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + } + + @Test + public void channel() { + GraphQLValidityLockConflictError value = GraphQLValidityLockConflictError.of(); + value.setChannel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + Assertions.assertThat(value.getChannel()) + .isEqualTo(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + } + + @Test + public void recurrencePolicy() { + GraphQLValidityLockConflictError value = GraphQLValidityLockConflictError.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } +} diff --git a/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorTest.java b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorTest.java new file mode 100644 index 00000000000..cd666a0318f --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/error/ValidityLockConflictErrorTest.java @@ -0,0 +1,86 @@ + +package com.commercetools.api.models.error; + +import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + +public class ValidityLockConflictErrorTest { + + @ParameterizedTest(name = "#{index} with {0}") + @MethodSource("objectBuilder") + public void buildUnchecked(String name, ValidityLockConflictErrorBuilder builder) { + ValidityLockConflictError validityLockConflictError = builder.buildUnchecked(); + Assertions.assertThat(validityLockConflictError).isInstanceOf(ValidityLockConflictError.class); + } + + public static Object[][] objectBuilder() { + return new Object[][] { new Object[] { "message", ValidityLockConflictError.builder().message("message") }, + new Object[] { "sku", ValidityLockConflictError.builder().sku("sku") }, + new Object[] { "currency", ValidityLockConflictError.builder().currency("currency") }, + new Object[] { "country", ValidityLockConflictError.builder().country("country") }, + new Object[] { "customerGroup", ValidityLockConflictError.builder() + .customerGroup( + new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()) }, + new Object[] { "channel", + ValidityLockConflictError.builder() + .channel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()) }, + new Object[] { "recurrencePolicy", ValidityLockConflictError.builder() + .recurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()) } }; + } + + @Test + public void message() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setMessage("message"); + Assertions.assertThat(value.getMessage()).isEqualTo("message"); + } + + @Test + public void sku() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setSku("sku"); + Assertions.assertThat(value.getSku()).isEqualTo("sku"); + } + + @Test + public void currency() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setCurrency("currency"); + Assertions.assertThat(value.getCurrency()).isEqualTo("currency"); + } + + @Test + public void country() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setCountry("country"); + Assertions.assertThat(value.getCountry()).isEqualTo("country"); + } + + @Test + public void customerGroup() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setCustomerGroup(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + Assertions.assertThat(value.getCustomerGroup()) + .isEqualTo(new com.commercetools.api.models.customer_group.CustomerGroupResourceIdentifierImpl()); + } + + @Test + public void channel() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setChannel(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + Assertions.assertThat(value.getChannel()) + .isEqualTo(new com.commercetools.api.models.channel.ChannelResourceIdentifierImpl()); + } + + @Test + public void recurrencePolicy() { + ValidityLockConflictError value = ValidityLockConflictError.of(); + value.setRecurrencePolicy( + new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + Assertions.assertThat(value.getRecurrencePolicy()) + .isEqualTo(new com.commercetools.api.models.recurrence_policy.RecurrencePolicyResourceIdentifierImpl()); + } +} diff --git a/references.txt b/references.txt index 712cdcf028b..5040964d122 100644 --- a/references.txt +++ b/references.txt @@ -531,3 +531,4 @@ a9c69a2e32f13e695d381fb1c492ee6ed7e6f046 8b51ad0f1cb789c4294135568e272854eea7ac53 da68d777f48ba0233a7542a5344d86ef185db481 d90411c7dae76245a17c90707bfd18b735f04a9c +7fe8fbd8d4276aa8a033b8cba92c68c695d808c2