From 862e40e2e5071166e6573147986084fda3429836 Mon Sep 17 00:00:00 2001
From: "ct-sdks[bot]" <153784748+ct-sdks[bot]@users.noreply.github.com>
Date: Wed, 7 Feb 2024 10:56:58 +0000
Subject: [PATCH] build(codegen): updating SDK
---
changes.md | 32 ++
.../main/resources/graphql/schema.graphqls | 45 +-
.../ByProjectKeyDiscountCodesByIDDelete.java | 1 +
...ProjectKeyDiscountCodesKeyByKeyDelete.java | 380 +++++++++++++++
.../ByProjectKeyDiscountCodesKeyByKeyGet.java | 208 ++++++++
...ByProjectKeyDiscountCodesKeyByKeyHead.java | 120 +++++
...ByProjectKeyDiscountCodesKeyByKeyPost.java | 231 +++++++++
...ectKeyDiscountCodesKeyByKeyPostString.java | 230 +++++++++
...eyDiscountCodesKeyByKeyRequestBuilder.java | 53 ++
.../client/ByProjectKeyDiscountCodesPost.java | 1 +
.../ByProjectKeyDiscountCodesPostString.java | 1 +
...ProjectKeyDiscountCodesRequestBuilder.java | 4 +
.../models/discount_code/DiscountCode.java | 17 +
.../discount_code/DiscountCodeBuilder.java | 29 +-
.../discount_code/DiscountCodeDraft.java | 17 +
.../DiscountCodeDraftBuilder.java | 29 +-
.../discount_code/DiscountCodeDraftImpl.java | 28 +-
.../discount_code/DiscountCodeImpl.java | 20 +
.../DiscountCodeSetKeyAction.java | 124 +++++
.../DiscountCodeSetKeyActionBuilder.java | 84 ++++
.../DiscountCodeSetKeyActionImpl.java | 94 ++++
.../DiscountCodeUpdateAction.java | 13 +
.../DiscountCodeUpdateActionBuilder.java | 4 +
.../message/DiscountCodeCreatedMessage.java | 159 ++++++
.../DiscountCodeCreatedMessageBuilder.java | 452 ++++++++++++++++++
.../DiscountCodeCreatedMessageImpl.java | 296 ++++++++++++
.../DiscountCodeCreatedMessagePayload.java | 131 +++++
...countCodeCreatedMessagePayloadBuilder.java | 108 +++++
...DiscountCodeCreatedMessagePayloadImpl.java | 95 ++++
.../message/DiscountCodeDeletedMessage.java | 136 ++++++
.../DiscountCodeDeletedMessageBuilder.java | 402 ++++++++++++++++
.../DiscountCodeDeletedMessageImpl.java | 276 +++++++++++
.../DiscountCodeDeletedMessagePayload.java | 108 +++++
...countCodeDeletedMessagePayloadBuilder.java | 57 +++
...DiscountCodeDeletedMessagePayloadImpl.java | 65 +++
.../message/DiscountCodeKeySetMessage.java | 170 +++++++
.../DiscountCodeKeySetMessageBuilder.java | 452 ++++++++++++++++++
.../DiscountCodeKeySetMessageImpl.java | 315 ++++++++++++
.../DiscountCodeKeySetMessagePayload.java | 141 ++++++
...scountCodeKeySetMessagePayloadBuilder.java | 109 +++++
.../DiscountCodeKeySetMessagePayloadImpl.java | 113 +++++
.../api/models/message/Message.java | 39 ++
.../api/models/message/MessageBuilder.java | 12 +
.../api/models/message/MessagePayload.java | 39 ++
.../models/message/MessagePayloadBuilder.java | 12 +
.../DiscountCodeDraftQueryBuilderDsl.java | 5 +
.../DiscountCodeQueryBuilderDsl.java | 5 +
...scountCodeSetKeyActionQueryBuilderDsl.java | 25 +
...scountCodeUpdateActionQueryBuilderDsl.java | 7 +
...eCreatedMessagePayloadQueryBuilderDsl.java | 32 ++
...ountCodeCreatedMessageQueryBuilderDsl.java | 104 ++++
...eDeletedMessagePayloadQueryBuilderDsl.java | 20 +
...ountCodeDeletedMessageQueryBuilderDsl.java | 94 ++++
...deKeySetMessagePayloadQueryBuilderDsl.java | 31 ++
...countCodeKeySetMessageQueryBuilderDsl.java | 105 ++++
.../MessagePayloadQueryBuilderDsl.java | 24 +
.../query/message/MessageQueryBuilderDsl.java | 21 +
...ByProjectKeyDiscountCodesKeyByKeyTest.java | 166 +++++++
.../discount_code/DiscountCodeDraftTest.java | 9 +-
.../DiscountCodeSetKeyActionTest.java | 36 ++
.../discount_code/DiscountCodeTest.java | 9 +-
...DiscountCodeCreatedMessagePayloadTest.java | 38 ++
.../DiscountCodeCreatedMessageTest.java | 38 ++
...DiscountCodeDeletedMessagePayloadTest.java | 13 +
.../DiscountCodeDeletedMessageTest.java | 13 +
.../DiscountCodeKeySetMessagePayloadTest.java | 44 ++
.../DiscountCodeKeySetMessageTest.java | 44 ++
references.txt | 1 +
68 files changed, 6323 insertions(+), 13 deletions(-)
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyDiscountCodesKeyByKeyDelete.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyDiscountCodesKeyByKeyGet.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyDiscountCodesKeyByKeyHead.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyDiscountCodesKeyByKeyPost.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyDiscountCodesKeyByKeyPostString.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/client/ByProjectKeyDiscountCodesKeyByKeyRequestBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyAction.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyActionBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyActionImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessage.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessageBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessageImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayload.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayloadBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayloadImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessage.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessageBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessageImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessagePayload.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessagePayloadBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessagePayloadImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessage.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessageBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessageImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessagePayload.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessagePayloadBuilder.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessagePayloadImpl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/discount_code/DiscountCodeSetKeyActionQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/DiscountCodeCreatedMessagePayloadQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/DiscountCodeCreatedMessageQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/DiscountCodeDeletedMessagePayloadQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/DiscountCodeDeletedMessageQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/DiscountCodeKeySetMessagePayloadQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/main/java-predicates-generated/com/commercetools/api/predicates/query/message/DiscountCodeKeySetMessageQueryBuilderDsl.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/client/resource/ByProjectKeyDiscountCodesKeyByKeyTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyActionTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayloadTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessageTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessagePayloadTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessageTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessagePayloadTest.java
create mode 100644 commercetools/commercetools-sdk-java-api/src/test/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessageTest.java
diff --git a/changes.md b/changes.md
index 71a6410f897..104b9c31004 100644
--- a/changes.md
+++ b/changes.md
@@ -1,9 +1,41 @@
**Api changes**
+Added Method(s)
+
+- added method `apiRoot.withProjectKey().discountCodes().withKey().get()`
+- added method `apiRoot.withProjectKey().discountCodes().withKey().head()`
+- added method `apiRoot.withProjectKey().discountCodes().withKey().post()`
+- added method `apiRoot.withProjectKey().discountCodes().withKey().delete()`
+Added Property(s)
- added property `perMethodExternalTaxRate` to type `CartAddLineItemAction`
+- added property `key` to type `DiscountCode`
+- added property `key` to type `DiscountCodeDraft`
- added property `shippingMode` to type `MyCartDraft`
Added Resource(s)
+
+- added resource `/{projectKey}/discount-codes/key={key}`
+Added Type(s)
+
+- added type `DiscountCodeSetKeyAction`
+- added type `DiscountCodeCreatedMessage`
+- added type `DiscountCodeDeletedMessage`
+- added type `DiscountCodeKeySetMessage`
+- added type `DiscountCodeCreatedMessagePayload`
+- added type `DiscountCodeDeletedMessagePayload`
+- added type `DiscountCodeKeySetMessagePayload`
+
Deleting a Discount Code produces the DiscountCodeDeleted Message.
*Deprecated scope: manage_orders:{projectKey}
Deleting a Discount Code produces the DiscountCodeDeleted Message.
+ *Deprecated scope: manage_orders:{projectKey}
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .delete()
+ * .withVersion(version)
+ * .execute()
+ * }
+ * Deprecated scope: view_orders:{projectKey}
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .get()
+ * .execute()
+ * }
+ * Checks if a DiscountCode exists for a given key
. Returns a 200 OK
status if the DiscountCode exists or a 404 Not Found
otherwise.
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .head()
+ * .execute()
+ * }
+ * Deprecated scope: manage_orders:{projectKey}
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .post(null)
+ * .execute()
+ * }
+ * Deprecated scope: manage_orders:{projectKey}
{@code
+ * CompletableFuture> result = apiRoot
+ * .withProjectKey("{projectKey}")
+ * .discountCodes()
+ * .withKey("{key}")
+ * .post("")
+ * .execute()
+ * }
+ * Creating a Discount Code produces the DiscountCodeCreated Message.
*Deprecated scope: manage_orders:{projectKey}
Creating a Discount Code produces the DiscountCodeCreated Message.
*Deprecated scope: manage_orders:{projectKey}
User-defined unique identifier of the DiscountCode.
+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + /** *Current version of the DiscountCode.
* @return version @@ -221,6 +229,13 @@ public interface DiscountCode public void setId(final String id); + /** + *User-defined unique identifier of the DiscountCode.
+ * @param key value to be set + */ + + public void setKey(final String key); + /** *Current version of the DiscountCode.
* @param version value to be set @@ -397,6 +412,7 @@ public static DiscountCode of(final DiscountCode template) { instance.setVersion(template.getVersion()); instance.setCreatedAt(template.getCreatedAt()); instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setKey(template.getKey()); instance.setLastModifiedBy(template.getLastModifiedBy()); instance.setCreatedBy(template.getCreatedBy()); instance.setName(template.getName()); @@ -431,6 +447,7 @@ public static DiscountCode deepCopy(@Nullable final DiscountCode template) { instance.setVersion(template.getVersion()); instance.setCreatedAt(template.getCreatedAt()); instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setKey(template.getKey()); instance.setLastModifiedBy( com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java index 5aa7ad67a95..c842d800a82 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeBuilder.java @@ -40,6 +40,9 @@ public class DiscountCodeBuilder implements BuilderUser-defined unique identifier of the DiscountCode.
+ * @param key value to be set + * @return Builder + */ + + public DiscountCodeBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + /** *Present on resources created after 1 February 2019 except for events not tracked.
* @param builder function to build the lastModifiedBy value @@ -622,6 +636,16 @@ public java.time.ZonedDateTime getLastModifiedAt() { return this.lastModifiedAt; } + /** + *User-defined unique identifier of the DiscountCode.
+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + /** *Present on resources created after 1 February 2019 except for events not tracked.
* @return lastModifiedBy @@ -791,7 +815,7 @@ public DiscountCode build() { Objects.requireNonNull(isActive, DiscountCode.class + ": isActive is missing"); Objects.requireNonNull(references, DiscountCode.class + ": references is missing"); Objects.requireNonNull(groups, DiscountCode.class + ": groups is missing"); - return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, name, + return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, key, lastModifiedBy, createdBy, name, description, code, cartDiscounts, cartPredicate, isActive, references, maxApplications, maxApplicationsPerCustomer, custom, groups, validFrom, validUntil, applicationVersion); } @@ -801,7 +825,7 @@ public DiscountCode build() { * @return DiscountCode */ public DiscountCode buildUnchecked() { - return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, name, + return new DiscountCodeImpl(id, version, createdAt, lastModifiedAt, key, lastModifiedBy, createdBy, name, description, code, cartDiscounts, cartPredicate, isActive, references, maxApplications, maxApplicationsPerCustomer, custom, groups, validFrom, validUntil, applicationVersion); } @@ -825,6 +849,7 @@ public static DiscountCodeBuilder of(final DiscountCode template) { builder.version = template.getVersion(); builder.createdAt = template.getCreatedAt(); builder.lastModifiedAt = template.getLastModifiedAt(); + builder.key = template.getKey(); builder.lastModifiedBy = template.getLastModifiedBy(); builder.createdBy = template.getCreatedBy(); builder.name = template.getName(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java index aa2e782099d..a67b5570a65 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraft.java @@ -38,6 +38,14 @@ public interface DiscountCodeDraft extends com.commercetools.api.models.CustomizableDraftUser-defined unique identifier for the DiscountCode.
+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + /** *Name of the DiscountCode.
* @return name @@ -135,6 +143,13 @@ public interface DiscountCodeDraft extends com.commercetools.api.models.Customiz @JsonProperty("validUntil") public ZonedDateTime getValidUntil(); + /** + *User-defined unique identifier for the DiscountCode.
+ * @param key value to be set + */ + + public void setKey(final String key); + /** *Name of the DiscountCode.
* @param name value to be set @@ -250,6 +265,7 @@ public static DiscountCodeDraft of() { */ public static DiscountCodeDraft of(final DiscountCodeDraft template) { DiscountCodeDraftImpl instance = new DiscountCodeDraftImpl(); + instance.setKey(template.getKey()); instance.setName(template.getName()); instance.setDescription(template.getDescription()); instance.setCode(template.getCode()); @@ -276,6 +292,7 @@ public static DiscountCodeDraft deepCopy(@Nullable final DiscountCodeDraft templ return null; } DiscountCodeDraftImpl instance = new DiscountCodeDraftImpl(); + instance.setKey(template.getKey()); instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName())); instance.setDescription( com.commercetools.api.models.common.LocalizedString.deepCopy(template.getDescription())); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java index 77bff2e91ce..6671e7a9175 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftBuilder.java @@ -25,6 +25,9 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountCodeDraftBuilder implements BuilderUser-defined unique identifier for the DiscountCode.
+ * @param key value to be set + * @return Builder + */ + + public DiscountCodeDraftBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + /** *Name of the DiscountCode.
* @param builder function to build the name value @@ -373,6 +387,16 @@ public DiscountCodeDraftBuilder validUntil(@Nullable final java.time.ZonedDateTi return this; } + /** + *User-defined unique identifier for the DiscountCode.
+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + /** *Name of the DiscountCode.
* @return name @@ -498,7 +522,7 @@ public java.time.ZonedDateTime getValidUntil() { public DiscountCodeDraft build() { Objects.requireNonNull(code, DiscountCodeDraft.class + ": code is missing"); Objects.requireNonNull(cartDiscounts, DiscountCodeDraft.class + ": cartDiscounts is missing"); - return new DiscountCodeDraftImpl(name, description, code, cartDiscounts, cartPredicate, isActive, + return new DiscountCodeDraftImpl(key, name, description, code, cartDiscounts, cartPredicate, isActive, maxApplications, maxApplicationsPerCustomer, custom, groups, validFrom, validUntil); } @@ -507,7 +531,7 @@ public DiscountCodeDraft build() { * @return DiscountCodeDraft */ public DiscountCodeDraft buildUnchecked() { - return new DiscountCodeDraftImpl(name, description, code, cartDiscounts, cartPredicate, isActive, + return new DiscountCodeDraftImpl(key, name, description, code, cartDiscounts, cartPredicate, isActive, maxApplications, maxApplicationsPerCustomer, custom, groups, validFrom, validUntil); } @@ -526,6 +550,7 @@ public static DiscountCodeDraftBuilder of() { */ public static DiscountCodeDraftBuilder of(final DiscountCodeDraft template) { DiscountCodeDraftBuilder builder = new DiscountCodeDraftBuilder(); + builder.key = template.getKey(); builder.name = template.getName(); builder.description = template.getDescription(); builder.code = template.getCode(); diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java index 7edce5d1a4a..9858ca3cd5b 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeDraftImpl.java @@ -22,6 +22,8 @@ @Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") public class DiscountCodeDraftImpl implements DiscountCodeDraft, ModelBase { + private String key; + private com.commercetools.api.models.common.LocalizedString name; private com.commercetools.api.models.common.LocalizedString description; @@ -50,7 +52,8 @@ public class DiscountCodeDraftImpl implements DiscountCodeDraft, ModelBase { * create instance with all properties */ @JsonCreator - DiscountCodeDraftImpl(@JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, + DiscountCodeDraftImpl(@JsonProperty("key") final String key, + @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, @JsonProperty("description") final com.commercetools.api.models.common.LocalizedString description, @JsonProperty("code") final String code, @JsonProperty("cartDiscounts") final java.util.ListUser-defined unique identifier for the DiscountCode.
+ */ + + public String getKey() { + return this.key; + } + /** *Name of the DiscountCode.
*/ @@ -177,6 +189,10 @@ public java.time.ZonedDateTime getValidUntil() { return this.validUntil; } + public void setKey(final String key) { + this.key = key; + } + public void setName(final com.commercetools.api.models.common.LocalizedString name) { this.name = name; } @@ -245,7 +261,8 @@ public boolean equals(Object o) { DiscountCodeDraftImpl that = (DiscountCodeDraftImpl) o; - return new EqualsBuilder().append(name, that.name) + return new EqualsBuilder().append(key, that.key) + .append(name, that.name) .append(description, that.description) .append(code, that.code) .append(cartDiscounts, that.cartDiscounts) @@ -257,6 +274,7 @@ public boolean equals(Object o) { .append(groups, that.groups) .append(validFrom, that.validFrom) .append(validUntil, that.validUntil) + .append(key, that.key) .append(name, that.name) .append(description, that.description) .append(code, that.code) @@ -274,7 +292,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return new HashCodeBuilder(17, 37).append(name) + return new HashCodeBuilder(17, 37).append(key) + .append(name) .append(description) .append(code) .append(cartDiscounts) @@ -291,7 +310,8 @@ public int hashCode() { @Override public String toString() { - return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("name", name) + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("key", key) + .append("name", name) .append("description", description) .append("code", code) .append("cartDiscounts", cartDiscounts) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java index 6249d90d47a..576ea3684e2 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeImpl.java @@ -30,6 +30,8 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase { private java.time.ZonedDateTime lastModifiedAt; + private String key; + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; private com.commercetools.api.models.common.CreatedBy createdBy; @@ -69,6 +71,7 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase { DiscountCodeImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("key") final String key, @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, @JsonProperty("name") final com.commercetools.api.models.common.LocalizedString name, @@ -88,6 +91,7 @@ public class DiscountCodeImpl implements DiscountCode, ModelBase { this.version = version; this.createdAt = createdAt; this.lastModifiedAt = lastModifiedAt; + this.key = key; this.lastModifiedBy = lastModifiedBy; this.createdBy = createdBy; this.name = name; @@ -144,6 +148,14 @@ public java.time.ZonedDateTime getLastModifiedAt() { return this.lastModifiedAt; } + /** + *User-defined unique identifier of the DiscountCode.
+ */ + + public String getKey() { + return this.key; + } + /** *Present on resources created after 1 February 2019 except for events not tracked.
*/ @@ -288,6 +300,10 @@ public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { this.lastModifiedAt = lastModifiedAt; } + public void setKey(final String key) { + this.key = key; + } + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } @@ -380,6 +396,7 @@ public boolean equals(Object o) { .append(version, that.version) .append(createdAt, that.createdAt) .append(lastModifiedAt, that.lastModifiedAt) + .append(key, that.key) .append(lastModifiedBy, that.lastModifiedBy) .append(createdBy, that.createdBy) .append(name, that.name) @@ -400,6 +417,7 @@ public boolean equals(Object o) { .append(version, that.version) .append(createdAt, that.createdAt) .append(lastModifiedAt, that.lastModifiedAt) + .append(key, that.key) .append(lastModifiedBy, that.lastModifiedBy) .append(createdBy, that.createdBy) .append(name, that.name) @@ -425,6 +443,7 @@ public int hashCode() { .append(version) .append(createdAt) .append(lastModifiedAt) + .append(key) .append(lastModifiedBy) .append(createdBy) .append(name) @@ -450,6 +469,7 @@ public String toString() { .append("version", version) .append("createdAt", createdAt) .append("lastModifiedAt", lastModifiedAt) + .append("key", key) .append("lastModifiedBy", lastModifiedBy) .append("createdBy", createdBy) .append("name", name) diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyAction.java new file mode 100644 index 00000000000..df676b1b2ff --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyAction.java @@ -0,0 +1,124 @@ + +package com.commercetools.api.models.discount_code; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *This action generates a DiscountCodeKeySet Message.
+ * + *
+ * DiscountCodeSetKeyAction discountCodeSetKeyAction = DiscountCodeSetKeyAction.builder()
+ * .build()
+ *
+ * Unique value to set. If empty, any existing value will be removed.
+ * @return key + */ + + @JsonProperty("key") + public String getKey(); + + /** + *Unique value to set. If empty, any existing value will be removed.
+ * @param key value to be set + */ + + public void setKey(final String key); + + /** + * factory method + * @return instance of DiscountCodeSetKeyAction + */ + public static DiscountCodeSetKeyAction of() { + return new DiscountCodeSetKeyActionImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeSetKeyAction + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeSetKeyAction of(final DiscountCodeSetKeyAction template) { + DiscountCodeSetKeyActionImpl instance = new DiscountCodeSetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * factory method to create a deep copy of DiscountCodeSetKeyAction + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeSetKeyAction deepCopy(@Nullable final DiscountCodeSetKeyAction template) { + if (template == null) { + return null; + } + DiscountCodeSetKeyActionImpl instance = new DiscountCodeSetKeyActionImpl(); + instance.setKey(template.getKey()); + return instance; + } + + /** + * builder factory method for DiscountCodeSetKeyAction + * @return builder + */ + public static DiscountCodeSetKeyActionBuilder builder() { + return DiscountCodeSetKeyActionBuilder.of(); + } + + /** + * create builder for DiscountCodeSetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeSetKeyActionBuilder builder(final DiscountCodeSetKeyAction template) { + return DiscountCodeSetKeyActionBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * DiscountCodeSetKeyAction discountCodeSetKeyAction = DiscountCodeSetKeyAction.builder()
+ * .build()
+ *
+ * Unique value to set. If empty, any existing value will be removed.
+ * @param key value to be set + * @return Builder + */ + + public DiscountCodeSetKeyActionBuilder key(@Nullable final String key) { + this.key = key; + return this; + } + + /** + *Unique value to set. If empty, any existing value will be removed.
+ * @return key + */ + + @Nullable + public String getKey() { + return this.key; + } + + /** + * builds DiscountCodeSetKeyAction with checking for non-null required values + * @return DiscountCodeSetKeyAction + */ + public DiscountCodeSetKeyAction build() { + return new DiscountCodeSetKeyActionImpl(key); + } + + /** + * builds DiscountCodeSetKeyAction without checking for non-null required values + * @return DiscountCodeSetKeyAction + */ + public DiscountCodeSetKeyAction buildUnchecked() { + return new DiscountCodeSetKeyActionImpl(key); + } + + /** + * factory method for an instance of DiscountCodeSetKeyActionBuilder + * @return builder + */ + public static DiscountCodeSetKeyActionBuilder of() { + return new DiscountCodeSetKeyActionBuilder(); + } + + /** + * create builder for DiscountCodeSetKeyAction instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeSetKeyActionBuilder of(final DiscountCodeSetKeyAction template) { + DiscountCodeSetKeyActionBuilder builder = new DiscountCodeSetKeyActionBuilder(); + builder.key = template.getKey(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyActionImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyActionImpl.java new file mode 100644 index 00000000000..c9b9ccc1943 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeSetKeyActionImpl.java @@ -0,0 +1,94 @@ + +package com.commercetools.api.models.discount_code; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *This action generates a DiscountCodeKeySet Message.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeSetKeyActionImpl implements DiscountCodeSetKeyAction, ModelBase { + + private String action; + + private String key; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeSetKeyActionImpl(@JsonProperty("key") final String key) { + this.key = key; + this.action = SET_KEY; + } + + /** + * create empty instance + */ + public DiscountCodeSetKeyActionImpl() { + this.action = SET_KEY; + } + + /** + * + */ + + public String getAction() { + return this.action; + } + + /** + *Unique value to set. If empty, any existing value will be removed.
+ */ + + public String getKey() { + return this.key; + } + + public void setKey(final String key) { + this.key = key; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeSetKeyActionImpl that = (DiscountCodeSetKeyActionImpl) o; + + return new EqualsBuilder().append(action, that.action) + .append(key, that.key) + .append(action, that.action) + .append(key, that.key) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(action).append(key).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("action", action) + .append("key", key) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateAction.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateAction.java index cc33ea03899..48fd522e542 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateAction.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateAction.java @@ -34,6 +34,7 @@ @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetCustomFieldActionImpl.class, name = DiscountCodeSetCustomFieldAction.SET_CUSTOM_FIELD), @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetCustomTypeActionImpl.class, name = DiscountCodeSetCustomTypeAction.SET_CUSTOM_TYPE), @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetDescriptionActionImpl.class, name = DiscountCodeSetDescriptionAction.SET_DESCRIPTION), + @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetKeyActionImpl.class, name = DiscountCodeSetKeyAction.SET_KEY), @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsActionImpl.class, name = DiscountCodeSetMaxApplicationsAction.SET_MAX_APPLICATIONS), @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsPerCustomerActionImpl.class, name = DiscountCodeSetMaxApplicationsPerCustomerAction.SET_MAX_APPLICATIONS_PER_CUSTOMER), @JsonSubTypes.Type(value = com.commercetools.api.models.discount_code.DiscountCodeSetNameActionImpl.class, name = DiscountCodeSetNameAction.SET_NAME), @@ -92,6 +93,10 @@ public static DiscountCodeUpdateAction deepCopy(@Nullable final DiscountCodeUpda return com.commercetools.api.models.discount_code.DiscountCodeSetDescriptionAction .deepCopy((com.commercetools.api.models.discount_code.DiscountCodeSetDescriptionAction) template); } + if (template instanceof com.commercetools.api.models.discount_code.DiscountCodeSetKeyAction) { + return com.commercetools.api.models.discount_code.DiscountCodeSetKeyAction + .deepCopy((com.commercetools.api.models.discount_code.DiscountCodeSetKeyAction) template); + } if (template instanceof com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsAction) { return com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsAction.deepCopy( (com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsAction) template); @@ -176,6 +181,14 @@ public static com.commercetools.api.models.discount_code.DiscountCodeSetDescript return com.commercetools.api.models.discount_code.DiscountCodeSetDescriptionActionBuilder.of(); } + /** + * builder for setKey subtype + * @return builder + */ + public static com.commercetools.api.models.discount_code.DiscountCodeSetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.discount_code.DiscountCodeSetKeyActionBuilder.of(); + } + /** * builder for setMaxApplications subtype * @return builder diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateActionBuilder.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateActionBuilder.java index 5e6719f0d59..a90a0f0df9c 100644 --- a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateActionBuilder.java +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/discount_code/DiscountCodeUpdateActionBuilder.java @@ -39,6 +39,10 @@ public com.commercetools.api.models.discount_code.DiscountCodeSetDescriptionActi return com.commercetools.api.models.discount_code.DiscountCodeSetDescriptionActionBuilder.of(); } + public com.commercetools.api.models.discount_code.DiscountCodeSetKeyActionBuilder setKeyBuilder() { + return com.commercetools.api.models.discount_code.DiscountCodeSetKeyActionBuilder.of(); + } + public com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsActionBuilder setMaxApplicationsBuilder() { return com.commercetools.api.models.discount_code.DiscountCodeSetMaxApplicationsActionBuilder.of(); } diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessage.java new file mode 100644 index 00000000000..06bc8cb17c6 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessage.java @@ -0,0 +1,159 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.discount_code.DiscountCode; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Create DiscountCode request.
+ * + *
+ * DiscountCodeCreatedMessage discountCodeCreatedMessage = DiscountCodeCreatedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .discountCode(discountCodeBuilder -> discountCodeBuilder)
+ * .build()
+ *
+ * The Discount Code that was created.
+ * @return discountCode + */ + @NotNull + @Valid + @JsonProperty("discountCode") + public DiscountCode getDiscountCode(); + + /** + *The Discount Code that was created.
+ * @param discountCode value to be set + */ + + public void setDiscountCode(final DiscountCode discountCode); + + /** + * factory method + * @return instance of DiscountCodeCreatedMessage + */ + public static DiscountCodeCreatedMessage of() { + return new DiscountCodeCreatedMessageImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeCreatedMessage of(final DiscountCodeCreatedMessage template) { + DiscountCodeCreatedMessageImpl instance = new DiscountCodeCreatedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy(template.getLastModifiedBy()); + instance.setCreatedBy(template.getCreatedBy()); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(template.getResource()); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(template.getResourceUserProvidedIdentifiers()); + instance.setDiscountCode(template.getDiscountCode()); + return instance; + } + + /** + * factory method to create a deep copy of DiscountCodeCreatedMessage + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeCreatedMessage deepCopy(@Nullable final DiscountCodeCreatedMessage template) { + if (template == null) { + return null; + } + DiscountCodeCreatedMessageImpl instance = new DiscountCodeCreatedMessageImpl(); + instance.setId(template.getId()); + instance.setVersion(template.getVersion()); + instance.setCreatedAt(template.getCreatedAt()); + instance.setLastModifiedAt(template.getLastModifiedAt()); + instance.setLastModifiedBy( + com.commercetools.api.models.common.LastModifiedBy.deepCopy(template.getLastModifiedBy())); + instance.setCreatedBy(com.commercetools.api.models.common.CreatedBy.deepCopy(template.getCreatedBy())); + instance.setSequenceNumber(template.getSequenceNumber()); + instance.setResource(com.commercetools.api.models.common.Reference.deepCopy(template.getResource())); + instance.setResourceVersion(template.getResourceVersion()); + instance.setResourceUserProvidedIdentifiers(com.commercetools.api.models.message.UserProvidedIdentifiers + .deepCopy(template.getResourceUserProvidedIdentifiers())); + instance.setDiscountCode( + com.commercetools.api.models.discount_code.DiscountCode.deepCopy(template.getDiscountCode())); + return instance; + } + + /** + * builder factory method for DiscountCodeCreatedMessage + * @return builder + */ + public static DiscountCodeCreatedMessageBuilder builder() { + return DiscountCodeCreatedMessageBuilder.of(); + } + + /** + * create builder for DiscountCodeCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeCreatedMessageBuilder builder(final DiscountCodeCreatedMessage template) { + return DiscountCodeCreatedMessageBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * DiscountCodeCreatedMessage discountCodeCreatedMessage = DiscountCodeCreatedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .discountCode(discountCodeBuilder -> discountCodeBuilder)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder resource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Discount Code that was created.
+ * @param builder function to build the discountCode value + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder discountCode( + FunctionThe Discount Code that was created.
+ * @param builder function to build the discountCode value + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder withDiscountCode( + FunctionThe Discount Code that was created.
+ * @param discountCode value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessageBuilder discountCode( + final com.commercetools.api.models.discount_code.DiscountCode discountCode) { + this.discountCode = discountCode; + return this; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Discount Code that was created.
+ * @return discountCode + */ + + public com.commercetools.api.models.discount_code.DiscountCode getDiscountCode() { + return this.discountCode; + } + + /** + * builds DiscountCodeCreatedMessage with checking for non-null required values + * @return DiscountCodeCreatedMessage + */ + public DiscountCodeCreatedMessage build() { + Objects.requireNonNull(id, DiscountCodeCreatedMessage.class + ": id is missing"); + Objects.requireNonNull(version, DiscountCodeCreatedMessage.class + ": version is missing"); + Objects.requireNonNull(createdAt, DiscountCodeCreatedMessage.class + ": createdAt is missing"); + Objects.requireNonNull(lastModifiedAt, DiscountCodeCreatedMessage.class + ": lastModifiedAt is missing"); + Objects.requireNonNull(sequenceNumber, DiscountCodeCreatedMessage.class + ": sequenceNumber is missing"); + Objects.requireNonNull(resource, DiscountCodeCreatedMessage.class + ": resource is missing"); + Objects.requireNonNull(resourceVersion, DiscountCodeCreatedMessage.class + ": resourceVersion is missing"); + Objects.requireNonNull(discountCode, DiscountCodeCreatedMessage.class + ": discountCode is missing"); + return new DiscountCodeCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, discountCode); + } + + /** + * builds DiscountCodeCreatedMessage without checking for non-null required values + * @return DiscountCodeCreatedMessage + */ + public DiscountCodeCreatedMessage buildUnchecked() { + return new DiscountCodeCreatedMessageImpl(id, version, createdAt, lastModifiedAt, lastModifiedBy, createdBy, + sequenceNumber, resource, resourceVersion, resourceUserProvidedIdentifiers, discountCode); + } + + /** + * factory method for an instance of DiscountCodeCreatedMessageBuilder + * @return builder + */ + public static DiscountCodeCreatedMessageBuilder of() { + return new DiscountCodeCreatedMessageBuilder(); + } + + /** + * create builder for DiscountCodeCreatedMessage instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeCreatedMessageBuilder of(final DiscountCodeCreatedMessage template) { + DiscountCodeCreatedMessageBuilder builder = new DiscountCodeCreatedMessageBuilder(); + builder.id = template.getId(); + builder.version = template.getVersion(); + builder.createdAt = template.getCreatedAt(); + builder.lastModifiedAt = template.getLastModifiedAt(); + builder.lastModifiedBy = template.getLastModifiedBy(); + builder.createdBy = template.getCreatedBy(); + builder.sequenceNumber = template.getSequenceNumber(); + builder.resource = template.getResource(); + builder.resourceVersion = template.getResourceVersion(); + builder.resourceUserProvidedIdentifiers = template.getResourceUserProvidedIdentifiers(); + builder.discountCode = template.getDiscountCode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessageImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessageImpl.java new file mode 100644 index 00000000000..034370b6bc0 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessageImpl.java @@ -0,0 +1,296 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after a successful Create DiscountCode request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeCreatedMessageImpl implements DiscountCodeCreatedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private com.commercetools.api.models.discount_code.DiscountCode discountCode; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeCreatedMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("discountCode") final com.commercetools.api.models.discount_code.DiscountCode discountCode) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.discountCode = discountCode; + this.type = DISCOUNT_CODE_CREATED; + } + + /** + * create empty instance + */ + public DiscountCodeCreatedMessageImpl() { + this.type = DISCOUNT_CODE_CREATED; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
The Discount Code that was created.
+ */ + + public com.commercetools.api.models.discount_code.DiscountCode getDiscountCode() { + return this.discountCode; + } + + public void setId(final String id) { + this.id = id; + } + + public void setVersion(final Long version) { + this.version = version; + } + + public void setCreatedAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + } + + public void setLastModifiedAt(final java.time.ZonedDateTime lastModifiedAt) { + this.lastModifiedAt = lastModifiedAt; + } + + public void setLastModifiedBy(final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy) { + this.lastModifiedBy = lastModifiedBy; + } + + public void setCreatedBy(final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + } + + public void setSequenceNumber(final Long sequenceNumber) { + this.sequenceNumber = sequenceNumber; + } + + public void setResource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + } + + public void setResourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + } + + public void setResourceUserProvidedIdentifiers( + final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + } + + public void setDiscountCode(final com.commercetools.api.models.discount_code.DiscountCode discountCode) { + this.discountCode = discountCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeCreatedMessageImpl that = (DiscountCodeCreatedMessageImpl) o; + + return new EqualsBuilder().append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(discountCode, that.discountCode) + .append(id, that.id) + .append(version, that.version) + .append(createdAt, that.createdAt) + .append(lastModifiedAt, that.lastModifiedAt) + .append(lastModifiedBy, that.lastModifiedBy) + .append(createdBy, that.createdBy) + .append(sequenceNumber, that.sequenceNumber) + .append(resource, that.resource) + .append(resourceVersion, that.resourceVersion) + .append(type, that.type) + .append(resourceUserProvidedIdentifiers, that.resourceUserProvidedIdentifiers) + .append(discountCode, that.discountCode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(id) + .append(version) + .append(createdAt) + .append(lastModifiedAt) + .append(lastModifiedBy) + .append(createdBy) + .append(sequenceNumber) + .append(resource) + .append(resourceVersion) + .append(type) + .append(resourceUserProvidedIdentifiers) + .append(discountCode) + .toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", id) + .append("version", version) + .append("createdAt", createdAt) + .append("lastModifiedAt", lastModifiedAt) + .append("lastModifiedBy", lastModifiedBy) + .append("createdBy", createdBy) + .append("sequenceNumber", sequenceNumber) + .append("resource", resource) + .append("resourceVersion", resourceVersion) + .append("type", type) + .append("resourceUserProvidedIdentifiers", resourceUserProvidedIdentifiers) + .append("discountCode", discountCode) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayload.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayload.java new file mode 100644 index 00000000000..556424db5ea --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayload.java @@ -0,0 +1,131 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; +import javax.validation.Valid; +import javax.validation.constraints.NotNull; + +import com.commercetools.api.models.discount_code.DiscountCode; +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Create DiscountCode request.
+ * + *
+ * DiscountCodeCreatedMessagePayload discountCodeCreatedMessagePayload = DiscountCodeCreatedMessagePayload.builder()
+ * .discountCode(discountCodeBuilder -> discountCodeBuilder)
+ * .build()
+ *
+ * The Discount Code that was created.
+ * @return discountCode + */ + @NotNull + @Valid + @JsonProperty("discountCode") + public DiscountCode getDiscountCode(); + + /** + *The Discount Code that was created.
+ * @param discountCode value to be set + */ + + public void setDiscountCode(final DiscountCode discountCode); + + /** + * factory method + * @return instance of DiscountCodeCreatedMessagePayload + */ + public static DiscountCodeCreatedMessagePayload of() { + return new DiscountCodeCreatedMessagePayloadImpl(); + } + + /** + * factory method to create a shallow copy DiscountCodeCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + public static DiscountCodeCreatedMessagePayload of(final DiscountCodeCreatedMessagePayload template) { + DiscountCodeCreatedMessagePayloadImpl instance = new DiscountCodeCreatedMessagePayloadImpl(); + instance.setDiscountCode(template.getDiscountCode()); + return instance; + } + + /** + * factory method to create a deep copy of DiscountCodeCreatedMessagePayload + * @param template instance to be copied + * @return copy instance + */ + @Nullable + public static DiscountCodeCreatedMessagePayload deepCopy( + @Nullable final DiscountCodeCreatedMessagePayload template) { + if (template == null) { + return null; + } + DiscountCodeCreatedMessagePayloadImpl instance = new DiscountCodeCreatedMessagePayloadImpl(); + instance.setDiscountCode( + com.commercetools.api.models.discount_code.DiscountCode.deepCopy(template.getDiscountCode())); + return instance; + } + + /** + * builder factory method for DiscountCodeCreatedMessagePayload + * @return builder + */ + public static DiscountCodeCreatedMessagePayloadBuilder builder() { + return DiscountCodeCreatedMessagePayloadBuilder.of(); + } + + /** + * create builder for DiscountCodeCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeCreatedMessagePayloadBuilder builder(final DiscountCodeCreatedMessagePayload template) { + return DiscountCodeCreatedMessagePayloadBuilder.of(template); + } + + /** + * accessor map function + * @param
+ * DiscountCodeCreatedMessagePayload discountCodeCreatedMessagePayload = DiscountCodeCreatedMessagePayload.builder()
+ * .discountCode(discountCodeBuilder -> discountCodeBuilder)
+ * .build()
+ *
+ * The Discount Code that was created.
+ * @param builder function to build the discountCode value + * @return Builder + */ + + public DiscountCodeCreatedMessagePayloadBuilder discountCode( + FunctionThe Discount Code that was created.
+ * @param builder function to build the discountCode value + * @return Builder + */ + + public DiscountCodeCreatedMessagePayloadBuilder withDiscountCode( + FunctionThe Discount Code that was created.
+ * @param discountCode value to be set + * @return Builder + */ + + public DiscountCodeCreatedMessagePayloadBuilder discountCode( + final com.commercetools.api.models.discount_code.DiscountCode discountCode) { + this.discountCode = discountCode; + return this; + } + + /** + *The Discount Code that was created.
+ * @return discountCode + */ + + public com.commercetools.api.models.discount_code.DiscountCode getDiscountCode() { + return this.discountCode; + } + + /** + * builds DiscountCodeCreatedMessagePayload with checking for non-null required values + * @return DiscountCodeCreatedMessagePayload + */ + public DiscountCodeCreatedMessagePayload build() { + Objects.requireNonNull(discountCode, DiscountCodeCreatedMessagePayload.class + ": discountCode is missing"); + return new DiscountCodeCreatedMessagePayloadImpl(discountCode); + } + + /** + * builds DiscountCodeCreatedMessagePayload without checking for non-null required values + * @return DiscountCodeCreatedMessagePayload + */ + public DiscountCodeCreatedMessagePayload buildUnchecked() { + return new DiscountCodeCreatedMessagePayloadImpl(discountCode); + } + + /** + * factory method for an instance of DiscountCodeCreatedMessagePayloadBuilder + * @return builder + */ + public static DiscountCodeCreatedMessagePayloadBuilder of() { + return new DiscountCodeCreatedMessagePayloadBuilder(); + } + + /** + * create builder for DiscountCodeCreatedMessagePayload instance + * @param template instance with prefilled values for the builder + * @return builder + */ + public static DiscountCodeCreatedMessagePayloadBuilder of(final DiscountCodeCreatedMessagePayload template) { + DiscountCodeCreatedMessagePayloadBuilder builder = new DiscountCodeCreatedMessagePayloadBuilder(); + builder.discountCode = template.getDiscountCode(); + return builder; + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayloadImpl.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayloadImpl.java new file mode 100644 index 00000000000..0d3789d38be --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeCreatedMessagePayloadImpl.java @@ -0,0 +1,95 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.ModelBase; +import io.vrap.rmf.base.client.utils.Generated; + +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + *Generated after a successful Create DiscountCode request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeCreatedMessagePayloadImpl implements DiscountCodeCreatedMessagePayload, ModelBase { + + private String type; + + private com.commercetools.api.models.discount_code.DiscountCode discountCode; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeCreatedMessagePayloadImpl( + @JsonProperty("discountCode") final com.commercetools.api.models.discount_code.DiscountCode discountCode) { + this.discountCode = discountCode; + this.type = DISCOUNT_CODE_CREATED; + } + + /** + * create empty instance + */ + public DiscountCodeCreatedMessagePayloadImpl() { + this.type = DISCOUNT_CODE_CREATED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *The Discount Code that was created.
+ */ + + public com.commercetools.api.models.discount_code.DiscountCode getDiscountCode() { + return this.discountCode; + } + + public void setDiscountCode(final com.commercetools.api.models.discount_code.DiscountCode discountCode) { + this.discountCode = discountCode; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeCreatedMessagePayloadImpl that = (DiscountCodeCreatedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type) + .append(discountCode, that.discountCode) + .append(type, that.type) + .append(discountCode, that.discountCode) + .isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).append(discountCode).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type) + .append("discountCode", discountCode) + .build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessage.java new file mode 100644 index 00000000000..5ef2bc23bc1 --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeDeletedMessage.java @@ -0,0 +1,136 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Delete DiscountCode request.
+ * + *
+ * DiscountCodeDeletedMessage discountCodeDeletedMessage = DiscountCodeDeletedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .build()
+ *
+ *
+ * DiscountCodeDeletedMessage discountCodeDeletedMessage = DiscountCodeDeletedMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder resource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public DiscountCodeDeletedMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Generated after a successful Delete DiscountCode request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeDeletedMessageImpl implements DiscountCodeDeletedMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeDeletedMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.type = DISCOUNT_CODE_DELETED; + } + + /** + * create empty instance + */ + public DiscountCodeDeletedMessageImpl() { + this.type = DISCOUNT_CODE_DELETED; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
Generated after a successful Delete DiscountCode request.
+ * + *
+ * DiscountCodeDeletedMessagePayload discountCodeDeletedMessagePayload = DiscountCodeDeletedMessagePayload.builder()
+ * .build()
+ *
+ *
+ * DiscountCodeDeletedMessagePayload discountCodeDeletedMessagePayload = DiscountCodeDeletedMessagePayload.builder()
+ * .build()
+ *
+ * Generated after a successful Delete DiscountCode request.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeDeletedMessagePayloadImpl implements DiscountCodeDeletedMessagePayload, ModelBase { + + private String type; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeDeletedMessagePayloadImpl() { + this.type = DISCOUNT_CODE_DELETED; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + @Override + public boolean equals(Object o) { + if (this == o) + return true; + + if (o == null || getClass() != o.getClass()) + return false; + + DiscountCodeDeletedMessagePayloadImpl that = (DiscountCodeDeletedMessagePayloadImpl) o; + + return new EqualsBuilder().append(type, that.type).append(type, that.type).isEquals(); + } + + @Override + public int hashCode() { + return new HashCodeBuilder(17, 37).append(type).toHashCode(); + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("type", type).build(); + } + +} diff --git a/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessage.java b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessage.java new file mode 100644 index 00000000000..6729f61f33e --- /dev/null +++ b/commercetools/commercetools-sdk-java-api/src/main/java-generated/com/commercetools/api/models/message/DiscountCodeKeySetMessage.java @@ -0,0 +1,170 @@ + +package com.commercetools.api.models.message; + +import java.time.*; +import java.util.*; +import java.util.function.Function; + +import javax.annotation.Nullable; + +import com.fasterxml.jackson.annotation.*; +import com.fasterxml.jackson.databind.annotation.*; + +import io.vrap.rmf.base.client.utils.Generated; + +/** + *Generated after a successful Set Key update action.
+ * + *
+ * DiscountCodeKeySetMessage discountCodeKeySetMessage = DiscountCodeKeySetMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .build()
+ *
+ * key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
+ * DiscountCodeKeySetMessage discountCodeKeySetMessage = DiscountCodeKeySetMessage.builder()
+ * .id("{id}")
+ * .version(0.3)
+ * .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
+ * .sequenceNumber(0.3)
+ * .resource(resourceBuilder -> resourceBuilder)
+ * .resourceVersion(0.3)
+ * .build()
+ *
+ * Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @param id value to be set + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder id(final String id) { + this.id = id; + return this; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @param createdAt value to be set + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder createdAt(final java.time.ZonedDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Value of createdBy
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder createdBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param builder function to build the createdBy value + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder withCreatedBy( + FunctionPresent on resources created after 1 February 2019 except for events not tracked.
+ * @param createdBy value to be set + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder createdBy( + @Nullable final com.commercetools.api.models.common.CreatedBy createdBy) { + this.createdBy = createdBy; + return this; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @param resource value to be set + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder resource(final com.commercetools.api.models.common.Reference resource) { + this.resource = resource; + return this; + } + + /** + *Reference to the resource on which the change or action was performed.
+ * @param builder function to build the resource value + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder resource( + FunctionVersion of the resource on which the change or action was performed.
+ * @param resourceVersion value to be set + * @return Builder + */ + + public DiscountCodeKeySetMessageBuilder resourceVersion(final Long resourceVersion) { + this.resourceVersion = resourceVersion; + return this; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
Unique identifier of the Message. Can be used to track which Messages have been processed.
+ * @return id + */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ * @return createdAt + */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ * @return createdBy + */ + + @Nullable + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ * @return resource + */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ * @return resourceVersion + */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
Generated after a successful Set Key update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeKeySetMessageImpl implements DiscountCodeKeySetMessage, ModelBase { + + private String id; + + private Long version; + + private java.time.ZonedDateTime createdAt; + + private java.time.ZonedDateTime lastModifiedAt; + + private com.commercetools.api.models.common.LastModifiedBy lastModifiedBy; + + private com.commercetools.api.models.common.CreatedBy createdBy; + + private Long sequenceNumber; + + private com.commercetools.api.models.common.Reference resource; + + private Long resourceVersion; + + private String type; + + private com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers; + + private String key; + + private String oldKey; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeKeySetMessageImpl(@JsonProperty("id") final String id, @JsonProperty("version") final Long version, + @JsonProperty("createdAt") final java.time.ZonedDateTime createdAt, + @JsonProperty("lastModifiedAt") final java.time.ZonedDateTime lastModifiedAt, + @JsonProperty("lastModifiedBy") final com.commercetools.api.models.common.LastModifiedBy lastModifiedBy, + @JsonProperty("createdBy") final com.commercetools.api.models.common.CreatedBy createdBy, + @JsonProperty("sequenceNumber") final Long sequenceNumber, + @JsonProperty("resource") final com.commercetools.api.models.common.Reference resource, + @JsonProperty("resourceVersion") final Long resourceVersion, + @JsonProperty("resourceUserProvidedIdentifiers") final com.commercetools.api.models.message.UserProvidedIdentifiers resourceUserProvidedIdentifiers, + @JsonProperty("key") final String key, @JsonProperty("oldKey") final String oldKey) { + this.id = id; + this.version = version; + this.createdAt = createdAt; + this.lastModifiedAt = lastModifiedAt; + this.lastModifiedBy = lastModifiedBy; + this.createdBy = createdBy; + this.sequenceNumber = sequenceNumber; + this.resource = resource; + this.resourceVersion = resourceVersion; + this.resourceUserProvidedIdentifiers = resourceUserProvidedIdentifiers; + this.key = key; + this.oldKey = oldKey; + this.type = DISCOUNT_CODE_KEY_SET; + } + + /** + * create empty instance + */ + public DiscountCodeKeySetMessageImpl() { + this.type = DISCOUNT_CODE_KEY_SET; + } + + /** + *Unique identifier of the Message. Can be used to track which Messages have been processed.
+ */ + + public String getId() { + return this.id; + } + + /** + *Version of a resource. In case of Messages, this is always 1
.
Date and time (UTC) the Message was generated.
+ */ + + public java.time.ZonedDateTime getCreatedAt() { + return this.createdAt; + } + + /** + *Value of createdAt
.
Value of createdBy
.
Present on resources created after 1 February 2019 except for events not tracked.
+ */ + + public com.commercetools.api.models.common.CreatedBy getCreatedBy() { + return this.createdBy; + } + + /** + *Message number in relation to other Messages for a given resource. The sequenceNumber
of the next Message for the resource is the successor of the sequenceNumber
of the current Message. Meaning, the sequenceNumber
of the next Message equals the sequenceNumber
of the current Message + 1. sequenceNumber
can be used to ensure that Messages are processed in the correct order for a particular resource.
Reference to the resource on which the change or action was performed.
+ */ + + public com.commercetools.api.models.common.Reference getResource() { + return this.resource; + } + + /** + *Version of the resource on which the change or action was performed.
+ */ + + public Long getResourceVersion() { + return this.resourceVersion; + } + + /** + *Message Type of the Message.
+ */ + + public String getType() { + return this.type; + } + + /** + *User-provided identifiers of the resource, such as key
or externalId
. Only present if the resource has such identifiers.
key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
Generated after a successful Set Key update action.
+ * + *
+ * DiscountCodeKeySetMessagePayload discountCodeKeySetMessagePayload = DiscountCodeKeySetMessagePayload.builder()
+ * .build()
+ *
+ * key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
+ * DiscountCodeKeySetMessagePayload discountCodeKeySetMessagePayload = DiscountCodeKeySetMessagePayload.builder()
+ * .build()
+ *
+ * key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.
Generated after a successful Set Key update action.
+ */ +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") +public class DiscountCodeKeySetMessagePayloadImpl implements DiscountCodeKeySetMessagePayload, ModelBase { + + private String type; + + private String key; + + private String oldKey; + + /** + * create instance with all properties + */ + @JsonCreator + DiscountCodeKeySetMessagePayloadImpl(@JsonProperty("key") final String key, + @JsonProperty("oldKey") final String oldKey) { + this.key = key; + this.oldKey = oldKey; + this.type = DISCOUNT_CODE_KEY_SET; + } + + /** + * create empty instance + */ + public DiscountCodeKeySetMessagePayloadImpl() { + this.type = DISCOUNT_CODE_KEY_SET; + } + + /** + * + */ + + public String getType() { + return this.type; + } + + /** + *key
value of the Discount Code after the Set Key update action.
key
value of the Discount Code before the Set Key update action.